/* Elenor — downloadelenor.com
   Every colour below is lifted from shipped product code so the site, the app
   and the outfit-share pages read as one brand:
     cream/white split ....... backend/outfit-share/index.js PAGE_CSS
     #FFCB69 ................. UIConfiguration.mainThemeColor
     #4A3200 on honey ........ NotificationManager.primaryButtonText
     #1C1C1E / #6E6E73 ....... NotificationManager.primaryText / secondaryText
     24px bubble radius ...... UIConfiguration.bubbleCardCornerRadius
   The app is forced light mode (Info.plist UIUserInterfaceStyle=Light), so the
   site commits to one light palette on purpose — no dark variants. Every
   colour is painted explicitly so the page holds on any host background. */

:root {
  color-scheme: light;

  --cream:      #FAF5F0;
  --card:       #FFFFFF;
  --ink:        #1C1C1E;
  --muted:      #6E6E73;
  --faint:      #AEAEB2;
  --honey:      #FFCB69;
  --honey-ink:  #4A3200;
  --honey-deep: #8A5A00;
  --hairline:   rgba(0, 0, 0, .06);
  --rule:       #E5E5EA;

  /* The app's bubble-card shadow, plus a deeper one for the phone. */
  --lift:   0 1px 2px rgba(28, 20, 10, .04), 0 4px 11px rgba(28, 20, 10, .08);
  --lift-h: 0 2px 4px rgba(28, 20, 10, .06), 0 10px 24px rgba(28, 20, 10, .12);
  --lift-xl: 0 2px 6px rgba(28, 20, 10, .12), 0 30px 60px -18px rgba(28, 20, 10, .38);

  --ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;

  --gutter: clamp(1.25rem, 5vw, 3.5rem);

  /* Vertical budget for the one-screen landing layout. --chrome is everything
     on screen that ISN'T the video (stage padding ×2, wordmark, gap, phone
     bezel ×2); the video then takes all remaining height. Measured, not
     guessed — see the verification notes in README.md. */
  --pad-v:    1.5rem;
  --stack-gap: 1.25rem;
  --mark-w:   190px;
  --bezel:    .7rem;
  --chrome:   156px;
}

* { box-sizing: border-box; }

/* Clip on BOTH html and body. The halo is a percentage of the phone, and the
   phone now scales with the viewport, so on narrow screens the glow reaches
   past the edge. Clipping only body still left html scrollable sideways. */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Decorative glow only; the page must never scroll sideways. `clip` rather
     than `hidden` so it does not force overflow-y to auto. */
  overflow-x: hidden;
  overflow-x: clip;
}

/* The landing page opens as exactly one screen — video and wordmark, nothing
   else. The footer is deliberately parked just past the fold so a small scroll
   reveals Privacy/Support without them competing on first paint. */

a { color: var(--honey-deep); }

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

img, svg, video { display: block; max-width: 100%; }

/* ---------- landing stage ---------- */

/* Wordmark, then video — filling exactly one viewport. The stage is itself the
   App Store link, so the entire first screen is tappable. */
.stage {
  min-height: 100svh;
  padding: var(--pad-v) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--stack-gap);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stage:focus-visible { outline: 2px solid var(--honey-deep); outline-offset: -6px; }

.wordmark { width: var(--mark-w); height: auto; }

/* A whole-screen link has no hover target of its own, so the wordmark carries
   the affordance: it lifts very slightly when the page is hovered. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .stage .wordmark { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .stage:hover .wordmark { transform: translateY(-2px); }
}

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

.showcase { position: relative; justify-self: center; display: flex; }

/* The horizontal spread is kept modest on purpose: at -26% this glow was wider
   than a 360px phone and produced real horizontal scroll. The gradient reaches
   full transparency at 70% of its radius anyway, so a tighter box looks
   identical. `overflow-x: clip` on body is the backstop. */
.halo {
  position: absolute;
  inset: -14% -12%;
  background: radial-gradient(52% 44% at 50% 42%, rgba(255, 193, 82, .78), rgba(255, 203, 105, 0) 70%);
  filter: blur(14px);
  pointer-events: none;
}

.phone {
  position: relative;
  display: block;
  padding: var(--bezel);
  background: linear-gradient(168deg, #35353A 0%, #1C1C1E 42%, #0E0E10 100%);
  border-radius: 3rem;
  box-shadow: var(--lift-xl);
}

/* As large as the viewport allows. Height-driven, because a `vh` percentage
   cannot account for the fixed furniture (wordmark, gaps, bezel) that does not
   shrink with the viewport — subtracting --chrome is what actually fits.
   Capped two ways: 1000px so it stays sane on a 4K display, and 190vw, which
   is 88vw expressed through the 886:1920 ratio, so a tall narrow phone can
   never make the device wider than the screen. */
.screen {
  position: relative;
  display: block;
  aspect-ratio: 886 / 1920;
  height: min(calc(100svh - var(--chrome)), 1000px, 190vw);
  border-radius: 2.35rem;
  overflow: hidden;
  background: var(--cream);
}

.screen video,
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.25rem var(--gutter) 1.75rem;
}

.foot-in {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  font-size: .8125rem;
  color: var(--muted);
}

.foot-in nav { display: flex; gap: 1.5rem; margin-left: auto; }
.foot-in a { color: var(--muted); text-decoration: none; }
.foot-in a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- document pages (privacy, support) ---------- */

.doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--gutter) 4rem;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
}

.doc-back:hover { color: var(--ink); }

.doc-mark { width: 150px; height: auto; margin: 1.75rem 0 2rem; }

.doc h1 {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  font-weight: 400;
  margin: 0 0 .5rem;
}

.doc .stamp {
  margin: 0 0 2.5rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--faint);
}

.doc h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -.005em;
  margin: 2.75rem 0 .625rem;
}

.doc p,
.doc li {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: #2E2E31;
}

.doc p { margin: 0 0 1.125rem; max-width: 36rem; }
.doc ul { margin: 0 0 1.125rem; padding-left: 1.25rem; max-width: 36rem; }
.doc li { margin-bottom: .5rem; }
.doc strong { font-weight: 700; color: var(--ink); }

.doc .note {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  box-shadow: var(--lift);
  padding: 1.25rem 1.375rem;
  margin: 0 0 1.75rem;
}

.doc .note p:last-child { margin-bottom: 0; }

/* Contact block on the support page. */
.contact {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  padding: .875rem 1.25rem;
  background: var(--honey);
  color: var(--honey-ink);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--lift);
}

.contact:hover { box-shadow: var(--lift-h); }

/* ---------- motion: one settle-in, like placing items on the canvas ---------- */

/* Wordmark, then phone. */
@media (prefers-reduced-motion: no-preference) {
  .anim { animation: settle .62s cubic-bezier(.2, .8, .2, 1) backwards; }
  .anim:nth-child(1) { animation-delay: .05s; }
  .anim:nth-child(2) { animation-delay: .16s; }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

/* Same single-column stack at every width — only the furniture scales, which
   shrinks --chrome and so lets the video grow proportionally. */
@media (max-width: 860px) {
  :root {
    --pad-v:     1rem;
    --stack-gap: 1rem;
    --mark-w:    160px;
    --bezel:     .58rem;
    --chrome:    122px;
  }
  .phone  { border-radius: 2.5rem; }
  .screen { border-radius: 1.95rem; }
}

@media (max-width: 420px) {
  :root { --mark-w: 142px; --chrome: 116px; }
}

/* Short windows: claw back furniture so the video keeps as much height as
   possible. Driven through the same vars, so --chrome stays truthful. */
@media (max-height: 700px) {
  :root {
    --pad-v:     .75rem;
    --stack-gap: .75rem;
    --mark-w:    140px;
    --chrome:    104px;
  }
}
