/* Panosphera site — mobile-first. Base rules are the phone layout;
   `min-width` queries layer the tablet and desktop layouts on top. */

:root {
  --ground: #F5F4EF;
  --surface: #FFFFFF;
  --surface-2: #ECEAE2;
  --ink: #15171C;
  --ink-2: #3A3E47;
  --muted: #5E6470;
  --line: rgba(21, 23, 28, 0.14);
  --accent: #B8892E;
  --accent-ink: #15171C;
  --horizon: #3E8E45;
  --pano-ground: #0B0C10;
  --display: "Jost", "Futura", "Avenir Next", "Helvetica Neue", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --brand: #15306E;
  --mark-url: url(img/mark-navy.png);
  --wordmark-url: url(img/wordmark-navy.png);
  --lockup-url: url(img/lockup-navy.png);
  --gutter: 20px;
  --bar: 66px;
  --bar-bg: rgba(245, 244, 239, 0.86);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B0C10; --surface: #14161C; --surface-2: #1C1F27;
    --ink: #F2F1EC; --ink-2: #C9CBD0; --muted: #9AA0AB; --line: rgba(242, 241, 236, 0.14);
    --accent: #E7C27A; --accent-ink: #0B0C10; --horizon: #7CC66D; --brand: #F2F1EC;
    --mark-url: url(img/mark-white.png); --wordmark-url: url(img/wordmark-white.png); --lockup-url: url(img/lockup-white.png);
    --bar-bg: rgba(11, 12, 16, 0.82);
  }
}
:root[data-theme="dark"] {
  --ground: #0B0C10; --surface: #14161C; --surface-2: #1C1F27;
  --ink: #F2F1EC; --ink-2: #C9CBD0; --muted: #9AA0AB; --line: rgba(242, 241, 236, 0.14);
  --accent: #E7C27A; --accent-ink: #0B0C10; --horizon: #7CC66D; --brand: #F2F1EC;
  --mark-url: url(img/mark-white.png); --wordmark-url: url(img/wordmark-white.png); --lockup-url: url(img/lockup-white.png);
  --bar-bg: rgba(11, 12, 16, 0.82);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
/* Edge-to-edge on phones; the desktop query cancels it. */
.bleed { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.25rem, 10vw, 3rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 7vw, 2.25rem); line-height: 1.1; }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: 1.125rem; color: var(--ink-2); }
.eyebrow { font-family: var(--display); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 14px; }

/* ---- Sticky header ---------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bar-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--bar); gap: 12px; }
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.nav .brand .mark { width: 38px; height: 38px; background: var(--mark-url) center / contain no-repeat; }
.nav .brand .word { height: 21px; width: 147px; background: var(--wordmark-url) center / contain no-repeat; }
.nav .links { display: none; }
/* Phone menu: a <details> so it needs no script. */
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu summary .x { display: none; }
.menu[open] summary .lines { display: none; }
.menu[open] summary .x { display: block; }
.menu[open] summary { background: var(--surface-2); }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  font-family: var(--display); font-weight: 500; font-size: 1.0625rem;
}
.menu li a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.menu li a:active, .menu li a:hover { background: var(--surface-2); }
.menu li + li { border-top: 1px solid var(--line); }

/* ---- Horizon rule: the mark's horizon with its two flared ticks ------- */
.horizon { display: flex; align-items: center; gap: 14px; margin: 48px 0 40px; color: var(--line); }
.horizon::before, .horizon::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.horizon svg { width: 44px; height: 14px; flex: none; }

/* ---- Hero ------------------------------------------------------------- */
.hero { display: grid; gap: 28px; padding: 28px 0 8px; }
.hero .copy { display: grid; gap: 18px; }
.hero .lockup { display: none; }
.hero .cta { display: grid; gap: 10px; margin-top: 4px; }
.btn {
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  min-height: 52px; padding: 12px 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink-2); }
.hero .platforms { font-size: 0.9375rem; color: var(--muted); }
/* The splash still is 9:16; on a phone it is cropped to a 4:5 panel so the
   hero doesn't become a second full screen before the headline. */
.hero .art { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 62vh; background: var(--pano-ground); }
.hero .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

/* ---- Live panorama ---------------------------------------------------- */
.demo {
  position: relative; overflow: hidden; background: var(--pano-ground);
  aspect-ratio: 1 / 1; touch-action: none; cursor: grab; border-radius: 0;
}
.demo:active { cursor: grabbing; }
.demo canvas { display: block; width: 100%; height: 100%; }
.pill {
  position: absolute; padding: 7px 12px; border-radius: 999px;
  background: rgba(11, 12, 16, 0.62); color: #F2F1EC;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.demo .readout { left: 12px; bottom: 12px; display: flex; gap: 12px; font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.04em; }
.demo .hint { left: 50%; top: 14px; transform: translateX(-50%); font-size: 0.8125rem; white-space: nowrap; transition: opacity 0.6s; }
.demo .hint.hide { opacity: 0; }
.demo .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #F2F1EC; padding: 24px; text-align: center; }
.demo-note { font-size: 0.875rem; color: var(--muted); margin-top: 12px; }
.try-head { display: grid; gap: 10px; margin-bottom: 18px; }

/* ---- Features --------------------------------------------------------- */
.features { display: grid; gap: 56px; }
.feature { display: grid; gap: 18px; }
.feature .text { display: grid; gap: 12px; }
.feature .shot img { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); width: 100%; }
.feature .shot.phone { max-width: 250px; margin: 0 auto; }
.feature .shot.phone img { border-radius: 28px; }
.feature .points { margin: 4px 0 0; padding: 0 0 0 18px; color: var(--ink-2); }
.feature .points li { margin: 6px 0; }

/* Smart Pan frames: a swipeable row on phones, five columns on desktop. */
.strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter) 6px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { margin: 0; flex: 0 0 38%; scroll-snap-align: start; }
.strip img { border-radius: 10px; width: 100%; }
.strip figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 6px; font-family: var(--display); letter-spacing: 0.06em; }
.strip + img { margin-top: 12px; }

/* ---- Privacy ---------------------------------------------------------- */
.privacy { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; display: grid; gap: 22px; }
.privacy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.privacy li { display: flex; gap: 12px; align-items: baseline; }
.privacy li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--horizon); flex: none; transform: translateY(-1px); }

/* ---- Documents (privacy policy, support) ------------------------------ */
.doc { display: grid; gap: 16px; padding: 28px 0 40px; }
.doc h1 { font-size: clamp(1.875rem, 8vw, 2.75rem); }
.doc h2 { margin-top: 20px; font-size: 1.375rem; }
.doc p, .doc li { max-width: 68ch; color: var(--ink-2); }
.doc ul { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.doc .updated { font-size: 0.875rem; color: var(--muted); }

/* ---- Footer ----------------------------------------------------------- */
footer { padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line); margin-top: 56px; }
footer .row { display: grid; gap: 16px; justify-items: center; text-align: center; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: center; }
footer a { text-decoration: none; color: var(--ink-2); padding: 6px 0; display: inline-block; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .demo .hint { transition: none; } }

/* ======================================================================= */
/* Tablet and up                                                            */
/* ======================================================================= */
@media (min-width: 760px) {
  :root { --gutter: 32px; --bar: 76px; }
  body { font-size: 1.0625rem; }
  .bleed { margin-left: 0; margin-right: 0; }
  h1 { font-size: clamp(2.75rem, 5.5vw, 4.25rem); line-height: 1.02; }
  h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); }
  h3 { font-size: 1.5rem; }
  .lede { font-size: 1.25rem; }

  .nav .links { display: flex; list-style: none; gap: 28px; margin: 0; padding: 0; font-family: var(--display); font-weight: 500; font-size: 0.9375rem; }
  .nav .links a { text-decoration: none; color: var(--ink-2); padding: 10px 0; display: inline-block; }
  .nav .links a:hover { color: var(--ink); }
  .nav .brand .mark { width: 44px; height: 44px; }
  .nav .brand .word { height: 24px; width: 168px; }
  .menu { display: none; }

  .horizon { margin: 72px 0 56px; }

  .hero { grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 40px 0 8px; }
  .hero .copy { gap: 22px; }
  .hero .lockup { display: block; width: 150px; height: 94px; background: var(--lockup-url) left center / contain no-repeat; margin-bottom: 4px; }
  .hero .cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
  .btn { min-height: 48px; font-size: 1rem; padding: 12px 20px; }
  .hero .art { aspect-ratio: 9 / 16; max-height: none; border-radius: 28px; }
  .hero .art img { object-fit: contain; object-position: center; }

  .demo { border-radius: 24px; aspect-ratio: 16 / 9; }
  .demo .readout { left: 16px; bottom: 14px; gap: 18px; font-size: 0.875rem; padding: 8px 14px; }
  .demo .hint { left: auto; right: 16px; top: auto; bottom: 14px; transform: none; padding: 8px 14px; }
  .try-head { margin-bottom: 24px; }

  .features { gap: 80px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .feature:nth-child(even) .shot { order: 2; }
  .feature .shot img { border-radius: 18px; }
  .feature .shot.phone { max-width: 320px; }
  .feature .shot.phone img { border-radius: 30px; }

  .strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; overflow: visible; padding: 0; }
  .strip figure { flex: none; }

  .privacy { grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px; border-radius: 24px; align-items: start; }
  .doc { gap: 18px; padding: 24px 0 40px; }
  .doc h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
  .doc h2 { margin-top: 24px; font-size: 1.625rem; }

  footer { padding: 40px 0 56px; margin-top: 72px; }
  footer .row { display: flex; justify-content: space-between; align-items: center; text-align: left; }
  footer ul { gap: 22px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  .hero { gap: 56px; }
}
