/* ============================================================
   SkinCares — warm peach / rose palette on cream
   ============================================================ */
:root {
  --bg:           #FFF8F4;
  --bg-soft:      #FDEEE8;
  --bg-elevated:  #FFFFFF;
  --fg:           #2A0E1F;
  --fg-soft:      #4A1F36;
  --muted:        #8A6B7C;
  --border:       #F2DDD5;
  --border-strong:#E5C5B9;

  --brand:        #E11D74;
  --brand-strong: #B8155F;
  --brand-soft:   #FBDDE9;
  --accent:       #F472B6;

  /* Category colors used across the analyzer + glossary */
  --c-aqua:   #06B6D4;   /* hydration  */
  --c-tan:    #F97316;   /* exfoliation */
  --c-plum:   #8B5CF6;   /* anti-aging */
  --c-gold:   #EAB308;   /* brightening */
  --c-leaf:   #16A34A;   /* antioxidant */
  --c-mint:   #14B8A6;   /* soothing */
  --c-rose:   #EC4899;   /* barrier */
  --c-sun:    #F59E0B;   /* sunscreen */
  --c-clay:   #A16207;   /* occlusive */
  --c-slate:  #64748B;   /* cleansing */
  --c-coral:  #EF4444;   /* anti-acne */
  --c-warn:   #D97706;   /* caution */

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(42,14,31,0.06);
  --shadow-md: 0 8px 24px rgba(42,14,31,0.08), 0 2px 6px rgba(42,14,31,0.04);

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color 120ms, border-color 120ms; }
a:hover { color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--fg);
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); line-height: 1.05; font-weight: 900; }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.1rem; font-weight: 700; }

p { margin: 0 0 1em 0; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,248,244,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .row { padding: 0.85rem 0; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--brand); }
.brand .mark {
  width: 42px; height: 42px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.brand .wordmark { line-height: 1.1; display: flex; flex-direction: column; }
.brand .wordmark span { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.brand .wordmark small {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); font-weight: 600;
  font-family: var(--font-sans);
}
.nav { display: flex; gap: 1.3rem; }
.nav a { color: var(--muted); font-weight: 500; font-size: 0.93rem; }
.nav a:hover { color: var(--brand); }

/* Hero */
.hero { padding: 4rem 0 3.5rem; text-align: center; }
.hero .eyebrow {
  display: inline-block; padding: 0.35em 0.95em;
  border: 1px solid var(--brand-soft); border-radius: 999px;
  background: rgba(225,29,116,0.06); color: var(--brand);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  margin-bottom: 1.25rem;
}
.hero h1 .accent { color: var(--brand); font-style: italic; }
.hero .lede { max-width: 62ch; margin: 0 auto 1.5rem; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.65em 1.3em;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; transition: all 120ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-secondary { background: #fff; color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* Sections */
.section { padding: 3.5rem 0; }
.section-muted { background: var(--bg-soft); }
.section-head { margin-bottom: 1.5rem; }
.section-head .eyebrow {
  display: inline-block; color: var(--brand);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 0.45rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ===== Analyzer ===== */
.analyzer {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .analyzer { grid-template-columns: 1fr; } }

.input-block { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.samples { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.samples .lbl { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-right: 0.4rem; }
.chip {
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.35em 0.85em; font: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 120ms;
}
.chip:hover { background: var(--brand); color: #fff; }

#inci {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-soft); color: var(--fg);
  resize: vertical;
}
#inci:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225,29,116,0.15); }

.result-summary { padding: 1rem 1.25rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.summary-grid > div { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.summary-grid .sval { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--brand); }
.dist { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 0.75rem; background: var(--bg-soft); }
.dist > span { display: block; height: 100%; }

.ingredient-list { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1rem; }
.ing {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cat, var(--border-strong));
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  display: grid; grid-template-columns: 1fr auto;
  gap: 0.4rem;
  animation: ing-in 220ms ease;
}
@keyframes ing-in {
  from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); }
}
.ing strong { color: var(--cat, var(--fg)); }
.ing .desc { grid-column: 1 / -1; font-size: 0.88rem; color: var(--muted); }
.ing .cat-pill {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: color-mix(in srgb, var(--cat) 14%, transparent);
  color: var(--cat, var(--fg));
}
.ing .tags { font-size: 0.78rem; color: var(--muted); }
.ing.unknown { border-left-color: var(--border-strong); opacity: 0.85; }
.ing.unknown strong { color: var(--fg-soft); }

/* ===== Quiz ===== */
.quiz { padding: 1.5rem; max-width: 720px; margin: 0 auto; }
.quiz-progress {
  height: 6px; background: var(--bg-soft); border-radius: 999px;
  position: relative; margin-bottom: 1.5rem;
}
.quiz-progress > span {
  display: block; height: 100%; width: 20%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px;
  transition: width 240ms ease;
}
.quiz-progress .qprog-text {
  position: absolute; right: 0; top: -22px;
  font-size: 0.75rem; color: var(--muted); font-weight: 600;
}
.q { animation: q-in 240ms ease; }
@keyframes q-in {
  from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); }
}
.q h3 { font-family: var(--font-display); font-weight: 700; margin-bottom: 1rem; }
.q-opts { display: grid; gap: 0.5rem; }
.q-opt {
  text-align: left;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.85em 1em;
  font: inherit; font-size: 0.95rem;
  cursor: pointer;
  transition: all 120ms;
}
.q-opt:hover { border-color: var(--brand); }
.q-opt.selected { background: var(--brand-soft); border-color: var(--brand); }
.q-actions { display: flex; justify-content: space-between; margin-top: 1.25rem; }

.quiz-result { animation: q-in 240ms ease; }
.quiz-result .summary {
  background: var(--brand-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.quiz-result .summary h3 { font-family: var(--font-display); margin: 0 0 0.4rem; }
.quiz-result .reco {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}
.quiz-result .reco-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cat);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}
.quiz-result .reco-card strong { color: var(--cat); display: block; margin-bottom: 0.2rem; }
.quiz-result .reco-card span { font-size: 0.82rem; color: var(--muted); }

/* ===== Glossary ===== */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.cat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 4px solid var(--cat);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.cat-card strong { color: var(--cat); display: block; margin-bottom: 0.3rem; }
.cat-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); }
.site-footer .legal { padding: 1rem 0 1.5rem; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--border); }
.footlist { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.footlist li a { display: block; padding: 0.2rem 0; color: var(--muted); font-size: 0.9rem; }
.footlist li a:hover { color: var(--brand); }
