/* ==========================================================================
   Ghatiya Cam — site stylesheet
   --------------------------------------------------------------------------
   Every value below is a direct port of the app's design tokens
   (ghatiya-cam-design-handoff/tokens/DESIGN_TOKENS.json, v1.0.0) and the
   type scale in docs/TYPOGRAPHY_SPEC.md. This is the same visual system the
   Android app renders — not a second identity. Do not introduce a colour,
   radius, or type size that is not in the token file.

   Token -> CSS naming: color.brand.pink -> --color-brand-pink, etc.
   Android dp/sp map 1:1 to CSS px here; the display scale is additionally
   allowed to grow above its app size on wide viewports via clamp(), because
   the app's 360 dp base viewport is not the site's.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — self-hosted.
   No request ever leaves this origin. That is deliberate: a site whose main
   job is a privacy policy must not hand every visitor's IP to a font CDN
   before they have read it. These are byte-identical to the families the app
   bundles, converted .ttf -> .woff2.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow_condensed_semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow_condensed_bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter_regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter_semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter_bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* color.background */
  --color-background-primary: #0d1209;
  --color-background-secondary: #171d11;

  /* color.surface */
  --color-surface-dark: #202718;
  --color-surface-dark-raised: #2a3320;
  --color-surface-cream: #fff7d1;
  --color-surface-cream-pressed: #efe6be;

  /* color.brand / accent */
  --color-brand-pink: #ff3d98;
  --color-brand-pink-pressed: #e92f83;
  --color-accent-lime: #c8ff00;

  /* color.text */
  --color-text-primary-dark: #f6f3ea;
  --color-text-primary-light: #11140c;
  --color-text-secondary: #d7c2c9;
  --color-text-disabled: #7c8472;
  --color-text-on-pink: #11140c;
  --color-text-on-lime: #11140c;

  /* color.outline */
  --color-outline-dark: #57434c;
  --color-outline-subtle: #3a4230;
  --color-outline-emphasis: #ff3d98;
  --color-outline-focus: #c8ff00;

  /* color.status */
  --color-status-error: #ff5a63;

  /* color.scrim */
  --color-scrim-selected-chip: rgba(255, 61, 152, 0.12);

  /* typography.family */
  --font-display: "Barlow Condensed", "Roboto Condensed", sans-serif-condensed,
    system-ui, sans-serif;
  --font-ui: "Inter", "Roboto", "Noto Sans", system-ui, -apple-system, sans-serif;

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-screen-h: 20px;
  --space-section: 24px;
  --space-card: 12px;

  /* radius */
  --radius-small: 12px;
  --radius-button: 16px;
  --radius-card: 16px;
  --radius-card-large: 20px;
  --radius-sheet: 24px;
  --radius-pill: 999px;

  /* stroke */
  --stroke-default: 1px;
  --stroke-emphasis: 2px;

  /* elevation */
  --elevation-low: 0 1px 2px rgba(0, 0, 0, 0.35);
  --elevation-sheet: 0 4px 12px rgba(0, 0, 0, 0.4);

  /* opacity */
  --opacity-disabled: 0.38;
  --opacity-body-on-cream: 0.72;
  --opacity-eyebrow-on-cream: 0.72; /* handoff says 0.50; see DECISIONS.md D-030 */

  /* size.touchTarget */
  --touch-min: 48px;
  --touch-comfortable: 56px;

  /* motion */
  --motion-press: 90ms;
  --motion-quick: 150ms;
  --motion-standard: 220ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);
  --ease-pop: cubic-bezier(0.34, 1.32, 0.64, 1);
  --press-scale: 0.97;

  /* Site-only layout values — not app tokens, the app has no wide viewport. */
  --content-max: 960px;
  --prose-max: 68ch;
  --section-pad-block: clamp(56px, 9vw, 104px);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--color-background-primary);
  color: var(--color-text-primary-dark);
  font-family: var(--font-ui);
  /* typography.style.bodyLarge — 16/24 */
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-brand-pink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--motion-quick) var(--ease-standard);
}

a:hover {
  color: var(--color-accent-lime);
}

/* Lime focus ring — color.outline.focus. Visible on both grounds. */
:focus-visible {
  outline: var(--stroke-emphasis) solid var(--color-outline-focus);
  outline-offset: 3px;
  border-radius: var(--space-1);
}

/* --------------------------------------------------------------------------
   Typography scale — typography.style.* from the token file
   -------------------------------------------------------------------------- */

.t-display-large,
.t-display-medium,
.t-heading-large,
.t-heading-medium {
  font-family: var(--font-display);
  margin: 0;
}

/* displayLarge 44/44/-0.5 — allowed to scale up on wide viewports */
.t-display-large {
  font-weight: 700;
  font-size: clamp(38px, 8vw, 64px);
  line-height: 1;
  letter-spacing: -0.5px;
}

/* displayMedium 36/38/-0.4 */
.t-display-medium {
  font-weight: 700;
  font-size: clamp(30px, 5.5vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.4px;
}

/* headingLarge 30/34/-0.2 */
.t-heading-large {
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.14;
  letter-spacing: -0.2px;
}

/* headingMedium 24/28/-0.1 */
.t-heading-medium {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.17;
  letter-spacing: -0.1px;
}

/* title 19/24/0 */
.t-title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.26;
  margin: 0;
}

/* bodyLarge 16/24/0 */
.t-body-large {
  font-size: 16px;
  line-height: 1.5;
}

/* body 14/20/0 */
.t-body {
  font-size: 14px;
  line-height: 1.43;
}

/* label 12/16/0.2 — eyebrows, badges, meta */
.t-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.34;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-screen-h);
}

.section {
  padding-block: var(--section-pad-block);
}

.section--secondary {
  background: var(--color-background-secondary);
}

.section--cream {
  background: var(--color-surface-cream);
  color: var(--color-text-primary-light);
}

.section--cream a:not(.btn) {
  color: var(--color-text-primary-light);
  text-decoration-color: var(--color-brand-pink);
  text-decoration-thickness: var(--stroke-emphasis);
}

.section--cream a:not(.btn):hover {
  color: var(--color-brand-pink-pressed);
}

.section__eyebrow {
  color: var(--color-brand-pink);
  margin: 0 0 var(--space-3);
}

.section--cream .section__eyebrow {
  color: var(--color-text-primary-light);
  opacity: var(--opacity-eyebrow-on-cream);
}

.section__lead {
  max-width: var(--prose-max);
  margin: var(--space-4) 0 0;
  color: var(--color-text-secondary);
}

.section--cream .section__lead {
  color: var(--color-text-primary-light);
  opacity: var(--opacity-body-on-cream);
}

/* Skip link — visible only on keyboard focus. */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(-1 * var(--touch-comfortable) - var(--space-4));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-button);
  background: var(--color-accent-lime);
  color: var(--color-text-on-lime);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--motion-quick) var(--ease-standard);
}

.skip-link:focus-visible {
  top: var(--space-4);
  color: var(--color-text-on-lime);
}

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 18, 9, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: var(--stroke-default) solid var(--color-outline-subtle);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--touch-comfortable);
  padding-block: var(--space-2);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-primary-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.2px;
  line-height: 1;
}

.brand-lockup:hover {
  color: var(--color-text-primary-dark);
}

.brand-lockup img {
  width: 32px;
  height: 32px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding-inline: var(--space-3);
  border-radius: var(--radius-small);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.site-header__nav a:hover {
  color: var(--color-text-primary-dark);
  background: var(--color-scrim-selected-chip);
}

/* --------------------------------------------------------------------------
   Buttons — radius.button, size.component.buttonLg, motion.pressScale
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-comfortable);
  padding: var(--space-3) var(--space-6);
  border: var(--stroke-emphasis) solid transparent;
  border-radius: var(--radius-button);
  /* typography.style.button — 16/20/0.1, weight 700 */
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.1px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--motion-quick) var(--ease-standard),
    transform var(--motion-press) var(--ease-standard),
    color var(--motion-quick) var(--ease-standard);
}

.btn:active {
  transform: scale(var(--press-scale));
}

.btn--primary {
  background: var(--color-brand-pink);
  color: var(--color-text-on-pink);
}

.btn--primary:hover {
  background: var(--color-brand-pink-pressed);
  color: var(--color-text-on-pink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-outline-subtle);
  color: var(--color-text-primary-dark);
}

.btn--ghost:hover {
  border-color: var(--color-brand-pink);
  color: var(--color-text-primary-dark);
  background: var(--color-scrim-selected-chip);
}

.btn--on-cream {
  background: var(--color-text-primary-light);
  color: var(--color-surface-cream);
}

.btn--on-cream:hover {
  background: #23281c;
  color: var(--color-surface-cream);
}

/* Pre-launch "coming soon" state.
   Deliberately NOT opacity.disabled: at 0.38 on brand pink the label measures
   2.02:1, which is unreadable. This is a full-contrast static badge instead,
   and it is a <span>, not a link, because there is nowhere to go yet. */
.btn--soon {
  background: transparent;
  border-color: var(--color-brand-pink);
  color: var(--color-text-primary-dark);
  cursor: default;
}

.btn--soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-lime);
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 12vw, 128px);
}

/* Pink glow behind the hero — the app's brand pink at low alpha, not a new colour. */
.hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  top: -30%;
  width: min(760px, 130%);
  aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(
    circle,
    rgba(255, 61, 152, 0.18) 0%,
    rgba(255, 61, 152, 0) 62%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

.hero__mark {
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-6);
}

.hero__title .accent {
  color: var(--color-brand-pink);
}

.hero__tagline {
  max-width: 54ch;
  margin: var(--space-5) 0 0;
  color: var(--color-text-secondary);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
}

.hero__note {
  margin: var(--space-5) 0 0;
  color: var(--color-text-secondary);
}

/* Lime "on device" pill — accent.lime is the app's one accent, used sparingly. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-accent-lime);
  color: var(--color-text-on-lime);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.pill--outline {
  background: transparent;
  border: var(--stroke-default) solid var(--color-outline-subtle);
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   Feature cards — radius.card.large, surface.dark
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-10);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  padding: var(--space-6);
  border: var(--stroke-default) solid var(--color-outline-subtle);
  border-radius: var(--radius-card-large);
  background: var(--color-surface-dark);
  box-shadow: var(--elevation-low);
}

.card__title {
  margin: 0 0 var(--space-3);
}

.card__body {
  margin: 0;
  color: var(--color-text-secondary);
}

.card__index {
  display: inline-block;
  margin-bottom: var(--space-4);
  color: var(--color-brand-pink);
}

/* --------------------------------------------------------------------------
   Privacy summary block (cream)
   -------------------------------------------------------------------------- */

.promise-list {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.promise-list li {
  position: relative;
  padding-inline-start: var(--space-8);
  max-width: var(--prose-max);
}

/* Lime tick drawn in CSS — no icon font on this site. */
.promise-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  width: 12px;
  height: 7px;
  border-inline-start: 3px solid var(--color-brand-pink);
  border-bottom: 3px solid var(--color-brand-pink);
  rotate: -45deg;
}

.promise-list strong {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-list {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.contact-list dt,
.contact-list .contact-list__label {
  color: var(--color-text-secondary);
}

.contact-list__value {
  margin: var(--space-1) 0 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: var(--stroke-default) solid var(--color-outline-subtle);
  padding-block: var(--space-10);
  background: var(--color-background-primary);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding-inline: var(--space-3);
  border-radius: var(--radius-small);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--color-text-primary-dark);
  background: var(--color-scrim-selected-chip);
}

.site-footer__legal {
  margin: var(--space-5) 0 0;
  color: var(--color-text-secondary);
}

.site-footer__disclaimer {
  margin: var(--space-5) 0 0;
  max-width: var(--prose-max);
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   Legal document pages (privacy policy)
   -------------------------------------------------------------------------- */

.doc {
  padding-block: clamp(40px, 7vw, 72px);
}

.doc__header {
  padding-bottom: var(--space-8);
  border-bottom: var(--stroke-default) solid var(--color-outline-subtle);
  margin-bottom: var(--space-8);
}

.doc__meta {
  margin: var(--space-4) 0 0;
  color: var(--color-text-secondary);
}

.doc__body {
  max-width: var(--prose-max);
}

.doc__body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.14;
  letter-spacing: -0.2px;
  margin: var(--space-12) 0 var(--space-4);
  scroll-margin-top: calc(var(--touch-comfortable) + var(--space-4));
}

.doc__body h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.26;
  margin: var(--space-8) 0 var(--space-3);
}

.doc__body p,
.doc__body li {
  color: var(--color-text-secondary);
}

.doc__body p {
  margin: 0 0 var(--space-4);
}

.doc__body ul {
  margin: 0 0 var(--space-4);
  padding-inline-start: var(--space-5);
}

.doc__body li {
  margin-bottom: var(--space-2);
}

.doc__body strong {
  color: var(--color-text-primary-dark);
  font-weight: 700;
}

/* Callout — used for the on-device promise and the entertainment disclaimer. */
.callout {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border: var(--stroke-default) solid var(--color-outline-subtle);
  border-inline-start: var(--space-1) solid var(--color-brand-pink);
  border-radius: var(--radius-card);
  background: var(--color-surface-dark);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout--lime {
  border-inline-start-color: var(--color-accent-lime);
}

/* Table of contents */
.toc {
  margin: 0 0 var(--space-8);
  padding: var(--space-5) var(--space-6);
  border: var(--stroke-default) solid var(--color-outline-subtle);
  border-radius: var(--radius-card);
  background: var(--color-background-secondary);
}

.toc h2 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3);
}

.toc ol {
  margin: 0;
  padding-inline-start: var(--space-5);
  columns: 2;
  column-gap: var(--space-6);
}

@media (max-width: 599px) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
  break-inside: avoid;
}

.toc a {
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   SDK disclosure table
   Scrolls inside its own container so the page body never scrolls sideways.
   -------------------------------------------------------------------------- */

.table-scroll {
  margin: var(--space-6) 0;
  overflow-x: auto;
  border: var(--stroke-default) solid var(--color-outline-subtle);
  border-radius: var(--radius-card);
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.43;
}

table.data th,
table.data td {
  padding: var(--space-3) var(--space-4);
  text-align: start;
  vertical-align: top;
  border-bottom: var(--stroke-default) solid var(--color-outline-subtle);
}

table.data thead th {
  background: var(--color-surface-dark);
  color: var(--color-text-primary-dark);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

table.data tbody td {
  color: var(--color-text-secondary);
}

table.data tbody th {
  color: var(--color-text-primary-dark);
  font-weight: 600;
  white-space: nowrap;
}

table.data tbody tr:last-child th,
table.data tbody tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 60vh;
  padding-block: var(--space-12);
}
