/* Duo Chess – promotional site. Tokens mirror DuoChess/Theme/Theme.swift and the brief. */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --felt: #1f3329;
  --felt-deep: #172820;
  --felt-raised: #263d31;
  --brass: #c8a15a;
  --brass-light: #e3cf8a;
  --ink-on-brass: #1b1408;
  --square-light: #eadfc8;
  --square-dark: #9a7652;
  --frame: #2e1f12;
  --paper: #e4dfd4;
  --paper-ink: #1f2a24;
  --paper-muted: #5b665f;
  --text: #f4efe3;
  --text-muted: #a9b8ae;
  --line: rgba(244, 239, 227, 0.12);
  --won: #9edda8;

  --sans: "Manrope", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --radius: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--felt);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-light); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--brass); color: var(--ink-on-brass); padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--felt-deep) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(200, 161, 90, 0.6); }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }

.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a {
  color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; min-width: 36px; text-align: center;
}
.lang a[aria-current="true"] { background: var(--brass); color: var(--ink-on-brass); }

@media (max-width: 760px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
}

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 14px;
}
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 800; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-muted); max-width: 36em; margin: 20px 0 0; text-wrap: pretty; }
p { text-wrap: pretty; }
.mono { font-family: var(--mono); }

:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { letter-spacing: 0; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .eyebrow { letter-spacing: 0.08em; }
:lang(ja) body { line-height: 1.8; }

/* ---------- Buttons / badges ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 32px; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 8px 20px 8px 16px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 12px;
  line-height: 1.15;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.85; }
.store-badge strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge[aria-disabled="true"]:hover { color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-size: 14px; font-weight: 700; color: var(--text);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.12);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(1200px 600px at 75% 40%, rgba(200, 161, 90, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(255, 255, 255, 0.04), transparent 60%),
    var(--felt);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--brass); }

.table-shot { position: relative; margin: 0; }
.table-shot img, .table-shot video {
  width: 100%;
  transform: rotate(-3deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}
.seat {
  position: absolute; top: 50%;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass);
  white-space: nowrap;
}
.seat-1 { left: -6px; transform: translate(-50%, -50%) rotate(90deg); }
.seat-2 { right: -6px; transform: translate(50%, -50%) rotate(-90deg); }
:lang(ja) .seat { letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .table-shot { margin-inline: 22px; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

.section.deep { background: var(--felt-deep); }

.section.paper { background: var(--paper); color: var(--paper-ink); }
.paper .lede, .paper p { color: var(--paper-muted); }
.paper .eyebrow { color: #8a6a2f; }
.paper a { color: #6b4f1e; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0 0 clamp(40px, 6vw, 72px); counter-reset: step; }
.steps li { padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.5); counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px;
  border-radius: 50%; background: var(--felt); color: var(--brass);
  font-family: var(--mono); font-weight: 700;
}
.steps h3 { font-size: 20px; margin-bottom: 6px; color: var(--paper-ink); }
.steps p { margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
/* Wide screens: the color draw clip beside the steps instead of a large device below them. */
@media (min-width: 1000px) {
  .how-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
  .how-grid .steps { grid-template-columns: 1fr; margin: 0; }
  .how-grid .shot-center { order: -1; max-width: none; margin: 0; }
}

.shot { filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.28)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18)); }
.deep .shot, .section:not(.paper) .shot { filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.5)); }
.shot-center { width: 100%; max-width: 880px; margin-inline: auto; }

/* Feature rows */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.feature + .feature { margin-top: clamp(72px, 10vw, 128px); }
.feature.flip .feature-media { order: -1; }
.feature-copy h3 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.feature-copy p { color: var(--text-muted); margin: 0 0 16px; }
.feature-copy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-copy li { position: relative; padding-left: 26px; color: var(--text); }
.feature-copy li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 10px; height: 10px; border-radius: 2px; background: var(--brass); transform: rotate(45deg);
}
.feature-media { position: relative; }
.media-pair { display: grid; grid-template-columns: 1fr 0.42fr; gap: 18px; align-items: end; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
}

/* Small feature cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(72px, 10vw, 120px); }
.card { padding: 26px; border-radius: var(--radius); background: var(--felt-raised); border: 1px solid var(--line); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-muted); font-size: 16px; }
.card .icon { width: 40px; height: 40px; margin-bottom: 16px; display: grid; place-items: center; border-radius: 12px; background: rgba(200, 161, 90, 0.16); color: var(--brass); }
.card .icon svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* Devices */
.devices { display: grid; grid-template-columns: 1fr 0.55fr 1fr; gap: clamp(18px, 3vw, 36px); align-items: end; }
.device { margin: 0; text-align: center; }
.device figcaption { margin-top: 22px; }
.device h3 { font-size: 20px; margin-bottom: 6px; color: var(--paper-ink); }
.device p { margin: 0 auto; max-width: 26em; font-size: 15px; }
.duo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
@media (max-width: 860px) {
  .devices { grid-template-columns: 1fr; gap: 56px; }
  .device-iphone img { max-width: 260px; margin-inline: auto; }
}

/* Pricing band */
.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.promise li { padding: 28px; border-radius: var(--radius); border: 1px solid rgba(200, 161, 90, 0.35); background: rgba(200, 161, 90, 0.06); }
.promise strong { display: block; font-size: 20px; margin-bottom: 6px; }
.promise span { color: var(--text-muted); }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* Final CTA */
.final { text-align: center; }
/* The icon's left half is the same felt as the page: a brass hairline keeps its edge visible. */
.final .app-icon { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 28px; box-shadow: 0 0 0 2px rgba(200, 161, 90, 0.6), 0 18px 40px rgba(0, 0, 0, 0.4); }
.final .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--felt-deep); border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--text-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--text); }
.legal { flex-basis: 100%; margin: 0; font-size: 12px; opacity: 0.75; }

/* ---------- Text pages (privacy, support, press) ---------- */

.page { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 12px; }
.prose h2 { font-size: 24px; margin: 48px 0 12px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose .updated { font-family: var(--mono); font-size: 14px; color: var(--text-muted); margin: 0 0 32px; }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; color: var(--text); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--mono); font-size: 22px; color: var(--brass); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; }

.contact-card { margin-top: 40px; padding: 26px; border-radius: var(--radius); background: var(--felt-raised); border: 1px solid var(--line); }
.contact-card p { margin: 0 0 6px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.facts dt { color: var(--text-muted); font-weight: 600; }
.facts dd { margin: 0; color: var(--text); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 12px; } }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; list-style: none; padding: 0; }
.swatches li { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--felt-raised); }
.swatches i { display: block; height: 64px; }
.swatches span { display: block; padding: 10px 12px; font-size: 13px; color: var(--text); }
.swatches code { font-family: var(--mono); color: var(--text-muted); }

.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.downloads a { display: block; padding: 14px; border-radius: 16px; background: var(--felt-raised); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.downloads a:hover { border-color: var(--brass); }
.downloads img { aspect-ratio: 4 / 3; object-fit: contain; width: 100%; margin-bottom: 10px; }

/* Keep a Japanese phrase (and its closing 。) on one line */
.nb { display: inline-block; white-space: nowrap; }
:lang(ja) h1 { font-size: clamp(32px, 5.6vw, 68px); }

/* Support contact form */
.contact-form { display: grid; gap: 16px; margin-top: 20px; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .contact-form .field-row { grid-template-columns: 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.contact-form .opt { font-weight: 500; color: var(--text-muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 500; color: var(--text);
  background: var(--felt-deep); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-height: 48px;
}
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.contact-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.contact-form input::placeholder { color: rgba(169, 184, 174, 0.6); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(200, 161, 90, 0.25); }
.contact-form [aria-invalid="true"] { border-color: #f0b3a8; }
.contact-form button {
  justify-self: start; min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px;
  background: var(--brass); color: var(--ink-on-brass); font: inherit; font-weight: 800; cursor: pointer;
}
.contact-form button:hover { background: var(--brass-light); }
.contact-form button:disabled { opacity: 0.6; cursor: progress; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 15px; }
.form-status:empty { display: none; }
.form-status.success { color: var(--won); }
.form-status.error { color: #f0b3a8; }
.form-status.info { color: var(--brass-light); }
.contact-card .direct { margin: 20px 0 0; font-size: 14px; }

/* Board tools */
.flow { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: flow; }
.flow li { position: relative; padding-left: 40px; min-height: 28px; counter-increment: flow; }
.flow li::before {
  content: counter(flow); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brass); color: var(--ink-on-brass); font-weight: 800; font-size: 14px; transform: none;
}
.media-phones { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 28px); max-width: 560px; margin-inline: auto; }
.media-phones .shot:nth-child(2) { margin-top: clamp(32px, 6vw, 72px); }
.cards.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cards.cards-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards.cards-4 { grid-template-columns: 1fr; } }
.deep .card { background: var(--felt); }
.soon { margin: 32px auto 0; text-align: center; color: var(--text-muted); max-width: 40em; }
.soon strong { color: var(--brass-light); }
