:root {
  --purple: #7C3AED;   /* Magical Purple — main brand */
  --blue:   #2563EB;   /* Royal Blue — ChessGaze / AI */
  --mint:   #14B8A6;   /* Mint — success, AI detection */
  --warm-white: #FAFAF8;
  --light-gray: #F3F4F6;
  --navy:   #111827;   /* headings */
  --gray:   #6B7280;   /* body / description text */
  --walnut: #8B5A2B;   /* chess board & wood */
  --border: #E7E7EA;
  --brand-gradient: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 6px 18px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 12px 34px rgba(17, 24, 39, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(180deg, #F4F1FE 0, var(--warm-white) 460px);
  background-repeat: no-repeat;
  background-color: var(--warm-white);
  color: var(--gray);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
header {
  padding: 30px 20px 20px;
  text-align: center;
}
header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--navy);
}
header h1 span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
header nav {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
header nav a {
  color: var(--gray);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
header nav a:hover { color: var(--navy); text-decoration: none; }
header nav a.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
header .tagline {
  color: var(--gray);
  margin-top: 14px;
  font-size: 15px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 20px 48px;
  max-width: 920px;
  margin: 0 auto;
}
.hero h2 {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--navy);
  margin-bottom: 20px;
}
.hero p {
  font-size: 19px;
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 36px;
}

/* ---------- Video ---------- */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #fff;
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video-wrap.landscape {
  max-width: 720px;
  aspect-ratio: 16 / 9;
}
.video-wrap.tall {
  aspect-ratio: 6 / 13;
}

/* Hero product screenshot */
.hero-shot {
  display: block;
  margin: 0 auto;
  max-width: 340px;
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ---------- How it works steps ---------- */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 44px;
}
.step {
  flex: 1 1 190px;
  max-width: 220px;
  text-align: center;
}
.step-shot {
  height: 300px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--light-gray);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}
.step-shot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.step h3 {
  color: var(--navy);
  font-size: 17px;
  margin: 18px 0 6px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}
.step p {
  color: var(--gray);
  font-size: 14px;
  text-align: center;
  margin: 0;
}
.step-arrow {
  align-self: flex-start;
  margin-top: 138px;
  color: var(--purple);
  font-size: 26px;
  line-height: 1;
  opacity: 0.6;
}
@media (max-width: 640px) {
  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 300px; }
  .step-arrow { margin-top: 0; transform: rotate(90deg); }
}

/* ---------- Sections ---------- */
section {
  padding: 72px 20px;
  max-width: 940px;
  margin: 0 auto;
}
section h2 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--navy);
  margin-bottom: 16px;
  text-align: center;
}
section p {
  color: var(--gray);
  text-align: center;
  margin-bottom: 32px;
  font-size: 17px;
}

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 44px;
}
.feature {
  background: #fff;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.feature .ico {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 14px;
}
.feature h3 {
  color: var(--navy);
  font-size: 18px;
  margin-bottom: 8px;
}
.feature p {
  color: var(--gray);
  text-align: left;
  margin: 0;
  font-size: 15px;
}

/* ---------- Story ---------- */
section.story { max-width: 720px; }
section.story p,
section.story h3 { text-align: left; }
section.story h3 {
  color: var(--navy);
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 12px;
}
section.story p {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 18px;
  color: var(--gray);
}
section.story p.closing {
  font-style: italic;
  margin-top: 32px;
  color: var(--navy);
}
section.story p.signature {
  text-align: right;
  color: var(--purple);
  font-weight: 600;
  font-size: 15px;
  margin-top: 24px;
}

/* ---------- Phone screenshot ---------- */
.phone-shot {
  display: block;
  margin: 28px auto 0;
  max-width: 280px;
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ---------- Tip images ---------- */
.tip-image {
  position: relative;
  display: block;
  margin: 14px auto 0;
  max-width: 260px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--light-gray);
}
.tip-image img {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tip-image.bad img  { border-color: #ef4444; }
.tip-image.good img { border-color: var(--mint); }
.tip-image .cross {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tip-image .cross line {
  stroke: rgba(239, 68, 68, 0.9);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
}
.tip-caption {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-top: 10px;
}
.tip-caption.bad  { color: #dc2626; }
.tip-caption.good { color: var(--mint); font-weight: 600; }

.tip-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
}
.tip-image-row > div {
  flex: 1 1 200px;
  max-width: 260px;
  min-width: 0;
}
.tip-image-row .tip-image {
  margin: 0;
  flex: 1 1 220px;
  max-width: 260px;
}

/* One image per row, each centered */
.correction-grid {
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.correction-grid > div {
  flex: none;
  width: 100%;
  max-width: 260px;
}

/* ---------- Settings list ---------- */
.setting-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}
.setting-list li {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.6;
}
.setting-list li strong { color: var(--navy); }
.setting-list li em { color: var(--purple); font-style: normal; }

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 6px 0 12px;
  vertical-align: middle;
}
.dot.green { background: var(--mint); }
.dot.amber { background: #f59e0b; }
.dot.red   { background: #ef4444; }

/* ---------- Boards ---------- */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 34px;
}
.board-card {
  background: #fff;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.board-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--light-gray);
  border: 1px solid rgba(139, 90, 43, 0.25);
}
.board-card h3 {
  color: var(--navy);
  font-size: 19px;
  margin-bottom: 10px;
}
.board-card p {
  color: var(--gray);
  text-align: left;
  margin-bottom: 16px;
  font-size: 15px;
  flex-grow: 1;
}

.board-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.board-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(139, 90, 43, 0.3);
  background: var(--light-gray);
}

/* ---------- Shop / product ---------- */
.product {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 52px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}
@media (max-width: 780px) {
  .product { grid-template-columns: 1fr; gap: 30px; padding-top: 20px; }
}
.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.product-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(139, 90, 43, 0.3);
  background: var(--light-gray);
}
.product-info { text-align: left; }
.product-info h2 {
  text-align: left;
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.product-sub {
  color: var(--gray);
  font-size: 16px;
  margin: 0 0 22px;
  text-align: left;
}
.price {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.ship-badge {
  display: inline-block;
  background: rgba(20, 184, 166, 0.12);
  color: #0d9488;
  border: 1px solid rgba(20, 184, 166, 0.35);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.btn.block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px;
  font-size: 16px;
  margin: 0;
}
.pay-note {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-top: 12px;
}

/* Stock flag: toggle body class in-stock / sold-out.
   Specificity note: .btn.block is (0,2,0), so hide rules must match it. */
.btn.buy-soldout { display: none; }
.pay-note.buy-soldout { display: none; }
body.sold-out .btn.buy-live { display: none; }
body.sold-out .pay-note.buy-live { display: none; }
body.sold-out .btn.buy-soldout { display: block; }
body.sold-out .pay-note.buy-soldout { display: block; }
body.sold-out .ship-badge { opacity: 0.5; }
.product-desc { margin-top: 28px; }
.product-desc h3 {
  color: var(--navy);
  font-size: 17px;
  margin: 0 0 10px;
  text-align: left;
}
.product-desc ul { list-style: none; padding: 0; margin: 0; }
.product-desc li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--gray);
  font-size: 15px;
  text-align: left;
}
.product-desc li::before {
  content: "\265F";
  position: absolute;
  left: 0;
  color: var(--walnut);
}
.product-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--walnut);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray);
  text-align: left;
  line-height: 1.5;
}

/* ---------- Kicker ---------- */
.kicker {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
}

/* ---------- Callout ---------- */
.callout {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 28px auto 0;
  max-width: 640px;
  text-align: left;
  color: var(--gray);
  font-size: 15px;
}
.callout strong { color: var(--navy); }
/* ---------- Scan-to-download QR ---------- */
.scan {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scan-tile {
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  line-height: 0;
}
.scan-tile img { width: 150px; height: 150px; display: block; }
.scan-note {
  color: var(--gray);
  font-size: 14px;
  margin: 0;
}
/* Scanning your own phone screen is pointless — hide on small screens */
@media (max-width: 600px) {
  .scan { display: none; }
}

/* ---------- Buttons ---------- */
.cta {
  text-align: center;
  margin-top: 32px;
}
.btn {
  display: inline-block;
  padding: 15px 30px;
  background: var(--brand-gradient);
  color: #fff;
  border-radius: 14px;
  font-weight: 600;
  margin: 6px;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.3);
  text-decoration: none;
}
.btn.outline {
  background: #fff;
  color: var(--purple);
  border: 1px solid #DcD3F6;
  box-shadow: none;
  padding: 14px 24px;
  font-size: 14px;
  align-self: flex-start;
}
.btn.outline:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.12);
}
.btn.disabled {
  background: #EEF0F3;
  color: #9AA1AB;
  border: 1px dashed #D6DAE0;
  box-shadow: none;
  cursor: default;
}
.btn.disabled:hover { transform: none; box-shadow: none; text-decoration: none; }
.btn.store {
  margin: 0;
  padding: 10px 18px;
  font-size: 13px;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--gray); margin: 0 8px; }
footer a:hover { color: var(--purple); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .hero h2 { font-size: 36px; }
  section h2 { font-size: 30px; }
  .hero p { font-size: 17px; }
  /* Smaller header store buttons so both fit next to the logo on phones */
  header .brand { gap: 8px; }
  .btn.store { padding: 7px 11px; font-size: 11.5px; }
}
