:root {
  --paper: #F5F4EF;
  --paper-2: #ECEAE2;
  --card: #FFFFFF;
  --ink: #101412;
  --muted: #59605C;
  --line: rgba(16, 20, 18, .10);
  --accent: #FFC23D;
  --on-accent: #101412;
  --band: #101412;
  --on-band: #F5F4EF;
  --on-band-muted: #A9B0AB;
  --gramrai: #0F8246;
  --gramrai-soft: #D6F0E0;
  --mimic: #4E9A00;
  --mimic-soft: #E3F7C8;
  --shadow: 0 1px 2px rgba(16,20,18,.06), 0 12px 32px -12px rgba(16,20,18,.18);
  --radius: 24px;
  --wrap: 1180px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D100F;
    --paper-2: #141816;
    --card: #171B19;
    --ink: #EEF1EC;
    --muted: #A3ABA6;
    --line: rgba(238, 241, 236, .10);
    --band: #1A1F1C;
    --on-band: #EEF1EC;
    --on-band-muted: #A3ABA6;
    --gramrai: #7CEBA8;
    --gramrai-soft: #0A4D2A;
    --mimic: #A6E05A;
    --mimic-soft: #2A4410;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D100F;
  --paper-2: #141816;
  --card: #171B19;
  --ink: #EEF1EC;
  --muted: #A3ABA6;
  --line: rgba(238, 241, 236, .10);
  --band: #1A1F1C;
  --on-band: #EEF1EC;
  --on-band-muted: #A3ABA6;
  --gramrai: #7CEBA8;
  --gramrai-soft: #0A4D2A;
  --mimic: #A6E05A;
  --mimic-soft: #2A4410;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin: 0; }
h2 { font-size: clamp(34px, 5vw, 56px); }
.lede { color: var(--muted); font-size: 18px; max-width: 560px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--on-accent); }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
header.site.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .logo-bg { fill: #101412; stroke: var(--line); stroke-width: 2; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; position: relative; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(48px, 9.6vw, 124px); text-transform: uppercase; letter-spacing: -.035em; line-height: .92; }
.hero h1 .mark { position: relative; white-space: nowrap; }
.hero h1 .mark::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .26em;
  background: var(--accent); z-index: -1; border-radius: 4px; transform: skewX(-8deg);
}
.hero h1 .soft { color: var(--muted); }
.hero .lede { margin: 26px 0 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 36px; color: var(--muted); font-size: 14px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--ink); }


/* ---------- Sections ---------- */
section.block { padding: 104px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: 48px; }
.section-head .lede { margin: 12px 0 0; }

/* ---------- Apps ---------- */
.apps { display: grid; gap: 28px; }
.app {
  --c: var(--gramrai); --soft: var(--gramrai-soft);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow);
}
.app.mimic { --c: var(--mimic); --soft: var(--mimic-soft); }
.app-body { padding: 48px; display: flex; flex-direction: column; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.app-id img { width: 64px; height: 64px; border-radius: 16px; }
.app-id h3 { font-size: 28px; }
.app-id .cat { font-size: 14px; color: var(--muted); margin-top: 4px; }
.app h4 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 14px; }
.app h4 em { font-style: normal; color: var(--c); }
.app p { color: var(--muted); margin: 0 0 24px; }
.features { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.features li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; }
.features li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23101412' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.app-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.play {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px; border-radius: 14px;
  background: var(--ink); color: var(--paper); text-decoration: none; transition: transform .15s ease;
}
.play:hover { transform: translateY(-1px); }
.play svg { width: 24px; height: 24px; }
.play small { display: block; font-size: 11px; line-height: 1.1; opacity: .75; letter-spacing: .02em; }
.play b { display: block; font-size: 17px; line-height: 1.2; font-weight: 600; }
.play[aria-disabled="true"] { background: transparent; color: var(--ink); border: 1.5px dashed var(--line); cursor: default; }
.play[aria-disabled="true"]:hover { transform: none; }
.legal { display: flex; gap: 16px; font-size: 14px; }
.legal a { color: var(--muted); text-underline-offset: 3px; }
.legal a:hover { color: var(--ink); }

/* Screenshot deck: front card shuffles to the back every few seconds */
.deck {
  background: var(--soft); position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 48px 24px 36px; min-height: 600px;
}
.deck::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 28%, transparent), transparent 62%);
  animation: breathe 6s ease-in-out infinite;
}
.deck-stage { position: relative; width: 240px; aspect-ratio: 9 / 16; animation: float 6s ease-in-out infinite; }
.deck-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 24px; box-shadow: var(--shadow); background: var(--card);
  transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .9s ease, filter .9s ease;
}
.deck-stage img[data-pos="0"] { transform: none; z-index: 3; opacity: 1; }
.deck-stage img[data-pos="1"] { transform: translateX(52%) rotate(8deg) scale(.84); z-index: 2; opacity: .95; filter: brightness(.96); }
.deck-stage img[data-pos="2"] { transform: translateX(-52%) rotate(-8deg) scale(.84); z-index: 1; opacity: .95; filter: brightness(.96); }
.deck-stage img[data-pos="3"] { transform: translateY(10%) scale(.7); z-index: 0; opacity: 0; }
.deck-foot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.deck-caption { font-weight: 600; font-size: 15px; min-height: 1.5em; transition: opacity .3s ease; }
.deck-dots { display: flex; gap: 6px; }
.deck-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 25%, transparent); transition: width .3s ease, background .3s ease;
}
.deck-dots button[aria-current="true"] { width: 24px; background: var(--c); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes breathe { 0%, 100% { scale: 1; opacity: .9; } 50% { scale: 1.08; opacity: 1; } }

/* ---------- About ---------- */
.about { background: var(--paper-2); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.about-grid .lede { margin-top: 20px; }
.values { display: grid; gap: 16px; }
.value { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.value .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.value .ico svg { width: 26px; height: 26px; }
.value h3 { font-size: 22px; margin-bottom: 6px; letter-spacing: -.01em; }
.value p { margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding: 104px 0; }
.contact-card {
  background: var(--band); color: var(--on-band); border-radius: 36px; padding: clamp(40px, 7vw, 88px);
  position: relative; overflow: hidden; text-align: center;
}
.contact-card::before {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,194,61,.35), transparent 65%);
}
.contact-card h2 { font-size: clamp(38px, 6vw, 72px); position: relative; }
.contact-card p { color: var(--on-band-muted); max-width: 520px; margin: 18px auto 34px; font-size: 18px; position: relative; }
.contact-card .btn { position: relative; }
.contact-card .mail { display: block; margin-top: 18px; color: var(--on-band-muted); font-size: 15px; position: relative; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h5 { margin: 0 0 12px; font: 600 13px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot .brand { color: var(--ink); margin-bottom: 12px; }
.copy { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: 500 13px var(--body); cursor: pointer; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .deck::before, .deck-stage { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .app.mimic .app-body { order: 0; }
  .deck { min-height: 520px; padding: 40px 20px 28px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links .btn { margin-top: 14px; min-height: 48px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 56px; }
  section.block, .contact { padding: 72px 0; }
  .app-body { padding: 28px 22px; }
  .features { grid-template-columns: 1fr; }
  .deck { min-height: 440px; }
  .deck-stage { width: 190px; }
  .value { grid-template-columns: 1fr; padding: 22px; }
  .foot { grid-template-columns: 1fr; }
}

/* ---------- App pages ---------- */
.page-gramrai { --c: var(--gramrai); --soft: var(--gramrai-soft); }
.page-mimic { --c: var(--mimic); --soft: var(--mimic-soft); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.page-hero { padding: 40px 0 88px; border-bottom: 1px solid var(--line); }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.page-hero .app-id { margin-bottom: 24px; }
.page-hero .app-id img { width: 72px; height: 72px; border-radius: 18px; }
.page-hero .app-id .cat { margin-top: 0; font-size: 15px; }
.page-hero h1 { font-size: clamp(44px, 6.6vw, 84px); line-height: .98; letter-spacing: -.03em; }
.page-hero h1 em { font-style: normal; color: var(--c); }
.page-hero .lede { margin: 22px 0 30px; font-size: 19px; }
.page-hero .deck { border-radius: 32px; min-height: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-actions .meta { font-size: 14px; color: var(--muted); }

.frows { display: grid; gap: 28px; }
.frow {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow);
}
.frow-text { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.frow-text .num { font: 800 15px var(--display); color: var(--c); letter-spacing: .04em; margin-bottom: 12px; }
.frow-text h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; }
.frow-text p { color: var(--muted); margin: 16px 0 0; font-size: 17px; }
.frow-text .features { margin: 22px 0 0; grid-template-columns: 1fr; }
.frow-shot { background: var(--soft); display: grid; place-items: center; padding: 44px 24px; }
.frow-shot img { width: 100%; max-width: 270px; border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 9 / 16; object-fit: cover; }
.frow:nth-child(even) .frow-text { order: 2; }

.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tool .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); color: var(--c); display: grid; place-items: center; margin-bottom: 16px; }
.tool .ico svg { width: 24px; height: 24px; }
.tool h3 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 8px; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c); color: var(--card); font: 800 20px var(--display); margin-bottom: 18px;
}
.steps h3 { font-size: 21px; letter-spacing: -.01em; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

.faq { display: grid; gap: 12px; max-width: 880px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 0 24px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 36px 22px 0; position: relative;
  font: 600 18px/1.4 var(--body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  font: 400 26px/1 var(--body); color: var(--muted); transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 22px; color: var(--muted); }

.learn-more { font-weight: 600; font-size: 15px; color: var(--ink); text-underline-offset: 4px; }
.learn-more:hover { color: var(--c); }

/* 404 */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: 72px; }
.notfound > div { width: 100%; }
.notfound h1 { font-size: clamp(88px, 18vw, 180px); line-height: 1; letter-spacing: -.05em; }
.notfound p { color: var(--muted); font-size: 18px; margin: 12px 0 28px; }
.notfound .hero-ctas { justify-content: center; }

@media (max-width: 960px) {
  .page-hero-grid, .frow { grid-template-columns: 1fr; }
  .frow:nth-child(even) .frow-text { order: 0; }
  .tools { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .page-hero .deck { min-height: 500px; }
}
@media (max-width: 720px) {
  .page-hero { padding: 24px 0 56px; }
  .frow-text { padding: 32px 22px; }
  .frow-shot { padding: 32px 20px; }
  .frow-shot img { max-width: 220px; }
  .tools { grid-template-columns: 1fr; }
  .faq details { padding: 0 18px; }
  .faq summary { font-size: 16px; }
}
