/* Jarviz landing — built from Figma "Jarviz-Web" (Desktop 1 light / Desktop 2 dark), 1440 × 900 */

:root {
  --bg: #fffcf0;          /* BG Color */
  --text: #161d33;        /* Text Color Dark */
  --accent: #2f3c6b;      /* Primary Accent (tagline) */
  --muted: rgba(47, 60, 107, 0.85); /* prompt list */
  /* Figma uses "Bree THA var" = Bree Thai Variable (TypeTogether), loaded from
     Adobe Fonts kit sfx7abh (see index.html): weights 100–800, upright + oblique.
     Plain "bree" (also in the kit) is the fallback. */
  --font: "bree-thai-variable", "bree", "Trebuchet MS", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #161d33;
  --text: #fffcf0;
  --accent: #fffcf0;
  --muted: rgba(255, 253, 246, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] { color-scheme: dark; }

/* ---------- Theme switch (see site.js) ----------
   The new theme is revealed through a growing circle with a soft edge.
   --vt-r is animated from JS; --vt-x/--vt-y/--vt-feather are set per click. */
@property --vt-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; transform-origin: var(--vt-x, 50%) var(--vt-y, 50%); }
::view-transition-new(root) {
  z-index: 2;
  -webkit-mask-image: radial-gradient(circle at var(--vt-x, 50%) var(--vt-y, 50%),
    #000 calc(var(--vt-r) - var(--vt-feather, 120px)),
    rgba(0, 0, 0, .55) calc(var(--vt-r) - var(--vt-feather, 120px) * .45),
    transparent var(--vt-r));
          mask-image: radial-gradient(circle at var(--vt-x, 50%) var(--vt-y, 50%),
    #000 calc(var(--vt-r) - var(--vt-feather, 120px)),
    rgba(0, 0, 0, .55) calc(var(--vt-r) - var(--vt-feather, 120px) * .45),
    transparent var(--vt-r));
}

/* ---------- Compass cursor (mouse users, motion allowed) ---------- */
.pointer-compass, .pointer-trail-dot { display: none; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :root:has(.pointer-compass[data-visible]),
  :root:has(.pointer-compass[data-visible]) * { cursor: none; }

  .pointer-compass {
    position: fixed;
    inset: 0 auto auto 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1.5px solid;
    border-radius: 50%;
    color: var(--accent);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 180ms, scale 220ms;
  }
  .pointer-compass[data-visible] { opacity: .9; }
  .pointer-compass[data-action] {
    scale: 1.4;
    opacity: 1;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
  }
  .pointer-compass { transition: opacity 180ms, scale 320ms cubic-bezier(.2,.9,.3,1.3), background-color 220ms; }
  .pointer-compass::before {
    content: "";
    width: 10px;
    height: 16px;
    background: linear-gradient(currentColor 50%, color-mix(in srgb, currentColor 35%, transparent) 50%);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    transform: rotate(calc(var(--bearing, 45deg) + var(--spin, 0deg)));
  }

  .pointer-trail-dot {
    position: fixed;
    inset: 0 auto auto 0;
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 75%, transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }

  .pointer-ripple {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
  }

  /* Links/buttons lean toward the cursor (values set in site.js) */
  .theme-toggle, .footer-links a, .logo {
    display: inline-block;
    transform: translate(var(--mx, 0px), var(--my, 0px));
    transition: transform 380ms cubic-bezier(.2,.9,.3,1.2);
  }
  .is-magnet { transition-duration: 120ms; }
}

/* Show the right asset for the current theme */
[data-theme="light"] .only-dark,
[data-theme="dark"] .only-light { display: none !important; }

/* =====================================================================
   Layout — fluid from 320px phones to large monitors.
   Every clamp() hits the exact Figma value at 1440px wide
   (side padding 80, content 800, wordmark 296, tagline 32, body 22/36).
   ===================================================================== */
:root {
  --pad: clamp(20px, 5.556vw, 80px);                 /* 80px at 1440 */
  --pad-l: max(var(--pad), env(safe-area-inset-left));
  --pad-r: max(var(--pad), env(safe-area-inset-right));
}

/* First screen fills the viewport (900px tall on the 1440×900 design) */
.screen {
  position: relative;
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: clamp(16px, 5.556vw, 80px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: clamp(64px, 5.556vw, 80px);
  padding: 0 var(--pad-r) 0 var(--pad-l);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}

.logo, .logo img { display: block; width: clamp(36px, 2.778vw, 40px); height: auto; aspect-ratio: 1; }

.theme-toggle {
  font: italic 600 clamp(16px, 15.3px + 0.188vw, 18px)/30px var(--font);
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: right;
  min-height: 44px;            /* comfortable tap target */
  padding: 0 2px;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle:focus-visible,
.footer-links a:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.content {
  width: min(800px, 100% - var(--pad-l) - var(--pad-r));
  margin: clamp(28px, 4.167vw, 60px) auto 0;           /* block starts at y=140 on desktop */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 4.167vw, 60px);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.wordmark img { display: block; width: clamp(208px, 177px + 8.263vw, 296px); height: auto; aspect-ratio: 296 / 100; }

.tagline {
  font: italic 600 clamp(22px, 18.48px + 0.939vw, 32px)/normal var(--font);
  color: var(--accent);
  text-align: center;
  text-wrap: balance;
}

.copy {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 15.25px + 0.2vw, 20px);
  width: 100%;
  font-size: clamp(18px, 16.59px + 0.376vw, 22px);
  line-height: 1.636;                                   /* 36px at 22px */
  font-weight: 400;
  text-wrap: pretty;
}

.prompts-intro { margin-bottom: 8px; }

.prompts {
  list-style: disc;
  padding-left: 1.5em;
  color: var(--muted);
}
.prompts li + li { margin-top: 0.15em; }

.footer {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 40px var(--pad-r) max(40px, env(safe-area-inset-bottom)) var(--pad-l);
  font-size: 14px;
  line-height: 24px;
  font-weight: 300;
}

.footer-company { font-style: italic; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Tablets and below: stack the footer */
@media (max-width: 860px) {
  .footer {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding-top: 32px;
  }
  .footer-links { justify-content: center; gap: 4px 24px; }
}

/* Phones */
@media (max-width: 480px) {
  .footer-links span { flex-basis: 100%; }             /* copyright on its own line */
}

/* Touch screens: roomier footer links */
@media (pointer: coarse) {
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Short, wide screens (phones in landscape): don't force a full-height first screen */
@media (max-height: 520px) and (orientation: landscape) {
  .screen { min-height: 0; }
}
