/* Pure Magic — pre-launch landing
   Desktop geometry comes straight from Figma "Website Option 1 / Landing"
   (a 985 x 603 artboard). 1 design px = var(--u). */

/* Beatrice Standard — the design's typeface.
   ⚠ PREVIEW ONLY: these are Sharp Type/Monotype TRIAL files supplied by Practice
   (letters, digits and "." only). Before launch, buy webfont licenses for
   Beatrice Standard Medium + SemiBold, put the .woff2 files in /fonts/ and
   point the two src lines below at them. Missing characters (! ? , ' + @)
   fall back to Schibsted Grotesk automatically. */
@font-face {
  font-family: "Beatrice Standard";
  src: url("/fonts/BeatriceStandard-Medium-Trial.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Beatrice Standard";
  src: url("/fonts/BeatriceStandard-SemiBold-Trial.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Schibsted Grotesk (OFL) — fallback for glyphs the trial files lack */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink: #FFCBED;
  --red: #E73420;          /* sRGB rendering of the Figma P3 red */
  --brown: #4F260A;
  --yellow: #F5FE93;
  --blue: #D3EBF9;
  --white: #FFFFFF;
  --font: "Beatrice Standard", "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@supports (color: color(display-p3 1 1 1)) {
  :root { --red: color(display-p3 0.8353 0.2706 0.1882); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--pink); }
body {
  font-family: var(--font);
  color: var(--red);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: var(--pink); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Shared pieces ---------- */

.logo { margin: 0; line-height: 0; color: var(--red); }
.logo svg { display: block; height: auto; overflow: visible; }

.headline {
  margin: 0;
  max-width: 9em;                /* 315 / 35 — forces the Figma line break */
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--red);
}

.label {
  display: block;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--red);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  transition: box-shadow .2s ease;
}
.field:focus-within { box-shadow: 0 0 0 2px var(--red); }

.field input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brown);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: var(--brown); opacity: 0.3; }
.field input:disabled { -webkit-text-fill-color: currentColor; opacity: 1; }

.submit {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
  -webkit-tap-highlight-color: transparent;
}
.submit:hover { transform: scale(1.08); }
.submit:active { transform: scale(0.94); }
.submit:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
.submit-text {
  display: block;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-16.52deg);
  animation: pm-spin 9s linear infinite;
}
.signup.is-loading .submit-text { animation-duration: 1.1s; }
.signup.is-done .submit { cursor: default; }
.signup.is-done .submit:hover { transform: none; }

.status {
  margin: 0;
  min-height: 1.15em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--brown);
}
.status:empty { display: none; }
.signup.is-error .status { color: var(--red); }
.signup.is-error .field { animation: pm-shake .4s cubic-bezier(.36,.07,.19,.97); }


.media { position: relative; z-index: 1; }
.slides { position: absolute; inset: 0; overflow: hidden; background: #5a2c14; }
.slide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 1.4s ease; }
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos-m, 50% 50%);  /* per-photo values in slides.css */
  transform: scale(1.06);
  transition: transform 7s cubic-bezier(.2,.6,.2,1);
}
.slide.is-active { opacity: 1; }
.slide.is-active img { transform: scale(1); }

.sticker { position: absolute; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.sticker > * { grid-area: 1 / 1; }
.sticker img { display: block; }
.sticker span {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  color: var(--brown);
}
.sticker-star img { transform: rotate(-70.06deg); animation: pm-wobble 5s ease-in-out infinite alternate; }
.sticker-star span { transform: translateX(calc(var(--su) * 1.5)) rotate(-16.52deg); }
.sticker-soon { transform: rotate(7.14deg); animation: pm-bob 4s ease-in-out infinite alternate; }
.sticker-soon span { transform: translate(calc(var(--su) * -1.3), calc(var(--su) * 2.6)); }

.ig {
  display: inline-flex;
  align-items: center;
  color: var(--red);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ig svg { display: block; flex: 0 0 auto; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.ig:hover svg { transform: rotate(-12deg) scale(1.1); }
.ig:focus-visible { outline: 2px solid var(--brown); outline-offset: 4px; border-radius: 4px; }
.ig-handle {
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Mobile / portrait (default) ---------- */

.hero {
  --lw: min(calc(100vw - 32px), 760px);   /* logo line width */
  --lh: calc(var(--lw) * 0.21705);         /* logo line height (114.905 / 529.4) */
  --su: calc(var(--lw) / 358 * 1.12);      /* sticker unit */
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}
.hero > .media { order: 1; }
.hero > .logo  { order: 2; }
.hero > .copy  { order: 3; }
.hero > .ig    { order: 4; }

/* photo height leaves room for the logo + form on the first screen */
.media { flex: 0 0 auto; height: clamp(240px, min(56svh, calc(100svh - var(--lh) * 1.5 - clamp(236px, 30vw + 120px, 340px))), 760px); }

.logo {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: calc(var(--lh) * 0.12);
  padding: 0 16px;
  margin-top: calc(var(--lh) * -0.62);
  animation: pm-rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.logo .logo-full { display: none; }
.logo .logo-pure  { width: calc(var(--lw) * 0.73366); overflow: hidden; }
.logo .logo-magic { width: var(--lw); overflow: hidden; }

.copy {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 8vw, 48px) 16px 0;
  animation: pm-rise .9s .12s cubic-bezier(.2,.7,.2,1) both;
}
.headline { font-size: clamp(31px, 9.4vw, 58px); }
.signup { margin-top: clamp(24px, 6vw, 40px); max-width: 560px; }
.label { font-size: clamp(11px, 1.9vw, 15px); margin-bottom: clamp(9px, 1.4vw, 12px); }
.field { height: clamp(62px, 9vw, 80px); padding: 6px 6px 6px 16px; }
.field input[type="email"] { font-size: clamp(22px, 3.4vw, 30px); }
.submit { width: clamp(50px, 7.2vw, 66px); height: clamp(50px, 7.2vw, 66px); }
.submit-text { font-size: clamp(9.5px, 1.4vw, 12px); }
.status { font-size: clamp(10.5px, 1.6vw, 13px); margin-top: 10px; }

/* star sits just above the "P", over the photo's edge (like desktop);
   the coming-soon dome rises off the photo's bottom edge like a little sun */
.sticker-star { width: calc(var(--su) * 98); height: calc(var(--su) * 97); left: 6px; bottom: calc(var(--lh) * 0.62 + 6px); }
.sticker-star img { width: calc(var(--su) * 75.17); height: calc(var(--su) * 77.06); }
.sticker-star span { width: calc(var(--su) * 50.07); font-size: calc(var(--su) * 9); }
.sticker-soon { width: calc(var(--su) * 86); height: calc(var(--su) * 43); right: 6px; bottom: -1px; transform: none; transform-origin: 50% 100%; animation: pm-sun 3.2s ease-in-out infinite alternate; }
.sticker-soon img { width: 100%; height: 100%; }
.sticker-soon span { width: calc(var(--su) * 49.3); font-size: calc(var(--su) * 8.6); transform: translateY(calc(var(--su) * 4)); }

.ig { gap: 9px; padding: 26px 16px calc(26px + env(safe-area-inset-bottom)); margin-top: auto; }
.ig svg { width: 22px; height: 22px; }
.ig-handle { font-size: 11px; }

/* ---------- Desktop / landscape: Figma "Website Option 1" ----------
   The 985 x 603 artboard, scaled to fit the window and centered on pink.
   1 design px = var(--u). Inset photo card at (603, 39), 348 x 463. */

@media (min-aspect-ratio: 5/4) and (min-width: 700px) {
  .hero {
    --u: min(calc(100vw / 985), calc(100svh / 603));
    --su: var(--u);
    position: relative;
    display: block;
    width: calc(var(--u) * 985);
    height: calc(var(--u) * 603);
    min-height: 0;
    margin: 0 auto;
    top: max(0px, calc((100svh - var(--u) * 603) / 2));
    overflow: visible;
  }

  .media {
    position: absolute;
    left: calc(var(--u) * 603);
    top: calc(var(--u) * 39);
    width: calc(var(--u) * 348);
    height: calc(var(--u) * 463);
  }
  .slide img { object-position: var(--pos-d, 50% 50%); }

  .logo {
    position: absolute;
    left: calc(var(--u) * 26);
    bottom: calc(var(--u) * 22);
    display: block;
    margin: 0;
    padding: 0;
  }
  .logo .logo-full { display: block; width: calc(var(--u) * 952); }
  .logo .logo-pure, .logo .logo-magic { display: none; }

  .copy {
    position: absolute;
    left: calc(var(--u) * 116);
    top: calc(var(--u) * 148);
    width: calc(var(--u) * 381);
    padding: 0;
    text-align: center;
  }
  .headline { font-size: calc(var(--u) * 35); margin: 0 auto; }
  .signup { margin-top: calc(var(--u) * 40); max-width: none; }
  .label { font-size: calc(var(--u) * 9); margin-bottom: calc(var(--u) * 8); }
  .field { height: calc(var(--u) * 60); padding: calc(var(--u) * 5) calc(var(--u) * 6) calc(var(--u) * 5) calc(var(--u) * 15); text-align: left; }
  .field:focus-within { box-shadow: 0 0 0 max(2px, calc(var(--u) * 1.5)) var(--red); }
  .field input[type="email"] { font-size: calc(var(--u) * 25); }
  .submit { width: calc(var(--u) * 50); height: calc(var(--u) * 50); }
  .submit-text { font-size: calc(var(--u) * 9); }
  .status { font-size: calc(var(--u) * 9); margin-top: calc(var(--u) * 9); }

  /* stickers sit on the photo card's lower-left corner (positions relative to the card) */
  .sticker-star { left: calc(var(--u) * -50.35); top: calc(var(--u) * 277.88); right: auto; bottom: auto; width: calc(var(--u) * 98.07); height: calc(var(--u) * 96.95); }
  .sticker-star img { width: calc(var(--u) * 75.17); height: calc(var(--u) * 77.06); }
  .sticker-star span { width: calc(var(--u) * 50.07); font-size: calc(var(--u) * 9); }
  .sticker-soon { left: calc(var(--u) * 17.48); top: calc(var(--u) * 371.14); right: auto; bottom: auto; width: calc(var(--u) * 90.64); height: calc(var(--u) * 45.32); transform: rotate(4.58deg); transform-origin: 50% 50%; animation: pm-bob 4s ease-in-out infinite alternate; }
  .sticker-soon span { width: calc(var(--u) * 49.29); font-size: calc(var(--u) * 9); transform: translate(calc(var(--u) * -1.4), calc(var(--u) * 2.45)); }

  .ig {
    position: absolute;
    z-index: 2;
    left: calc(var(--u) * 26);
    bottom: calc(var(--u) * 156.5);
    padding: 0;
    margin: 0;
  }
  .ig svg { width: calc(var(--u) * 22.5); height: calc(var(--u) * 22.5); }
  .ig-handle { display: none; }
}

/* ---------- Motion ---------- */

@keyframes pm-spin { from { transform: rotate(-16.52deg); } to { transform: rotate(343.48deg); } }
@keyframes pm-wobble { from { transform: rotate(-74deg) scale(1); } to { transform: rotate(-62deg) scale(1.04); } }
@keyframes pm-bob { from { transform: rotate(4.58deg) translateY(0); } to { transform: rotate(1.5deg) translateY(-6%); } }
@keyframes pm-sun { from { transform: translateY(0); } to { transform: translateY(-7%); } }
@keyframes pm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pm-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .submit-text, .sticker-star img, .sticker-soon, .logo, .copy { animation: none !important; }
  .slide img { transform: none !important; transition: none; }
  .slide { transition-duration: .6s; }
}
