/* Biba Glow Derm — coming-soon landing page.
   Mobile-first. Palette sampled from the logo artwork; every text/background
   pairing used here clears WCAG AA (4.5:1) at its rendered size. */

:root {
  /* Surfaces */
  --cream:      #FDF8F5;
  --blush-50:   #FBF0EB;
  --blush-100:  #F7E4DC;
  --blush-200:  #F0D2C6;

  /* Rose gold */
  --rose-300:   #E0AC92;
  --rose-400:   #CE8A6C;
  --copper-500: #B76A4C;
  --copper-600: #A0563A;
  --copper-700: #8A4630;

  /* Text — ink 11.9:1, ink-soft 5.9:1 on cream */
  --ink:        #4A2C22;
  --ink-soft:   #7A5A4E;
  --hairline:   #E9D3C8;

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Jost', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;

  --shadow-soft:  0 2px 10px rgba(138, 70, 48, .05), 0 12px 34px rgba(138, 70, 48, .07);
  --shadow-lift:  0 4px 14px rgba(138, 70, 48, .10), 0 18px 44px rgba(138, 70, 48, .12);
  --radius:       18px;

  --ease-out: cubic-bezier(.22, .8, .3, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; color: var(--ink); }
p { margin: 0; }
img { max-width: 100%; height: auto; }

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

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

/* ---------------------------------------------------------------- ambience */

.ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%,   var(--blush-100) 0%, transparent 62%),
    radial-gradient(100% 70% at 50% 100%, var(--blush-50)  0%, transparent 60%),
    var(--cream);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
}
.glow--one   { width: 62vmax; height: 62vmax; top: -26vmax; left: -20vmax;
               background: radial-gradient(circle, rgba(224,172,146,.55), transparent 68%); }
.glow--two   { width: 54vmax; height: 54vmax; bottom: -24vmax; right: -18vmax;
               background: radial-gradient(circle, rgba(240,210,198,.65), transparent 68%); }
.glow--three { width: 40vmax; height: 40vmax; top: 42%; left: 58%;
               background: radial-gradient(circle, rgba(206,138,108,.22), transparent 70%); }

/* Four-point sparkles, echoing the ones drawn into the logo. */
.sparkle {
  position: absolute;
  color: var(--rose-300);
  opacity: 0;
  animation: twinkle 7s var(--ease-out) infinite;
}
/* Thin concave arms, matching the four-point sparkles drawn into the logo.
   Fat arms at this size just read as specks. */
.sparkle::before {
  content: '';
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(50% 0%, 55% 45%, 100% 50%, 55% 55%, 50% 100%, 45% 55%, 0% 50%, 45% 45%);
}

/* Scale only — rotating a four-point star through 45deg turns it into an "x". */
@keyframes twinkle {
  0%, 100% { opacity: 0;   transform: scale(.55); }
  50%      { opacity: .55; transform: scale(1); }
}

/* ------------------------------------------------------------------ layout */

.shell {
  position: relative;
  z-index: 1;
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(2.5rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.25rem, 6vw, 3.5rem);
  text-align: center;
}

/* --------------------------------------------------------------- masthead */

.masthead__logo {
  display: block;
  width: min(78vw, 420px);
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(138, 70, 48, .12));
  animation: rise .9s var(--ease-out) both, float 9s ease-in-out 1s infinite;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ------------------------------------------------------------------- hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.4rem);
  animation: rise .9s var(--ease-out) .12s both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--copper-700);
}
.eyebrow__rule {
  display: block;
  width: clamp(1.75rem, 8vw, 3.25rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-400));
}
.eyebrow__rule:last-child { background: linear-gradient(90deg, var(--rose-400), transparent); }

.hero__title {
  font-size: clamp(2.35rem, 9.5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero__title em {
  display: block;
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(100deg, var(--copper-700), var(--rose-400) 45%, var(--copper-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 34rem;
  font-size: clamp(1rem, 2.7vw, 1.1rem);
  line-height: 1.7;
  text-wrap: pretty;
}

/* -------------------------------------------------------------- countdown */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.5rem, 2.2vw, 1rem);
  width: 100%;
  max-width: 34rem;
  animation: rise .9s var(--ease-out) .24s both;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: clamp(.8rem, 3.2vw, 1.25rem) .25rem clamp(.7rem, 2.6vw, 1rem);
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.tile__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.9rem);
  font-weight: 400;
  line-height: 1;
  color: var(--copper-700);
  /* Cormorant defaults to old-style figures, which makes a countdown look like
     it is bobbing up and down. Force lining, equal-width digits. */
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
}
.tile__label {
  font-size: clamp(.56rem, 2.1vw, .68rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------- notify */

.notify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  width: 100%;
  max-width: 34rem;
  animation: rise .9s var(--ease-out) .34s both;
}

.notify__heading { font-size: clamp(1.6rem, 5.5vw, 2.1rem); }
.notify__hint    { font-size: .92rem; line-height: 1.6; max-width: 28rem; }

.signup { width: 100%; margin-top: .6rem; }

/* Off-screen rather than display:none — some bots skip hidden fields. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__row {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.signup__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3.1rem;
  padding: .85rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.signup__input::placeholder { color: #B29387; }
.signup__input:hover  { border-color: var(--blush-200); }
.signup__input:focus  { outline: none; border-color: var(--rose-400);
                        box-shadow: 0 0 0 4px rgba(206, 138, 108, .18); }
.signup__input[aria-invalid="true"] { border-color: #C0553F;
                        box-shadow: 0 0 0 4px rgba(192, 85, 63, .14); }
.signup__input:disabled { opacity: .6; cursor: not-allowed; }

.btn {
  position: relative;
  flex: 0 0 auto;
  min-height: 3.1rem;
  padding: .85rem 2rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(120deg, var(--copper-600), var(--copper-700));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out), filter .16s var(--ease-out);
  overflow: hidden;
}
/* Slow rose-gold sheen travelling across the button. */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .34) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 5.5s var(--ease-out) 1.4s infinite;
}
@keyframes sheen {
  0%       { transform: translateX(-120%); }
  38%, 100%{ transform: translateX(120%); }
}

.btn:hover  { filter: brightness(1.07); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[data-busy="true"], .btn:disabled { cursor: not-allowed; filter: saturate(.75); }
.btn[data-busy="true"]::after, .btn:disabled::after { animation: none; opacity: 0; }

.btn__spinner { display: none; }
.btn[data-busy="true"] .btn__label { visibility: hidden; }
.btn[data-busy="true"] .btn__spinner {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.signup__status {
  min-height: 1.3rem;
  margin-top: .7rem;
  font-size: .86rem;
  line-height: 1.5;
}
.signup__status[data-tone="error"]   { color: #A5442F; }
.signup__status[data-tone="success"] { color: var(--copper-700); }

/* Retry link inside the error message. */
.signup__status button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin-left: .35rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------------------------------------------------------------- pillars */

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
  width: 100%;
  padding-top: clamp(.5rem, 3vw, 1.25rem);
  border-top: 1px solid var(--hairline);
  animation: rise .9s var(--ease-out) .44s both;
}

.pillar { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.pillar__icon  { width: 1.75rem; height: 1.75rem; color: var(--copper-500); }
.pillar__title { font-size: 1.2rem; letter-spacing: .01em; }
.pillar__text  { font-size: .88rem; line-height: 1.6; max-width: 20rem; }

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding-top: clamp(1rem, 4vw, 1.75rem);
  border-top: 1px solid var(--hairline);
  animation: rise .9s var(--ease-out) .54s both;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials:empty { display: none; }

.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--copper-600);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  transition: color .16s var(--ease-out), background-color .16s var(--ease-out),
              border-color .16s var(--ease-out), transform .16s var(--ease-out);
}
.socials a:hover {
  color: #fff;
  background: var(--copper-600);
  border-color: var(--copper-600);
  transform: translateY(-2px);
}
.socials svg { width: 1.15rem; height: 1.15rem; }

.footer__contact a {
  font-size: .92rem;
  color: var(--copper-700);
  text-decoration-color: var(--blush-200);
  text-underline-offset: 4px;
  transition: text-decoration-color .16s var(--ease-out);
}
.footer__contact a:hover { text-decoration-color: currentColor; }

.footer__legal { font-size: .76rem; letter-spacing: .06em; color: var(--ink-soft); }

/* ------------------------------------------------------------ breakpoints */

@media (min-width: 34rem) {
  .signup__row { flex-direction: row; align-items: center; }
}

@media (min-width: 48rem) {
  .shell   { gap: 3.5rem; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

/* Short landscape phones: trim the vertical rhythm so the fold still works. */
@media (max-height: 30rem) and (orientation: landscape) {
  .masthead__logo { width: min(42vw, 260px); }
  .shell { gap: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .masthead__logo,
  .hero, .countdown, .notify, .pillars, .footer {
    animation: none;
  }
  .sparkle { display: none; }
  .btn::after { animation: none; opacity: 0; }
  .btn__spinner { animation-duration: 1.4s; }
  * { transition-duration: .01ms !important; }
}

@media (prefers-contrast: more) {
  :root { --ink-soft: #5C4036; --hairline: #C9A897; }
}
