/* The 7-Day Habit Builder Challenge: waitlist page. Palette: Midnight Champagne.
   Fits one laptop screen with no scrolling. Everything is self-hosted. No outside fonts, scripts or images. */

/* ---------- fonts (SIL Open Font License, see fonts/LICENSES.txt) ---------- */
@font-face{ font-family:"DM Serif Display"; font-style:normal; font-weight:400; font-display:swap; src:url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); }
@font-face{ font-family:"DM Serif Display"; font-style:italic; font-weight:400; font-display:swap; src:url("fonts/dm-serif-display-latin-400-italic.woff2") format("woff2"); }
@font-face{ font-family:"DM Sans"; font-style:normal; font-weight:400; font-display:swap; src:url("fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face{ font-family:"DM Sans"; font-style:italic; font-weight:400; font-display:swap; src:url("fonts/dm-sans-latin-400-italic.woff2") format("woff2"); }
@font-face{ font-family:"DM Sans"; font-style:normal; font-weight:500; font-display:swap; src:url("fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }
@font-face{ font-family:"Caveat"; font-style:normal; font-weight:500; font-display:swap; src:url("fonts/caveat-latin-500-normal.woff2") format("woff2"); }

/* ---------- palette ---------- */
/* Midnight Champagne: New Year's Eve, navy and champagne gold */
:root{
  --bg:#0F1830; --page-text:#EFE8DA; --page-muted:#AAB2C5; --line:rgba(239,232,218,.14);
  --head:#F7F1E6; --head-em:#E9C67C; --mark:transparent; --hand:#E9C67C; --spark:#E9C67C; --link:#E9C67C;
  --card-bg:#FBF7EF; --card-text:#141B2E; --card-muted:#5E6476; --card-line:rgba(20,27,46,.12); --label:#8C6A1F; --card-hand:#8C6A1F;
  --btn:#0F1830; --btn-hover:#24335C; --btn-ink:#F3D58F;
  --blob:#1C2A4D; --dot:#E9C67C;
  --sticky-bg:#E9C67C; --sticky-text:#141B2E; --strike:#0F1830; --sticky-end:#0F1830;
  --tag-bg:#E9C67C; --tag-ink:#0F1830; --photo-border:#FBF7EF; --grain:0;
  color-scheme:dark;
}
:root{
  --f-display:"DM Serif Display", Georgia, serif;
  --f-body:"DM Sans", system-ui, -apple-system, sans-serif;
  --f-hand:"Caveat", "Bradley Hand", cursive;
  --t-body:clamp(1rem, .96rem + .2vw, 1.0625rem);
  --t-small:clamp(.875rem, .85rem + .11vw, .9375rem);
  --gutter:20px;
}
@media (min-width:600px){ :root{ --gutter:40px; } }
@media (min-width:1024px){ :root{ --gutter:56px; } }

/* ---------- base ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
html,body{ overflow-x:clip; }
body{
  margin:0; min-height:100vh; display:flex; flex-direction:column;
  background:var(--bg); color:var(--page-text);
  font-family:var(--f-body); font-size:var(--t-body); line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; position:relative;
}
body::before{ content:""; position:fixed; inset:0; pointer-events:none; z-index:0; opacity:var(--grain); mix-blend-mode:multiply; background-image:url("grain.svg"); }
body > *{ position:relative; z-index:1; }
p{ margin:0 0 .9em; }
p:last-child{ margin-bottom:0; }
a{ color:inherit; }
button{ font:inherit; color:inherit; }
::selection{ background:var(--head-em); color:var(--bg); }
:focus-visible{ outline:2px solid var(--head-em); outline-offset:3px; }
.card :focus-visible, .hi :focus-visible, .slip :focus-visible{ outline-color:var(--label); }
.vh{ position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link{ position:absolute; left:12px; top:-60px; background:var(--card-bg); color:var(--card-text); padding:10px 16px; z-index:200; text-decoration:none; }
.skip-link:focus{ top:12px; }
.wrap{ width:100%; max-width:calc(1180px + 2*var(--gutter)); margin-inline:auto; padding-inline:var(--gutter); }
.link{ text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; text-decoration-color:var(--link); }
.link:hover{ color:var(--link); }
.card .link, .hi .link, .slip .link{ text-decoration-color:var(--label); }
.card .link:hover, .hi .link:hover, .slip .link:hover{ color:var(--label); }
@keyframes draw{ to{ stroke-dashoffset:0; } }
@keyframes twinkle{ 0%,100%{ transform:scale(.82) rotate(0deg); opacity:.7; } 50%{ transform:scale(1.08) rotate(14deg); opacity:1; } }

/* ---------- header ---------- */
.head{ height:60px; }
@media (min-width:600px){ .head{ height:72px; } }
.head__in{ height:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand{ display:inline-flex; align-items:center; gap:8px; font-family:var(--f-display); font-style:italic; font-size:19px; line-height:1; white-space:nowrap; color:var(--page-text); text-decoration:none; }
a.brand:hover{ color:var(--head-em); }
.brand__tick{ width:17px; height:17px; fill:none; stroke:var(--head-em); stroke-width:3.2; stroke-linecap:round; }
.head__tag{ display:inline-block; font-size:12px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; line-height:1; color:var(--tag-ink); background:var(--tag-bg); padding:8px 14px; border-radius:999px; white-space:nowrap; }
/* narrow phones: the longer name needs the room; the page itself says "is coming" */
@media (max-width:439px){ .head__tag{ display:none; } }
@media (max-width:359px){ .brand{ font-size:16px; } }

/* ---------- layout ---------- */
.board{ flex:1; display:grid; grid-template-columns:minmax(0,1fr); grid-template-areas:"intro" "card" "hi" "sticky"; padding-block:10px 48px; }
.board__intro{ grid-area:intro; position:relative; z-index:2; }
.board__card{ grid-area:card; position:relative; margin-top:30px; width:100%; max-width:460px; justify-self:center; }
.board__hi{ grid-area:hi; margin-top:40px; }
.board__sticky{ grid-area:sticky; margin-top:30px; justify-self:center; }
@media (min-width:600px){ .board__intro{ max-width:640px; } .board__hi{ max-width:520px; width:100%; justify-self:center; } }
/* laptop and up: everything on one screen */
@media (min-width:960px){
  .board{ grid-template-columns:minmax(0,1fr) 228px minmax(0,460px); grid-template-areas:"intro intro card" "hi sticky card"; column-gap:28px; row-gap:0; align-content:center; padding-block:12px 28px; }
  .board__intro{ max-width:none; padding-right:24px; }
  .board__card{ margin:0 0 0 clamp(16px, 3vw, 48px); align-self:center; max-width:none; }
  .board__hi{ margin-top:32px; max-width:none; justify-self:stretch; align-self:start; }
  .board__sticky{ margin-top:32px; justify-self:start; align-self:start; }
}

/* ---------- intro ---------- */
.kicker{ font-family:var(--f-hand); font-weight:500; font-size:clamp(1.65rem, 1.5rem + .6vw, 2rem); line-height:1.05; color:var(--hand); margin:0 0 12px; transform:rotate(-2deg); transform-origin:0 100%; }
.headline{ font-family:var(--f-display); font-weight:400; font-size:clamp(2.75rem, 1.5rem + 5vw, 5rem); line-height:1.02; letter-spacing:-.015em; color:var(--head); margin:0; text-wrap:balance; }
@media (min-width:960px){ .headline{ font-size:min(4.75rem, 5.9vw, 9.5vh); } }
.nb{ white-space:nowrap; }
.under{ font-style:italic; white-space:nowrap; color:var(--head-em); padding:0 .06em; background:linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); }
.sub{ font-size:clamp(1.06rem, 1rem + .3vw, 1.2rem); line-height:1.5; margin:20px 0 0; max-width:40ch; color:var(--page-text); }
.sub b{ font-weight:500; }
@media (min-width:960px){ .sub{ max-width:50ch; } }

/* new-year sparkles */
.spark{ position:absolute; z-index:2; fill:var(--spark); pointer-events:none; animation:twinkle 3.2s ease-in-out infinite; }
.spark--1{ width:26px; height:26px; right:2%; top:-4px; }
.spark--2{ width:14px; height:14px; right:9%; top:34px; animation-delay:.9s; }
.spark--3{ width:30px; height:30px; left:-14px; top:-14px; animation-delay:1.7s; }
@media (min-width:960px){ .spark--1{ right:16%; top:2px; width:32px; height:32px; } .spark--2{ right:11%; top:44px; } }
}

/* ---------- the waitlist card ---------- */
.blob{ position:absolute; z-index:0; width:300px; height:300px; right:-70px; top:-70px; border-radius:50%; background:var(--blob); pointer-events:none; }
.board__card::before{ content:""; position:absolute; z-index:0; width:110px; height:110px; left:-40px; bottom:-34px; border-radius:50%; background:var(--dot); opacity:.9; }
@media (max-width:599px){ .blob{ width:220px; height:220px; right:-60px; top:-50px; } .board__card::before{ width:80px; height:80px; left:-26px; bottom:-26px; } }
.card-wrap{ position:relative; z-index:1; perspective:1400px; }
.card{ position:relative; transform-style:preserve-3d; transition:transform .6s cubic-bezier(.3,.7,.3,1); }
.card.is-flipped{ transform:rotateY(180deg); }
.card__front, .card__back{ background:var(--card-bg); color:var(--card-text); border-radius:22px; box-shadow:0 2px 4px rgba(0,0,0,.05), 0 24px 50px rgba(0,0,0,.14); -webkit-backface-visibility:hidden; backface-visibility:hidden; }
.card__front{ position:relative; margin:0; padding:0 0 26px; }
.card__back{ position:absolute; inset:0; transform:rotateY(180deg); display:grid; place-items:center; text-align:center; padding:28px 24px; }
.card.is-swapped .card__front{ visibility:hidden; }
.card.is-swapped .card__back{ transform:none; }
.card__head{ font-weight:500; letter-spacing:.16em; font-size:11px; padding:16px 24px 14px; margin:0; border-bottom:1px solid var(--card-line); color:var(--label); }
.card__body{ padding:20px 24px 0; }
@media (min-width:600px){ .card__body{ padding:24px 32px 0; } .card__head{ padding-inline:32px; } }
.card__q{ font-family:var(--f-display); font-weight:400; font-size:clamp(1.8rem, 1.6rem + .8vw, 2.25rem); line-height:1.1; letter-spacing:-.01em; margin:0; color:var(--card-text); }
.card__perk{ margin:6px 0 18px; line-height:1.45; }

/* fields and buttons */
.fld{ display:block; margin-bottom:18px; }
.fld > label{ display:block; font-size:14px; color:var(--card-muted); margin-bottom:2px; }
.input{ width:100%; height:48px; border:0; border-bottom:1px solid var(--card-text); background:transparent; font-family:var(--f-body); font-size:18px; color:var(--card-text); border-radius:0; padding:6px 0; outline:none; -webkit-appearance:none; appearance:none; }
.input:focus{ border-bottom:2px solid var(--label); }
.input:focus-visible{ outline:none; box-shadow:0 3px 0 -1px var(--label); }
.input::placeholder{ color:var(--card-muted); opacity:.65; }
.input[aria-invalid="true"]{ border-bottom-color:#B3261E; }
.err{ color:#B3261E; font-size:14px; margin-top:4px; display:block; }
.err:empty{ margin:0; }
.help{ font-size:var(--t-small); color:var(--card-muted); line-height:1.45; margin:14px 0 0; }
.hp{ position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:54px; padding:0 28px; border-radius:14px; font-family:var(--f-body); font-weight:500; font-size:16px; letter-spacing:.03em; line-height:1.2; text-decoration:none; cursor:pointer; border:0; background:var(--btn); color:var(--btn-ink); box-shadow:0 10px 22px rgba(0,0,0,.16); transition:transform .1s; text-align:center; }
.btn:hover{ background:var(--btn-hover); }
.btn:active{ transform:translateY(1px); }
.btn[disabled]{ opacity:.55; cursor:progress; }
.btn--block{ width:100%; }

/* back of the card */
.back{ display:grid; justify-items:center; gap:10px; max-width:380px; }
.back__tick{ width:48px; height:48px; fill:none; stroke:var(--label); stroke-width:2.6; stroke-linecap:round; }
.back__tick path{ stroke-dasharray:1; stroke-dashoffset:1; animation:draw 600ms ease-out 450ms forwards; }
.back__h{ font-family:var(--f-hand); font-weight:500; font-size:clamp(2.3rem, 2rem + 1.2vw, 2.8rem); line-height:1; color:var(--card-hand); margin:0; outline:none; }
.back__p{ margin:0; line-height:1.45; }
.back__email{ font-weight:500; word-break:break-all; }
.back__small{ margin:0; font-size:var(--t-small); color:var(--card-muted); }
.back__sig{ margin:4px 0 0; font-family:var(--f-hand); font-weight:500; font-size:26px; line-height:1; color:var(--card-hand); }

/* "hi, I'm Alina" with the photo */
.hi{ display:grid; grid-template-columns:134px minmax(0,1fr); gap:18px; align-items:center; background:var(--card-bg); color:var(--card-text); border-radius:20px; padding:16px 20px 16px 14px; box-shadow:0 2px 4px rgba(0,0,0,.04), 0 16px 34px rgba(0,0,0,.10); }
.hi__photos{ position:relative; width:134px; height:152px; }
.hi__photo{ position:absolute; margin:0; width:90px; }
.hi__photo--a{ left:0; top:0; transform:rotate(-7deg); }
.hi__photo--b{ right:0; bottom:0; transform:rotate(6deg); z-index:1; }
.hi__photo img{ display:block; width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; border:3px solid var(--photo-border); border-radius:10px; box-shadow:0 6px 14px rgba(0,0,0,.22); }
.hi__h{ font-family:var(--f-hand); font-weight:500; font-size:clamp(1.6rem, 1.5rem + .4vw, 1.85rem); line-height:1; color:var(--card-hand); margin:0 0 6px; }
.hi__p{ font-size:var(--t-small); line-height:1.5; margin:0; }
.hi__social{ margin:8px 0 0; font-size:var(--t-small); line-height:1.4; }
.hi__find{ margin:0 0 3px; color:var(--card-muted); }
.hi__links{ list-style:none; margin:0; padding:0; display:grid; gap:3px; }
.hi__links a{ display:inline-flex; align-items:center; gap:6px; font-weight:500; white-space:nowrap; }
.hi__icon{ width:15px; height:15px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linejoin:round; }
.hi__icon .fill{ fill:currentColor; stroke:none; }

/* the January sticky note */
.sticky{ width:224px; padding:16px 18px 18px; background:var(--sticky-bg); color:var(--sticky-text); border-radius:6px; box-shadow:0 2px 4px rgba(0,0,0,.08), 0 14px 26px rgba(0,0,0,.14); transform:rotate(3deg); }
.sticky p{ margin:0; }
.sticky__label{ font-weight:500; font-size:11px; letter-spacing:.16em; opacity:.8; margin-bottom:6px!important; }
.sticky__x{ font-family:var(--f-hand); font-weight:500; font-size:21px; line-height:1.25; text-decoration:line-through; text-decoration-color:var(--strike); text-decoration-thickness:2px; opacity:.85; }
.sticky__end{ font-family:var(--f-hand); font-weight:500; font-size:24px; line-height:1.15; color:var(--sticky-end); margin-top:6px!important; }

/* ---------- footer ---------- */
.foot{ border-top:1px solid var(--line); }
.foot__in{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 24px; padding-block:16px 20px; font-size:var(--t-small); color:var(--page-muted); }
.foot__in p{ margin:0; }

/* ---------- small pages (privacy, thanks, removed, try again, 404) ---------- */
.page{ flex:1; padding-block:28px 88px; }
.page__in{ max-width:calc(660px + 2*var(--gutter)); }
.page .kicker{ font-size:clamp(1.5rem, 1.4rem + .4vw, 1.8rem); }
.page h1{ font-family:var(--f-display); font-weight:400; font-size:clamp(2.4rem, 1.8rem + 2.6vw, 3.6rem); line-height:1.05; letter-spacing:-.01em; color:var(--head); margin:0 0 20px; }
.page h2{ font-family:var(--f-display); font-weight:400; font-size:clamp(1.35rem, 1.2rem + .5vw, 1.6rem); line-height:1.3; margin:36px 0 8px; color:var(--head); }
.page .lead{ font-size:clamp(1.1rem, 1.02rem + .35vw, 1.25rem); line-height:1.5; color:var(--page-muted); }
.page ul{ padding-left:1.2em; margin:0 0 .9em; }
.page li{ margin-bottom:.35em; }
.page .meta{ font-size:var(--t-small); color:var(--page-muted); margin-top:40px; }
.page .go{ margin-top:28px; }
.slip{ background:var(--card-bg); color:var(--card-text); border-radius:20px; box-shadow:0 16px 34px rgba(0,0,0,.10); padding:22px 24px 24px; margin:18px 0 8px; }
.slip .fld > label{ color:var(--card-muted); }
.slip .btn{ margin-top:6px; }
.slip__done{ font-family:var(--f-hand); font-weight:500; font-size:clamp(1.5rem, 1.4rem + .4vw, 1.8rem); line-height:1.15; color:var(--card-hand); margin:0; outline:none; }

/* shorter laptop screens (e.g. 1366 x 768): tighten spacing so everything still fits without scrolling */
@media (min-width:960px) and (max-height:820px){
  .board{ padding-block:6px 14px; }
  .sub{ margin-top:14px; }
  .board__hi, .board__sticky{ margin-top:20px; }
  .foot__in{ padding-block:12px 14px; }
}

/* phones: keep the sign-up button on the first screen */
@media (max-width:599px){
  .spark--1, .spark--2{ display:none; }
  .board{ padding-top:4px; }
  .kicker{ font-size:1.5rem; margin-bottom:10px; }
  .sub{ font-size:1rem; line-height:1.45; margin-top:14px; }
  .board__card{ margin-top:22px; }
  .card__head{ padding-block:13px 11px; }
  .card__body{ padding-top:16px; }
  .card__perk{ margin:4px 0 12px; }
  .fld{ margin-bottom:14px; }
  .hi{ grid-template-columns:112px minmax(0,1fr); gap:14px; }
  .hi__photos{ width:112px; height:132px; }
  .hi__photo{ width:76px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion:reduce){
  .spark{ animation:none; }
  .back__tick path{ animation:none; stroke-dashoffset:0; }
  .card, .btn{ transition:none; }
}
