/* Tandrio's page: the game's own light Sage look (cream paper, deep green, coral; Georgia headings, TandrioMobile src/themes.css) inside the studio's header and footer. */

:root {
  --void: #f5f2e9;
  --deep: #ece7d8;
  --panel: rgba(255, 253, 247, 0.88);
  --line: #d8ddcc;
  --text: #143a2c;
  --muted: #5b6b62;
  --cyan: #0d7a52;
  --pink: #e07a5f;
  --green: #0d7a52;
  --green-top: #30b879;
  --green-dark: #075138;
  --coral: #e07a5f;
  --blue: #1e57b0;
  --gold: #c9962f;
  --ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --radius: 26px;
  color-scheme: light;
}
body { background: linear-gradient(180deg, #f8f5ec 0%, #f2efe4 50%, #ebe8da 100%); }
::selection { background: rgba(13, 122, 82, 0.22); }
:focus-visible { outline-color: var(--green); }

/* Background: a faint board grid and two soft glows instead of the studio's aurora. */
.sky::before { background: radial-gradient(circle, #d6ead9, transparent 65%); opacity: 0.9; }
.sky::after { background: radial-gradient(circle, #f6dccf, transparent 65%); opacity: 0.8; }
.grid-floor {
  opacity: 0.5;
  background-image: linear-gradient(rgba(20, 58, 44, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 58, 44, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* The studio header, light. */
.top.is-solid { background: rgba(245, 242, 233, 0.86); border-color: var(--line); }
.brand { color: var(--text); }
.brand img { filter: none; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--green); }
.lang-btn { background: #fffdf7; color: var(--text); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
.lang-btn:hover { border-color: var(--green); }

.eyebrow { color: var(--green); letter-spacing: 0.16em; }
.eyebrow::before { box-shadow: none; border-radius: 2px; background: var(--coral); }
.grad { background: linear-gradient(90deg, var(--green), var(--coral)); -webkit-background-clip: text; background-clip: text; }
h2.title, .game-row h3, .final h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
.lead { color: var(--muted); }

/* Pressable green buttons like the game's. */
.btn { background: linear-gradient(180deg, var(--green-top), var(--green)); color: #fff; border-radius: 999px; box-shadow: 0 6px 0 var(--green-dark), 0 16px 30px -12px rgba(7, 81, 56, 0.55); }
.btn:hover { box-shadow: 0 8px 0 var(--green-dark), 0 20px 36px -12px rgba(7, 81, 56, 0.65); }
.store { border-radius: 18px; box-shadow: 0 6px 0 #000, 0 14px 30px -14px rgba(20, 58, 44, 0.5); background: #143a2c; border-color: #143a2c; }
.store:hover { border-color: #143a2c; box-shadow: 0 8px 0 #000, 0 18px 34px -14px rgba(20, 58, 44, 0.6); }
.store.is-soon:hover { box-shadow: 0 6px 0 #000, 0 14px 30px -14px rgba(20, 58, 44, 0.5); }
.panel { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 0 var(--line), 0 24px 50px -30px rgba(20, 58, 44, 0.35); }
.foot { border-color: var(--line); }

/* Hero */
.hero { min-height: 100svh; display: grid; align-items: center; padding: 120px 0 80px; overflow: hidden; isolation: isolate; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero .store-row, .hero .chips-row { justify-content: center; } .hero .lead { margin-left: auto; margin-right: auto; } .td-logo { justify-content: center; } }
.td-logo { display: flex; align-items: center; gap: 18px; margin: 18px 0 0; }
.td-logo img { width: clamp(64px, 9vw, 92px); height: auto; border-radius: 22%; box-shadow: 0 10px 24px -10px rgba(7, 46, 37, 0.55); }
.td-logo span { font-weight: 800; font-size: clamp(44px, 8vw, 88px); line-height: 1; letter-spacing: 0.12em; color: var(--text); }
.hero h1.tagline { margin: 22px 0 0; font-family: var(--serif); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; }
.hero .lead { margin: 16px 0 28px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--muted); font-size: 15px; font-weight: 600; }
.chips-row span::before { content: '●'; margin-right: 6px; color: var(--green); }
.chips-row span:nth-child(2)::before { color: var(--coral); }
.chips-row span:nth-child(3)::before { color: var(--blue); }

/* Stones drifting at the hero's edges, like the game's home screen. */
.stone { position: absolute; z-index: -1; width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; animation: drift 9s ease-in-out infinite; }
.stone::after { content: ''; width: 38%; height: 38%; border: 5px solid #f6efe0; }
.stone.blue { background: linear-gradient(160deg, #3d7fd0, var(--blue)); box-shadow: 0 8px 0 #163f80; left: -22px; top: 22%; transform: rotate(-14deg); }
.stone.blue::after { border-radius: 50%; }
.stone.coral { background: linear-gradient(160deg, #ee9a80, var(--coral)); box-shadow: 0 8px 0 #b55a42; right: -18px; top: 30%; transform: rotate(16deg); animation-delay: -3s; }
.stone.coral::after { transform: rotate(45deg); width: 32%; height: 32%; }
.stone.teal { background: linear-gradient(160deg, #3fb3b3, #1f8b8f); box-shadow: 0 8px 0 #156468; right: 8%; bottom: 8%; width: 68px; height: 68px; border-radius: 18px; transform: rotate(-8deg); animation-delay: -6s; }
.stone.teal::after { border-width: 4px; clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; background: #f6efe0; width: 34%; height: 30%; }
@keyframes drift { 50% { translate: 0 -14px; } }
@media (max-width: 640px) { .stone { width: 64px; height: 64px; } .stone.teal { display: none; } }

/* A phone, drawn in CSS, around a screenshot. */
.phone {
  position: relative; width: min(300px, 74vw); margin: 0 auto; padding: 12px; border-radius: 44px;
  background: #fffdf7; box-shadow: 0 10px 0 var(--line), 0 40px 80px -30px rgba(20, 58, 44, 0.45);
}
.phone img { border-radius: 33px; width: 100%; height: auto; aspect-ratio: 480 / 1039; object-fit: cover; background: var(--deep); }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; width: 70px; height: 7px; margin-left: -35px; border-radius: 4px; background: rgba(20, 58, 44, 0.12); z-index: 1; }
.hero .phone { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(1.5deg); } }

/* Feature rows */
.games { display: grid; gap: clamp(60px, 9vw, 110px); margin-top: 60px; }
.game-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.game-row:nth-child(even) .phone { order: 2; }
@media (max-width: 860px) { .game-row { grid-template-columns: 1fr; } .game-row:nth-child(even) .phone { order: 0; } }
.game-row .icon {
  width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: 34px; color: #fff;
  background: var(--tint); box-shadow: 0 6px 0 var(--tint-dark);
}
.game-row h3 { margin: 18px 0 10px; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; }
.game-row p { margin: 0 0 18px; color: var(--muted); font-size: 18px; max-width: 520px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.facts li { padding: 8px 14px; border-radius: 999px; background: #fffdf7; border: 1px solid var(--line); box-shadow: 0 3px 0 var(--line); font-weight: 600; font-size: 15px; }
.game-row .phone { width: min(270px, 70vw); }
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.themes span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fffdf7; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.themes i { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: clamp(24px, 4vw, 40px); max-width: 980px; margin: 0 auto; text-align: center; }
@media (max-width: 720px) { .numbers { grid-template-columns: repeat(2, 1fr); } }
.numbers b { display: block; font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); line-height: 1; color: var(--green); }
.numbers span { display: block; margin-top: 8px; color: var(--muted); font-weight: 600; font-size: 15px; }

/* FAQ, light */
.faq { max-width: 820px; margin: 44px auto 0; display: grid; gap: 14px; text-align: left; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font-size: 26px; line-height: 1; transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.final { text-align: center; overflow: hidden; isolation: isolate; position: relative; }
.final h2 { font-size: clamp(40px, 7vw, 76px); margin: 0 0 14px; line-height: 1.02; }
.final .lead { margin-left: auto; margin-right: auto; }
.final .store-row { justify-content: center; margin-top: 30px; }

@media (prefers-reduced-motion: reduce) { .stone, .hero .phone { animation: none; } }

/* Challenge banner (…/tandrio/?c=CODE, tandrio.js): the game's cream card under the header. */
.challenge {
  position: fixed; left: 50%; top: 82px; z-index: 60; width: min(560px, calc(100% - 32px)); transform: translate(-50%, -20px);
  opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.4s;
  padding: 18px 20px; border-radius: 20px; background: #fffdf7; color: var(--text);
  border: 1px solid rgba(13, 122, 82, 0.45); box-shadow: 0 6px 0 rgba(7, 81, 56, 0.18), 0 24px 60px -24px rgba(7, 81, 56, 0.55);
}
.challenge.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.challenge b.title { display: block; font: 700 21px var(--serif); margin: 0 28px 4px 0; color: var(--green-dark); }
.challenge p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.challenge .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.challenge .small-btn {
  font: 700 14px var(--ui); padding: 10px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; text-decoration: none;
}
.challenge .small-btn:hover { border-color: var(--green); text-decoration: none; }
.challenge .small-btn.primary { background: linear-gradient(180deg, var(--green-top), var(--green)); color: #fff; border-color: var(--green-dark); }
.challenge [hidden] { display: none; }
.challenge code { display: block; margin-bottom: 10px; font: 600 13px ui-monospace, Menlo, monospace; word-break: break-all; color: var(--text); }
.challenge .note { margin: 0; font-size: 13px; }
.challenge .close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 6px; }
