/* =====================================================================
   site.css — the shell: hero, horizontal showcase rail, manifesto.
   The app replica itself lives in app.css.
   ===================================================================== */

@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-var.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #101114;
  --ink-2: #3d3f45;
  --muted: #74767e;
  --cream: #fffdf8;
  --amber: #f5b400;
  --amber-lite: #ffe9a8;
  --line: rgba(16, 17, 20, 0.1);

  --f-display: "Satoshi", -apple-system, "Segoe UI", system-ui, sans-serif;
  --f-ui: -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 62px;
  --pad: clamp(20px, 5vw, 60px);
  --gutter: clamp(10px, 1.4vw, 20px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-display);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* the .deck scrolls, not the body */
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
::selection {
  background: var(--amber-lite);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* =====================================================================
   Nav
   ===================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 34px);
  pointer-events: none;
}
.nav > * {
  pointer-events: auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav-brand img.mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.nav-brand img.word {
  height: 16px;
  width: auto;
  object-fit: contain;
}
/* Menu items are plain text on the background, icon first, the way an
   app's own menu reads. No pills, no filled buttons. */
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.1vw, 32px);
}
.mi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  transition: color 0.2s;
}
.mi svg {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.72;
  transition: opacity 0.2s, color 0.2s;
}
.mi:hover {
  color: var(--ink);
}
.mi:hover svg {
  opacity: 1;
  color: var(--amber);
}

/* mobile trigger, hidden on desktop */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border-radius: 12px;
  place-items: center;
  color: var(--ink);
  transition: background 0.2s;
}
.nav-toggle .ic-cross {
  display: none;
}
body.menu-open .nav-toggle .ic-burger {
  display: none;
}
body.menu-open .nav-toggle .ic-cross {
  display: block;
}

/* =====================================================================
   Deck: full-screen vertical snap track
   ===================================================================== */

.deck {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar {
  display: none;
}

.screen {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}

/* warm brand wash, same family as the App Store screenshots:
   white top-left, honey bottom-right */
.wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 8% 4%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(75% 60% at 100% 30%, #fbdc8e 0%, rgba(251, 220, 142, 0) 68%),
    linear-gradient(128deg, #fffdf8 0%, #fff6df 44%, #fce9b4 100%);
}
/* quiet ground behind the slide cards, so the cards themselves carry the
   warmth and read as separate surfaces */
.wash.cool {
  background: linear-gradient(150deg, #fbf7ee 0%, #f7f1e2 100%);
}
.wash.deep {
  background:
    radial-gradient(80% 60% at 12% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(85% 70% at 100% 40%, #f6cf78 0%, rgba(246, 207, 120, 0) 66%),
    linear-gradient(135deg, #fffcf4 0%, #fdefc9 50%, #f7dc9a 100%);
}

/* =====================================================================
   Shared type + buttons (intro slide, closing screen, manifesto)
   ===================================================================== */


.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a7a1e;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(245, 180, 0, 0.28);
  padding: 7px 13px;
  border-radius: 999px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

h1 {
  margin-top: 22px;
  font-size: clamp(40px, 6.6vw, 82px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.038em;
  color: var(--ink);
  text-wrap: balance;
}
h1 .thin {
  font-weight: 400;
  color: var(--ink-2);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.2s;
}
.btn svg {
  flex: none;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(16, 17, 20, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(16, 17, 20, 0.55);
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(16, 17, 20, 0.16);
  background: rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover {
  background: #fff;
  transform: translateY(-2px);
}

.hero-note {
  margin-top: 16px;
  font-family: var(--f-ui);
  font-size: 12.5px;
  color: #a09a86;
  letter-spacing: 0.01em;
}

/* =====================================================================
   Showcase: horizontal rail of modules
   ===================================================================== */

#showcase {
  display: grid;
  grid-template-rows: 1fr;
}

.rail {
  position: relative;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  /* contain stops the swipe from chaining into the vertical deck and
     from triggering the browser's back-gesture at the edges */
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: grab;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
/* JS turns snapping off while it animates the rail itself */
.rail.gliding {
  scroll-snap-type: none;
}

/* Each slide is a full-bleed panel holding one big rounded card. The card
   starts just under the nav with a small margin all round; the device is
   cropped by the card's bottom edge. */
.panel {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  padding: calc(var(--nav-h) + clamp(6px, 1vh, 12px)) var(--gutter)
    var(--gutter);
}

.module {
  --card-r: clamp(20px, 2.2vw, 34px);
  height: 100%;
  min-height: 0;
  border-radius: var(--card-r);
  overflow: hidden;
  background:
    radial-gradient(85% 65% at 6% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(70% 60% at 100% 20%, #fbdc8e 0%, rgba(251, 220, 142, 0) 70%),
    linear-gradient(134deg, #fffdf8 0%, #fff6df 46%, #fbe6ae 100%);
  box-shadow:
    0 0 0 1px rgba(120, 96, 34, 0.07),
    0 18px 40px -22px rgba(90, 72, 26, 0.28);
  /* content stays capped at 1240 while the card itself runs full width */
  padding: clamp(20px, 4vh, 56px)
    max(var(--pad), calc((100% - 1240px) / 2 + var(--pad))) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(20px, 4vw, 70px);
}

.module-copy {
  max-width: 560px;
}
.module-no {
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #b39a55;
}
.module h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.module .sub {
  margin-top: 16px;
  font-family: var(--f-ui);
  font-size: clamp(14.5px, 1.25vw, 17.5px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: -0.01em;
  max-width: 34ch;
}

/* Same here: the crop belongs to .panel / .module, not to this column.
   Clipping it here cut the right bezel off and squared off the shadow. */
.module-visual {
  position: relative;
  height: 100%;
  min-height: 0;
}
/* push the device down far enough that the card's bottom edge always
   crops it, the way the App Store screenshots are composed */
.module-visual .phone-stage {
  padding-top: clamp(14px, 7vh, 84px);
}

/* entrance: each panel's content settles when it becomes the active one */
.panel .module-copy > *,
.panel .module-visual {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}
.panel.live .module-copy > *,
.panel.live .module-visual {
  opacity: 1;
  transform: none;
}
.panel.live .module-copy > *:nth-child(1) {
  transition-delay: 0.02s;
}
.panel.live .module-copy > *:nth-child(2) {
  transition-delay: 0.07s;
}
.panel.live .module-copy > *:nth-child(3) {
  transition-delay: 0.12s;
}
.panel.live .module-copy > *:nth-child(4) {
  transition-delay: 0.17s;
}
.panel.live .module-visual {
  transition-delay: 0.06s;
}

/* edge arrows: the only chrome on the showcase, pinned to the left and
   right of the screen and vertically centred */
.rail-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: clamp(38px, 3.4vw, 48px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(16, 17, 20, 0.09);
  box-shadow: 0 6px 18px -8px rgba(70, 55, 15, 0.3);
  display: grid;
  place-items: center;
  color: var(--ink);
  transform: translateY(-50%);
  transition: transform 0.25s var(--ease), background 0.2s, opacity 0.25s;
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
}
.rail-nav.prev {
  left: clamp(10px, 2.2vw, 32px);
}
.rail-nav.next {
  right: clamp(10px, 2.2vw, 32px);
}
.rail-nav:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-50%) scale(1.07);
}
.rail-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

/* the one hint that there is a screen below the slideshow */
.deck-cue {
  position: absolute;
  left: calc(var(--gutter) + 14px);
  bottom: calc(var(--gutter) + 14px);
  z-index: 7;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(16, 17, 20, 0.08);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.deck-cue svg {
  animation: bob 2s var(--ease) infinite;
}
.deck-cue:hover {
  background: #fff;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}

/* intro slide: brand statement, so it carries the biggest type */
.panel.intro h2 {
  font-size: clamp(34px, 5vw, 64px);
}
.panel.intro .sub {
  max-width: 38ch;
}
.panel.intro .hero-actions {
  margin-top: 28px;
}

/* =====================================================================
   Closing screen
   ===================================================================== */

#download .close-inner {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: var(--nav-h) clamp(20px, 5vw, 60px) 0;
  gap: 0;
}
#download .mark {
  width: 62px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 26px;
}
#download h2 {
  font-size: clamp(34px, 5.4vw, 68px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.038em;
  text-wrap: balance;
  max-width: 16ch;
}
#download p {
  margin-top: 20px;
  font-family: var(--f-ui);
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 44ch;
}
#download .hero-actions {
  justify-content: center;
}
.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 clamp(20px, 5vw, 60px) 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--f-ui);
  font-size: 12.5px;
  color: #a09a86;
  flex-wrap: wrap;
}
.foot nav {
  display: flex;
  gap: 18px;
}
.foot a:hover {
  color: var(--ink);
}

/* =====================================================================
   Manifesto page
   ===================================================================== */

body.page {
  overflow: auto;
  background: var(--cream);
}
.page-wash {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 50% at 82% -6%, #fbe3a6 0%, rgba(251, 227, 166, 0) 62%),
    radial-gradient(60% 45% at 4% 102%, #fdf0cd 0%, rgba(253, 240, 205, 0) 60%),
    var(--cream);
}

.mf {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(50px, 12vh, 130px)) clamp(22px, 6vw, 40px)
    clamp(70px, 12vh, 140px);
}
.mf-lede h1 {
  margin-top: 20px;
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 0.99;
}
.mf-lede p {
  margin-top: 26px;
  font-family: var(--f-ui);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  color: var(--ink-2);
  letter-spacing: -0.012em;
  max-width: 34ch;
}
.mf-rule {
  height: 1px;
  background: var(--line);
  margin: clamp(46px, 8vh, 82px) 0;
}
.mf-block + .mf-block {
  margin-top: clamp(44px, 7vh, 76px);
}
.mf-block h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.12;
  text-wrap: balance;
}
.mf-block p {
  margin-top: 15px;
  font-family: var(--f-ui);
  font-size: clamp(15.5px, 1.6vw, 17.5px);
  line-height: 1.72;
  color: var(--ink-2);
  letter-spacing: -0.008em;
}
.mf-block p + p {
  margin-top: 13px;
}
.mf-pull {
  margin: clamp(48px, 8vh, 86px) 0;
  padding-left: clamp(18px, 3vw, 30px);
  border-left: 3px solid var(--amber);
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.mf-end {
  margin-top: clamp(56px, 9vh, 96px);
  padding-top: clamp(34px, 5vh, 52px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mf-sign {
  font-family: var(--f-ui);
  font-size: 13.5px;
  color: var(--muted);
}

/* fade-in on scroll for the manifesto */
.rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
}
.rise.in {
  opacity: 1;
  transform: none;
}

/* =====================================================================
   Responsive
   ===================================================================== */

/* tablet and below: stack copy above the device, matching the
   composition of the App Store screenshots (headline, then phone
   cropped by the bottom edge) */
@media (max-width: 900px), (max-aspect-ratio: 10/9) {

  .module {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(12px, 2.5vh, 26px);
    text-align: center;
  }
  .module {
    padding-top: clamp(18px, 3.5vh, 40px);
  }
    .module-copy {
    max-width: 620px;
    margin: 0 auto;
  }
    .module .sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  /* stacked layout: let the device use the full panel width, not just the
     padded text column, but keep 14px so its shadow never hits the edge */
    .module-visual {
    width: auto;
    margin-inline: min(0px, calc(14px - var(--pad)));
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .module-visual .phone-stage {
    padding-top: clamp(4px, 1.2vh, 14px);
  }
}

/* =====================================================================
   Mobile menu: one trigger, then the same items at a size you can
   actually hit, in the same icon-then-text style.
   ===================================================================== */

@media (max-width: 760px) {
  .nav-toggle {
    display: grid;
  }
  .nav-menu {
    position: fixed;
    top: calc(var(--nav-h) - 6px);
    right: clamp(12px, 3vw, 24px);
    left: auto;
    width: min(300px, calc(100vw - 24px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(16, 17, 20, 0.08);
    box-shadow: 0 20px 44px -18px rgba(70, 55, 15, 0.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.24s var(--ease), transform 0.28s var(--ease),
      visibility 0.28s;
  }
  body.menu-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .mi {
    gap: 13px;
    padding: 15px 14px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
  }
  .mi + .mi {
    box-shadow: 0 -1px 0 rgba(16, 17, 20, 0.07);
  }
  .mi svg {
    width: 21px;
    height: 21px;
    opacity: 0.85;
  }
  .mi:active {
    background: rgba(16, 17, 20, 0.05);
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(34px, 10.5vw, 52px);
  }
  .module h2 {
    font-size: clamp(27px, 8.2vw, 42px);
  }
    .module .sub {
    font-size: 15px;
  }
  .nav-link.hide-sm {
    display: none;
  }
  .btn {
    padding: 12px 20px;
    font-size: 14.5px;
  }
}

/* very short viewports: give the device the space instead of the copy */
@media (max-height: 620px) and (min-width: 901px) {
  .hero-actions {
    margin-top: 22px;
  }
  .hero-note {
    display: none;
  }
}
@media (max-width: 900px), (max-aspect-ratio: 10/9) {
  .hero-note {
    display: none;
  }
  .hero-actions {
    margin-top: 20px;
  }
  h1 {
    margin-top: 16px;
  }
  .hero-sub {
    margin-top: 14px;
  }
}

/* =====================================================================
   Motion + a11y
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .panel .module-copy > *,
  .panel .module-visual,
  .rise {
    opacity: 1 !important;
    transform: none !important;
  }
  .deck,
  .rail {
    scroll-snap-type: none;
  }
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}
