/* Thadam landing — colours from the panda-hiker logo (see app/DESIGN.md) */
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Noto Sans Tamil"; src: url(/fonts/noto-sans-tamil.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0B80-0BFF; }

:root {
  --ground: #f5f3ee; --surface: #fff; --surface-2: #efebe3; --line: #e2dccf;
  --ink: #1f1b16; --ink-2: #554d43; --ink-3: #72695e;
  --leaf: #4d7419; --leaf-strong: #3a5812; --leaf-400: #7c9c3d; --leaf-soft: #e8efd9;
  --hat: #e8cca2; --hat-soft: #f5e9d6; --boot: #604c38;
  --tough: #a3341e; --tough-bg: #f8e1dc; --warn: #94600f; --warn-bg: #f8ead2;
  --forest: #1c2a0d; --on-forest: #eef3e4;
  --contour: rgba(77, 116, 25, .12);
  --nav-bg: rgba(245, 243, 238, .74);
  --shadow: 0 1px 2px rgba(31,27,22,.06), 0 10px 30px rgba(31,27,22,.08);
  --shadow-lift: 0 2px 6px rgba(31,27,22,.08), 0 24px 60px rgba(31,27,22,.16);
  --r: 24px; --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #12160d; --surface: #1b2114; --surface-2: #232a1a; --line: #2f3724;
    --ink: #f0efe6; --ink-2: #c8c6b8; --ink-3: #a19f90;
    --leaf: #a6c46e; --leaf-strong: #c0d895; --leaf-400: #8fae55; --leaf-soft: #263214;
    --hat-soft: #2e2617; --tough-bg: #3a1c14; --tough: #f0a08c; --warn-bg: #352812; --warn: #e8b766;
    --forest: #0c1107; --contour: rgba(166, 196, 110, .1); --nav-bg: rgba(18, 22, 13, .72);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lift: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 100%/1.55 Manrope, "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
[lang="ta"] { font-family: "Noto Sans Tamil", Manrope, system-ui, sans-serif; }
img, svg { display: block; max-width: 100%; }
a { color: var(--leaf); text-underline-offset: .18em; }
h1, h2, h3, p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 420px) { .wrap { width: calc(100% - 2rem); } }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--ground); padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { left: 8px; }

/* type */
.display { font-size: clamp(2.4rem, 5.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; text-wrap: balance; }
.h2 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.06; letter-spacing: -.032em; font-weight: 800; text-wrap: balance; max-width: 18ch; }
.h2.center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--leaf); margin-bottom: .9rem; }
.eyebrow [lang="ta"] { text-transform: none; letter-spacing: 0; font-size: 1.05em; }
.light { color: var(--hat) !important; }
.lead.light { color: rgba(238,243,228,.78) !important; margin-top: 1rem; }

/* buttons: feedback on press */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: .8rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; text-decoration: none; cursor: pointer; border: 0; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .2s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn-primary { background: #3a5812; color: #fff; box-shadow: 0 6px 20px rgba(58,88,18,.28); }
.btn-primary:hover { background: #4d7419; box-shadow: 0 10px 28px rgba(58,88,18,.34); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-block { width: 100%; }

/* retired notice (shown when redirected from the old web app) */
.retired { position: relative; z-index: 60; background: var(--hat-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.retired p { width: min(1180px, 100% - 5rem); margin-inline: auto; padding: .75rem 0; font-size: .95rem; }
.retired-x { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.retired-x:hover { background: rgba(0,0,0,.06); }

/* nav: translucent material */
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 9px; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-ta { color: var(--ink-3); font-weight: 600; }
.nav nav { display: flex; align-items: center; gap: .2rem; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: .55rem .85rem; border-radius: 999px; white-space: nowrap; transition: background-color .2s, transform .3s var(--ease); }
.nav nav a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav nav a:active { transform: scale(.95); }
.nav .nav-cta { background: #3a5812; color: #fff; margin-left: .3rem; }
.nav .nav-cta:hover { background: #4d7419; }
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .brand-ta { display: none; }
}

/* hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 7vw, 6rem); isolation: isolate; }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--contour); z-index: -1; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -20vmax; top: -25vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(232,204,162,.55), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy .lead { margin-top: 1.3rem; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.meta { margin-top: 1rem; font-size: .88rem; color: var(--ink-3); font-weight: 600; }
.ios-note { margin-top: .8rem; padding: .7rem 1rem; border-radius: 14px; background: var(--hat-soft); font-size: .92rem; max-width: 30em; }

.hero-art { position: relative; height: clamp(460px, 52vw, 640px); }
.phone { position: absolute; margin: 0; width: clamp(200px, 21vw, 290px); aspect-ratio: 780 / 1688; padding: 9px; border-radius: clamp(30px, 3.4vw, 46px); background: #12150e; box-shadow: var(--shadow-lift), inset 0 0 0 1.5px rgba(255,255,255,.08); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: clamp(22px, 2.7vw, 37px); }
.phone-front { left: 50%; top: 0; transform: translateX(-28%) rotate(2deg); z-index: 2; }
.phone-back { left: 50%; top: 9%; transform: translateX(-98%) rotate(-7deg); opacity: .96; }
.chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .95rem; border-radius: 999px; font-size: .88rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); box-shadow: var(--shadow); white-space: nowrap; }
.chip b { font-weight: 800; }
.chip-a { left: 2%; top: 64%; }
.chip-b { right: -2%; top: 20%; }
.chip-c { right: 4%; bottom: 6%; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-ok { background: #4d7419; box-shadow: 0 0 0 4px rgba(77,116,25,.18); }
.dot-warn { background: #c0752a; box-shadow: 0 0 0 4px rgba(192,117,42,.2); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192,117,42,.5); } 100% { box-shadow: 0 0 0 10px rgba(192,117,42,0); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; display: grid; justify-items: center; }
  .cta { justify-content: center; }
  .hero-art { height: clamp(420px, 108vw, 600px); max-width: 560px; width: 100%; margin-inline: auto; }
  .phone { width: clamp(180px, 46vw, 260px); }
  .chip-b { right: 0; }
}
@media (max-width: 420px) {
  .cta { width: 100%; }
  .cta .btn { width: 100%; }
  .chip { font-size: .78rem; padding: .5rem .75rem; }
  .chip-a { left: 0; }
}

/* sections */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.gaps { padding-top: clamp(2rem, 5vw, 4rem); }
.gap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.5rem; }
.gap { background: var(--surface); border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow); }
.gap-n { display: inline-block; font-weight: 800; font-size: .85rem; color: var(--leaf); background: var(--leaf-soft); padding: .3rem .65rem; border-radius: 999px; margin-bottom: 1.1rem; font-variant-numeric: tabular-nums; }
.gap h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.15; letter-spacing: -.02em; margin-bottom: .7rem; }
.gap p { color: var(--ink-2); }
@media (max-width: 760px) { .gap-grid { grid-template-columns: 1fr; } }

/* bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2.6rem; }
.tile { position: relative; background: var(--surface); border-radius: var(--r); padding: 1.6rem; box-shadow: var(--shadow); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile h3 { font-size: 1.18rem; letter-spacing: -.015em; line-height: 1.2; margin: .9rem 0 .45rem; }
.tile p { color: var(--ink-2); font-size: .97rem; }
.ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--leaf-soft); color: var(--leaf); }
.ico svg { width: 24px; height: 24px; }
.ico-warn { background: var(--warn-bg); color: var(--warn); }
.ico-lang { display: flex; gap: 1px; font-size: 1.05rem; }
.tile-hero { grid-column: span 2; grid-row: span 2; display: grid; grid-template-rows: auto 1fr; background: linear-gradient(160deg, var(--leaf-soft), var(--surface) 60%); padding-bottom: 0; }
.tile-hero h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 0; }
.tile-phone { margin: 1.4rem auto 0; width: min(270px, 70%); align-self: end; aspect-ratio: 780 / 1100; overflow: hidden; border-radius: 34px 34px 0 0; padding: 8px 8px 0; background: #12150e; }
.tile-phone img { width: 100%; height: auto; border-radius: 27px 27px 0 0; }
.tile-ar { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: center; background: #11170b; color: #eef3e4; }
.tile-ar h3 { color: #fff; margin-top: .6rem; }
.tile-ar p { color: rgba(238,243,228,.75); }
.new { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #11170b; background: var(--hat); padding: .25rem .6rem; border-radius: 999px; }
.ar-scene { position: relative; height: 100%; min-height: 220px; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #6e8a92 0%, #9fb3a2 38%, #3d5a26 39%, #263c15 70%, #1a290e); }
.ar-scene::before { content: ""; position: absolute; inset: 38% 0 0; background: radial-gradient(60% 50% at 50% 0%, rgba(255,255,255,.12), transparent); }
.ar-horizon { position: absolute; left: 0; right: 0; top: 38%; border-top: 1px dashed rgba(255,255,255,.45); }
.ar-sign { position: absolute; display: grid; padding: .45rem .7rem; border-radius: 12px; background: rgba(255,255,255,.92); color: #1f1b16; font-size: .74rem; line-height: 1.25; box-shadow: 0 6px 18px rgba(0,0,0,.3); animation: bob 5s ease-in-out infinite; }
.ar-sign b { font-size: .82rem; }
.ar-sign::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 26px; background: rgba(255,255,255,.75); }
.ar-sign.warn { background: #fbecd2; color: #7f4f05; }
.s1 { left: 10%; top: 14%; }
.s2 { right: 9%; top: 6%; animation-delay: -1.6s; }
.s3 { left: 38%; top: 48%; animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-5px); } }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile-hero { grid-row: auto; } }
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .tile-hero, .tile-ar { grid-column: auto; }
  .tile-ar { grid-template-columns: 1fr; }
}
.promise { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 2rem; font-weight: 700; color: var(--ink-2); text-align: center; }
.promise svg { width: 20px; height: 20px; color: var(--leaf); flex: none; }

/* profile */
.profile-sec { background: var(--forest); color: var(--on-forest); }
.profile-sec .h2 { color: #fff; max-width: 20ch; }
.profile { margin: 2.6rem 0 0; background: rgba(255,255,255,.04); border: 1px solid rgba(238,243,228,.1); border-radius: calc(var(--r) + 4px); padding: clamp(1.2rem, 3vw, 2rem); }
.readout { display: flex; gap: 1.6rem; margin-bottom: 1.2rem; font-variant-numeric: tabular-nums; color: rgba(238,243,228,.7); }
.readout b { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.8rem); letter-spacing: -.03em; font-weight: 800; }
.plot { position: relative; height: clamp(150px, 26vw, 280px); }
.plot svg { width: 100%; height: 100%; overflow: visible; }
.p-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 7px rgba(196,217,154,.28), 0 4px 14px rgba(0,0,0,.4); will-change: transform; }
.profile-foot { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .88rem; color: rgba(238,243,228,.6); }

/* trails */
.trail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.4rem; }
.trail { background: var(--surface); border-radius: var(--r); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); }
.trail-top { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pill { font-size: .8rem; font-weight: 800; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.tough { background: var(--tough-bg); color: var(--tough); }
.pill.easy { background: var(--leaf-soft); color: var(--leaf); }
.trail h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.025em; }
.where { color: var(--ink-3); margin-top: .2rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.4rem 0; border-block: 1px solid var(--line); }
.stats div { padding: .9rem .6rem .9rem 0; }
.stats div + div { padding-left: .8rem; border-left: 1px solid var(--line); }
.stats dt { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.stats dd { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { font-size: .93rem; color: var(--ink-2); }
.more-trails { margin-top: 1.6rem; color: var(--ink-3); text-align: center; }
@media (max-width: 820px) { .trail-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(3) { border-left: 0; padding-left: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* install */
.install { background: linear-gradient(180deg, transparent, var(--surface-2)); }
.install-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.steps { display: grid; gap: 1rem; margin-top: 2.2rem; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; }
.steps li > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); font-weight: 800; }
.steps h3 { font-size: 1.15rem; letter-spacing: -.015em; margin-bottom: .2rem; }
.steps p { color: var(--ink-2); }
.why { margin-top: 1.8rem; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.why summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.why summary::-webkit-details-marker { display: none; }
.why summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .4s var(--ease); }
.why[open] summary::after { transform: rotate(225deg); }
.why p { padding: 0 1.2rem 1.1rem; color: var(--ink-2); }
.dl-card { position: sticky; top: 90px; background: var(--surface); border-radius: calc(var(--r) + 4px); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-lift); text-align: center; }
.dl-card img { margin: 0 auto 1rem; border-radius: 18px; }
.dl-card h3 { font-size: 1.4rem; letter-spacing: -.02em; }
.dl-sub { color: var(--ink-3); margin: .2rem 0 1.3rem; }
.dl-meta { display: grid; gap: .1rem; margin: 1.3rem 0; text-align: left; }
.dl-meta div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.dl-meta dt { color: var(--ink-3); }
.dl-meta dd { font-weight: 700; text-align: right; }
.sha { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; align-items: center; text-align: left; background: var(--surface-2); border-radius: 14px; padding: .8rem .9rem; }
.sha span { font-size: .75rem; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); grid-column: 1 / -1; }
.sha code { font: 600 .74rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; color: var(--ink-2); }
.copy { border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: .82rem; font-weight: 700; padding: .45rem .8rem; border-radius: 999px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.copy:active { transform: scale(.95); }
.dl-note { margin-top: 1rem; font-size: .85rem; color: var(--ink-3); }
@media (max-width: 880px) { .install-grid { grid-template-columns: 1fr; } .dl-card { position: static; max-width: 460px; width: 100%; margin-inline: auto; } }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 2.6rem 3rem; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2rem; align-items: start; }
.foot-brand p { margin-top: .7rem; color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.credits { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-3); }
@media (max-width: 640px) { .foot-in { grid-template-columns: 1fr; } }

/* reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity .7s ease var(--d, 0ms), transform 1s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .tile:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chip { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.display .nb { display: inline-block; }

@media (max-width: 560px) {
  .phone-front { transform: translateX(-14%) rotate(2deg); }
  .phone-back { transform: translateX(-86%) rotate(-6deg); top: 8%; }
  .chip-a { top: 70%; }
}
