/* foyer — foyerlauncher.com
   direction: "the product performs" (taste-skill seed 1110655084)
   palette: foyer's own — ground #050506, ink #EDEDED, accent #E5484D */

:root {
  --bg: #050506;
  --surface: #151515;
  --ink: #ededed;
  --muted: #9a9a9a;
  --accent: #e5484d;
  --accent-ink: #ffffff;
  --field: #efefef;
  --field-ink: #0a0a0a;
  --field-muted: #5c5c5c;
  --radius: 4px;
  --margin: clamp(16px, 2.5vw, 32px);
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--ink); }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

/* ---- nav ------------------------------------------------------------- */

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--margin);
}
.nav .wordmark img { height: 22px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-right a { text-decoration: none; color: var(--ink); }
.nav-right a:hover { color: var(--muted); }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease;
}
.button:active { transform: scale(0.97); }
.button:hover { color: var(--accent-ink); }

/* ---- hero: one real phone, one plain sentence --------------------------- */

.hero { min-height: 100svh; display: flex; align-items: center; padding: 96px var(--margin) 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-copy h1 { font-size: clamp(44px, 4.6vw, 76px); max-width: 11ch; }
.hero-sub { margin-top: 22px; font-size: var(--step-lead); line-height: 1.45; max-width: 44ch; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
.hero-actions .button { font-size: 16px; padding: 13px 22px; }
.ghost { font-size: 16px; color: var(--ink); }
.ghost:hover { color: var(--muted); }
.hero-fine { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-phone { justify-self: center; text-align: center; }
.hero-caption { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* the one allowed frame: owners call — screenshots must read as phones */
.phone {
  display: inline-block;
  background: #1b1b1d;
  border-radius: 34px;
  padding: 9px;
}
.phone img { border-radius: 26px; width: 100%; height: auto; }

/* two small phones side by side — same theme, light vs dark */
.panel.pair { display: flex; gap: 10px; }
.panel.pair .phone { flex: 1 1 0; padding: 6px; border-radius: 22px; }
.panel.pair .phone img { border-radius: 16px; }

/* four clock styles as one 2x2 grid, in place of a single panel */
.panel.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel.grid4 img { border-radius: 14px; width: 100%; height: auto; display: block; }

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

/* ---- the in-frame launcher fragments ---------------------------------- */

[data-ui] {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  height: 100%;
  width: 100%;
  padding: 22px 26px;
  overflow: hidden;
}
[data-ui] .ui-clock { font-size: 34px; font-weight: 400; letter-spacing: -0.02em; }
[data-ui] .ui-date { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; margin-top: 4px; }
[data-ui] .ui-apps { margin-top: 16px; display: grid; gap: 10px; font-size: 17px; }
[data-ui] .ui-apps span { color: var(--ink); }
[data-ui] .ui-search { color: var(--muted); font-size: 15px; padding: 8px 12px; background: var(--surface); border-radius: 999px; display: flex; gap: 8px; }
[data-ui] .ui-search b { color: var(--ink); font-weight: 400; }
[data-ui] .ui-row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; padding: 9px 0; }
[data-ui] .ui-row .ui-sub { color: var(--muted); font-size: 12px; }
[data-ui] .ui-chip {
  display: inline-block;
  border: 1px solid var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  margin: 6px 6px 0 0;
}
[data-ui] .ui-accent { color: var(--accent); }
[data-ui] .ui-dot { width: 7px; height: 7px; border-radius: 4px; background: var(--accent); }
[data-ui] .ui-tag { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; margin-top: 10px; }

/* ---- showcase: input half, output half -------------------------------- */

.show { position: relative; }
.show-fields { display: grid; grid-template-columns: 1fr 1fr; min-height: 90svh; }
.show-in { background: #000; padding: 0 0 96px 0; position: relative; }
.show-out { background: var(--field); color: var(--field-ink); position: relative; padding: 0 0 96px 0; }

.show-in-inner { margin: 26svh 0 0 16.6%; max-width: 34ch; }
.show-intro { color: var(--ink); font-size: 17px; line-height: 1.5; margin-bottom: 22px; max-width: 40ch; }
.out-intro { color: var(--field-muted); font-size: 17px; line-height: 1.5; margin-bottom: 18px; max-width: 40ch; }
.cmd {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font: inherit;
  font-size: clamp(20px, 1.7vw, 24px);
  padding: 6px 0 10px;
  outline: none;
  caret-color: var(--accent);
}
.cmd:focus { border-bottom-color: var(--accent); }
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips button {
  background: var(--surface);
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.chips button:hover { color: var(--ink); background: #222; }
.chips button:active { transform: scale(0.96); }

.show-out-inner { margin: 26svh 0 0 12%; width: min(480px, 76%); }
.plan[data-ui] {
  background: #fff;
  color: var(--field-ink);
  height: auto;
  border-radius: var(--radius);
  padding: 20px 22px;
}
.plan .ui-row { border-top: 1px solid #e4e4e4; /* taste-skill-ignore: row seam inside the data-ui fragment */ }
.plan .ui-row:first-child { border-top: 0; }
.plan .ui-title { font-size: 17px; }
.plan .ui-sub { color: var(--field-muted); }
.plan .ui-kind {
  font-size: 12px;
  color: var(--field-muted);
}
.plan .ui-go {
  background: var(--field-ink);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  padding: 6px 13px;
}
.plan-note { margin-top: 14px; color: var(--field-muted); font-size: 13px; letter-spacing: 0.04em; }
.plan-note code { font-family: ui-monospace, monospace; font-size: 12px; }

.show-head {
  position: absolute;
  bottom: 32px;
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}
.show-head.in { left: var(--margin); color: var(--ink); }
.show-head.out { right: var(--margin); color: var(--field-ink); }

/* ---- features: the reel — vertical scroll drives the cards sideways ----
   (the niagara move: a pinned screen, a horizontal track, a scrub bar)
   without JS or on phones the track is a plain swipeable row */

.reel { padding: 120px 0 60px; }
.reel-pin { padding: 0 var(--margin); }
.reel-pin h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 44px 0; }
.reel-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.reel-track::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 min(660px, 86vw);
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 36px;
}
.card .panel { width: 236px; }
.card h3 { font-size: clamp(19px, 1.5vw, 23px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.5; max-width: 34ch; }
.card p + p { margin-top: 8px; }

.reel-progress {
  margin-top: 28px;
  width: min(320px, 46vw);
  height: 4px;
  border-radius: 2px;
  background: var(--surface);
  overflow: hidden;
}
.reel-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* the pinned mode — switched on by JS only on wide screens with motion allowed */
.reel-on .reel { padding: 0; }
.reel-on .reel-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.reel-on .reel-track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.reel-on .card {
  opacity: 0.4;
  transform: scale(0.97);
  transition: opacity 450ms ease, transform 450ms cubic-bezier(0.2, 0, 0, 1);
}
.reel-on .card.is-active { opacity: 1; transform: none; }

/* ---- about: the letter -------------------------------------------------- */

.letter { padding: 160px var(--margin); display: grid; justify-content: center; }
.letter-inner { width: min(520px, 100%); }
.letter img { width: 44px; height: 44px; border-radius: 50%; }
.letter p { font-size: 17px; line-height: 1.55; margin-top: 20px; }
.letter p:first-of-type { margin-top: 28px; }
.letter mark { background: var(--accent); color: var(--accent-ink); padding: 0 5px; }
.letter .sign { margin-top: 32px; font-style: italic; font-size: 22px; }
.letter .role { font-style: normal; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---- proof: the quiet row ------------------------------------------------ */

.proof {
  padding: 140px var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.proof .lead-in { font-size: 18px; color: var(--muted); }
.proof b { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }

/* ---- faq: fair questions -------------------------------------------------- */

.faq { padding: 40px 0 160px; }
.faq h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 48px 22%; }
.faq details {
  max-width: 640px;
  margin: 0 0 10px 22%;
  background: var(--surface);
  border-radius: var(--radius);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
  padding: 18px 20px;
  transition: color 140ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--muted); }
.faq details[open] summary { color: var(--ink); }
.faq details p {
  padding: 0 20px 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}

/* ---- cta: the action tile ------------------------------------------------ */

.cta { display: flex; gap: 12px; align-items: stretch; overflow: clip; }
.cta > * { border-radius: var(--radius); height: 360px; }
.tile-side { flex: 1 1 14%; min-width: 0; }
.tile-side.frag { overflow: hidden; margin-left: -12px; border-top-left-radius: 0; border-bottom-left-radius: 0; background: #000; }
.tile-ui { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-left: 28%; }
.tile-side.flat { background: var(--surface); margin-right: -12px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tile-main {
  flex: 0 0 66%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}
.tile-main h2 { font-size: 40px; letter-spacing: -0.03em; }
.tile-main p { font-size: 17px; max-width: 46ch; margin: 14px 0 26px; }
.tile-main .button { background: var(--field); color: var(--field-ink); width: fit-content; }
.tile-fine { font-size: 13px; margin-top: 14px; opacity: 0.85; }

/* ---- footer --------------------------------------------------------------- */

.footer {
  margin-top: 30svh;
  padding: 0 var(--margin) 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  font-size: 15px;
  color: var(--muted);
}
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--ink); text-decoration: none; }
.footer nav a:hover { color: var(--muted); }
.footer .right { text-align: right; }

/* ---- motion ----------------------------------------------------------------- */

/* entrances only hide content once JS is known to be running */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0, 0, 1); }
.js .rise.in { opacity: 1; transform: none; }

/* hero headline words, wrapped by JS */
.w { display: inline-block; opacity: 0; transform: translateY(0.55em); transition: opacity 500ms ease, transform 500ms cubic-bezier(0.2, 0, 0, 1); }
.w.in { opacity: 1; transform: none; }

/* scroll-linked layers (JS writes transforms; these just promote them) */
.hero-phone .phone, .show-head { will-change: transform; }

.drift img { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
  .js .rise, .w { opacity: 1; transform: none; transition: none; }
  .drift img { animation: none; }
  .reel-on .card { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- phone -------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero { padding: 88px 16px 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy h1 { font-size: 11vw; }
  .hero-sub { font-size: 17px; }
  .hero-phone .phone { width: min(260px, 72vw); }

  .show-fields { grid-template-columns: 1fr; }
  .show-in, .show-out { min-height: 62svh; padding-bottom: 72px; }
  .show-in-inner, .show-out-inner { margin: 72px 20px 0; width: auto; max-width: none; }
  .cmd { font-size: 18px; }
  .show-head { font-size: 11vw; }
  .show-head.in { bottom: 16px; }
  .show-head.out { bottom: auto; top: 16px; }

  /* the reel stays a thumb-swiped row on phones; no pinning */
  .reel { padding-top: 96px; }
  .reel-pin { padding: 0 16px; }
  .reel-pin h2 { margin-bottom: 28px; }
  .card { flex: 0 0 82vw; grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; }
  .card .panel { width: min(220px, 60vw); margin: 0 auto; }
  .card h3 { font-size: 17px; }
  .reel-progress { width: 56vw; }

  .letter { padding: 96px 24px; }
  .letter img { width: 40px; height: 40px; }
  .letter p { font-size: 16px; }

  .faq h2, .faq details { margin-left: 16px; margin-right: 16px; }

  .proof { flex-direction: column; align-items: flex-start; gap: 18px; padding: 96px 16px; }
  .proof .lead-in { font-size: 17px; }
  .proof b { font-size: 20px; }

  .cta { flex-wrap: wrap; padding: 0; }
  .tile-main { flex: 1 1 100%; height: auto; min-height: 300px; padding: 28px; }
  .tile-main h2 { font-size: 28px; }
  .tile-side { height: 120px; }
  .tile-side.frag { flex: 1 1 40%; margin-left: 0; border-radius: var(--radius); }
  .tile-side.flat { flex: 1 1 40%; margin-right: 0; border-radius: var(--radius); }

  .footer { margin-top: 20svh; grid-template-columns: 1fr; gap: 8px; font-size: 14px; }
  .footer .right { text-align: left; }
}
