/* I Want Better Skin: shared styles (mobile first) */
:root {
  --cream: #FCF5F6;
  --paper: #FFFDFD;
  --blush: #F4D7DD;
  --blush2: #E8B9C4;
  --rose: #731B2F;
  --rose-d: #5A1323;
  --ink: #2B1118;
  --ink2: #5E4148;
  --mute: #8E737A;
  --line: #EFDCE1;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 8px; }

/* ---------- Wordmark + top bar ---------- */
.topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  height: 48px;
}
.wordmark {
  justify-self: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--rose); }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  text-decoration: none;
}
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Home: one screen ---------- */
body.home {
  background:
    radial-gradient(120% 55% at 50% 0%, #F4D7DD 0%, rgba(244, 215, 221, 0) 62%),
    var(--cream);
}
.screen {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(4px + var(--safe-t)) 18px calc(14px + var(--safe-b));
}
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(6px, 2svh, 20px) 0 clamp(14px, 3svh, 28px);
}
.faces {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: clamp(124px, min(27svh, 52vw), 250px);
}
.faces img {
  height: 84%;
  aspect-ratio: 3 / 4;
  width: auto;
  object-fit: cover;
  border-radius: 999px 999px 22px 22px;
  border: 3px solid #fff;
  background: var(--blush);
  box-shadow: 0 14px 30px -16px rgba(80, 40, 50, .45);
}
.faces .f1 { transform: rotate(-7deg); margin-right: -30px; }
.faces .f2 { height: 100%; position: relative; z-index: 2; }
.faces .f3 { transform: rotate(7deg); margin-left: -30px; }

.eyebrow {
  margin-top: clamp(16px, 3.2svh, 30px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose);
}
.hero h1 {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(31px, 8.8vw, 44px);
  line-height: 1.06;
  letter-spacing: -.015em;
}
.hero h1 em { font-style: italic; color: var(--rose); }
.lede {
  margin-top: 10px;
  max-width: 33ch;
  font-size: clamp(15px, 4.1vw, 17px);
  color: var(--ink2);
}
.mini {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(12px, 2.2svh, 18px);
}
.mini li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
}
.mini li svg { width: 12px; height: 12px; color: var(--rose); }

/* ---------- Bottom tabs (two only) ---------- */
.tabs {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 10px;
}
.tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 12px 12px;
  border-radius: 20px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform .12s ease;
}
.tab:active { transform: scale(.97); }
.tab b { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.tab small { display: block; font-size: 12px; color: var(--mute); line-height: 1.25; margin-top: 2px; }
.tab-ico {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blush);
  color: var(--rose);
}
.tab-ico svg { width: 18px; height: 18px; }
.tab-txt { flex: 1; min-width: 0; }
.tab-main {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(42, 30, 35, .7);
  position: relative;
}
.tab-main small { color: rgba(255, 255, 255, .74); }
.tab-main .tab-ico { background: var(--rose); color: #fff; }
.tab-main .arrow { width: 18px; height: 18px; flex: none; opacity: .9; }
.tab-main::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  box-shadow: 0 0 0 0 rgba(115, 27, 47, .4);
  animation: pulse 2.6s ease-out 3.4s infinite;
  pointer-events: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(115, 27, 47, .4); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(115, 27, 47, 0); }
}
.tab[aria-current="page"]:not(.tab-main) { border-color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }

/* fixed version of the tab bar (inner pages) */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(252, 245, 246, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tabbar .tabs { max-width: 488px; margin: 0 auto; }
.has-tabbar { padding-bottom: calc(100px + var(--safe-b)); }

/* ---------- Hello, Beautiful! ---------- */
.hello {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(95% 65% at 50% 42%, #FAE9EC 0%, #F4D7DD 58%, #EDC3CD 100%);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .9s;
  animation: helloFailsafe 0s linear 6s forwards;
  cursor: pointer;
}
.hello.out { opacity: 0; transform: scale(1.05); visibility: hidden; }
.hello-seen .hello { display: none; }
@keyframes helloFailsafe { to { opacity: 0; visibility: hidden; } }

.hello-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--script);
  font-weight: 400;
  line-height: .92;
  color: var(--ink);
  padding: 0 12px;
}
.hw {
  display: block;
  font-size: clamp(70px, 21.5vw, 140px);
  -webkit-clip-path: inset(-30% 100% -30% -10%);
  clip-path: inset(-30% 100% -30% -10%);
}
.hw1 { margin-right: .9em; }
.hw2 { color: var(--rose); margin-left: .35em; }
.hello.play .hw1 { animation: write .95s cubic-bezier(.6, .08, .3, 1) .1s forwards; }
.hello.play .hw2 { animation: write 1.15s cubic-bezier(.6, .08, .3, 1) .8s forwards; }
@keyframes write {
  to { -webkit-clip-path: inset(-30% -10% -30% -10%); clip-path: inset(-30% -10% -30% -10%); }
}
.swash {
  display: block;
  width: 78%;
  height: auto;
  margin: 4px auto 0;
  overflow: visible;
}
.swash path {
  fill: none;
  stroke: var(--rose);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}
.hello.play .swash path { animation: draw .8s ease-out 1.75s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spark {
  position: absolute;
  width: 26px; height: 26px;
  color: var(--rose);
  opacity: 0;
  transform: scale(.2) rotate(-30deg);
}
.spark.s1 { top: -6%; right: 2%; }
.spark.s2 { bottom: 18%; left: -2%; width: 16px; height: 16px; }
.spark.s3 { top: 30%; right: -6%; width: 14px; height: 14px; }
.hello.play .spark { animation: sparkIn .6s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.hello.play .s1 { animation-delay: 1.85s; }
.hello.play .s2 { animation-delay: 2.0s; }
.hello.play .s3 { animation-delay: 2.1s; }
@keyframes sparkIn { to { opacity: 1; transform: scale(1) rotate(0); } }

/* home content arrives after the hello */
.reveal { transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.pre .reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: revealFailsafe 0s linear 6.2s forwards;
}
@keyframes revealFailsafe { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hw { -webkit-clip-path: none !important; clip-path: none !important; animation: none !important; }
  .swash path { stroke-dashoffset: 0 !important; animation: none !important; }
  .spark { opacity: 1 !important; transform: none !important; animation: none !important; }
  .reveal, .pre .reveal { transition: none; opacity: 1; transform: none; }
  .tab-main::after { animation: none; }
}

/* ---------- Footer ---------- */
.foot {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px calc(36px + var(--safe-b));
  border-top: 1px solid var(--line);
}
.foot-brand {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.foot-tag { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 18px; font-size: 13.5px; font-weight: 500; }
.foot-links a { text-decoration: none; border-bottom: 1px solid var(--line); }
.fine { font-size: 11.5px; line-height: 1.6; color: var(--mute); }
.fine + .fine { margin-top: 10px; }

/* ---------- Simple inner pages ---------- */
.page { max-width: 520px; margin: 0 auto; padding: calc(4px + var(--safe-t)) 20px 0; }
.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 9vw, 42px);
  line-height: 1.06;
  letter-spacing: -.015em;
  margin-top: 18px;
}
.page .lede { margin-top: 10px; max-width: none; }
.page h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 28px 0 8px; }
.page p, .page li { font-size: 15px; color: var(--ink2); }
.page p + p { margin-top: 10px; }
.page ul { padding-left: 20px; margin-top: 8px; }
.page li + li { margin-top: 6px; }

.tips { display: grid; gap: 10px; margin-top: 22px; list-style: none; padding: 0 !important; }
.tip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.tip img { width: 64px; height: 76px; object-fit: cover; border-radius: 12px; flex: none; background: var(--blush); }
.tip-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--rose); }
.tip-t { font-family: var(--serif); font-size: 17px; line-height: 1.2; color: var(--ink); margin-top: 3px; }
.tip-s { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--mute); background: var(--blush); padding: 3px 8px; border-radius: 999px; }
.cta-box {
  margin-top: 18px;
  padding: 20px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.cta-box h2 { color: #fff; margin: 0; font-size: 22px; }
.cta-box p { color: rgba(255, 255, 255, .78); margin-top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 16.5px;
  text-decoration: none;
  box-shadow: 0 14px 26px -14px rgba(42, 30, 35, .7);
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-rose { background: var(--rose); box-shadow: 0 14px 26px -14px rgba(115, 27, 47, .7); }
.btn-light { background: #fff; color: var(--ink); box-shadow: none; }
.cta-box .btn { margin-top: 14px; }

/* ---------- Home: community sections ---------- */
html:has(body.home) { scroll-behavior: smooth; }
.home-sec { max-width: 520px; margin: 0 auto; padding: 40px 18px 0; scroll-margin-top: 10px; }
.sec-kicker { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); }
.sec-h { margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 7.6vw, 36px); line-height: 1.08; letter-spacing: -.012em; }
.sec-h em { font-style: italic; color: var(--rose); }
.sec-p { margin-top: 8px; font-size: 15.5px; color: var(--ink2); }

.quiz-card { margin-top: 18px; padding: 22px 20px 20px; border-radius: 24px; background: var(--ink); color: #fff; }
.quiz-card .sec-kicker { color: #F4C3CE; }
.quiz-card h3 { margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.12; }
.qc-list { list-style: none; display: grid; gap: 9px; margin: 16px 0 18px; }
.qc-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: rgba(255, 255, 255, .9); }
.qc-list svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #F4C3CE; }
.qc-small { margin-top: 10px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .62); }

.ages {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 18px -18px 0; padding: 0 18px 8px; scrollbar-width: none;
}
.ages::-webkit-scrollbar { display: none; }
.age { flex: 0 0 64%; max-width: 240px; scroll-snap-align: start; overflow: hidden; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.age img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--blush); }
.age div { padding: 12px 14px 15px; }
.age b { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; }
.age p { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ink2); }

.note-card { padding: 26px 22px; border-radius: 24px; text-align: center; background: linear-gradient(160deg, #F8E3E7, #F1CBD4); }
.note-card blockquote { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.25; }

.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--rose); text-decoration: none; }
.more-link svg { width: 16px; height: 16px; }

.promise { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.promise li { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.promise .pi { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--rose); }
.promise .pi svg { width: 18px; height: 18px; }
.promise b { display: block; font-size: 15.5px; }
.promise span:not(.pi) { display: block; margin-top: 2px; font-size: 14px; color: var(--ink2); }

.ig-card { overflow: hidden; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.ig-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--blush); }
.ig-card div { padding: 18px 18px 20px; text-align: center; }
.ig-card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.ig-card p { margin-top: 6px; font-size: 15px; color: var(--ink2); }
.ig-card .btn { margin-top: 14px; }
.home-end { height: 40px; }
.home .foot { padding-bottom: calc(110px + var(--safe-b)); }

.tabbar.auto { transform: translateY(120%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.tabbar.auto.on { transform: none; }

/* ---------- Narrow phones ---------- */
@media (max-width: 389px) {
  .tabs { grid-template-columns: 1.3fr 1fr; gap: 8px; }
  .tab { gap: 8px; padding: 10px; min-height: 62px; }
  .tab-ico { width: 30px; height: 30px; }
  .tab-ico svg { width: 15px; height: 15px; }
  .tab b { font-size: 14px; }
  .tab small { font-size: 11px; }
  .tab-main .arrow { display: none; }
}

/* ---------- Short screens ---------- */
@media (max-height: 700px) {
  .mini { display: none; }
  .lede { font-size: 15px; }
}
@media (max-height: 600px) {
  .faces { height: 22svh; }
  .eyebrow { display: none; }
  .hero h1 { margin-top: 14px; font-size: 29px; }
}

/* ---------- Brand: logo + burgundy ---------- */
.topbar { height: 62px; padding-top: 4px; }
.wordmark {
  display: block; width: 118px; height: 53px;
  background: url(/assets/logo.svg) center / contain no-repeat;
  font-size: 0; color: transparent; letter-spacing: 0; overflow: hidden;
}
.foot-brand {
  width: 150px; height: 67px;
  background: url(/assets/logo.svg) left center / contain no-repeat;
  font-size: 0; color: transparent; overflow: hidden;
}
.tab-main { background: var(--rose); border-color: var(--rose); box-shadow: 0 14px 26px -14px rgba(115, 27, 47, .75); }
.tab-main .tab-ico { background: rgba(255, 255, 255, .16); }
.quiz-card { background: var(--rose); }
.hello { background: radial-gradient(95% 65% at 50% 42%, #FAE9EC 0%, #F4D7DD 60%, #EFC9D2 100%); }
