/* ============================================================
   CLARA'S SKIN DIARY — Shared stylesheet
   Tokens › Reset › Topbar › Header/Nav › Buttons › Layout
   Typography › Entry cards › Page hero › Footer › Animations
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --ink:     #1A1A1B;
  --red:     #9B1C2A;
  --grey:    #BDBDBD;
  --grey-dk: #777;
  --cream:   #FAF7F2;
  --white:   #FFFFFF;
  --border:  #E4DED5;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --max: 1160px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--ink); color: var(--white);
  padding: .5rem 1rem; z-index: 999; font-size: .85rem;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  background: var(--ink); color: var(--grey);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .5rem var(--pad);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.topbar a { color: var(--grey); transition: color .2s; }
.topbar a:hover { color: var(--white); }
.tb-links { display: flex; gap: 1.5rem; }
.tb-label { }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 1rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}

.logo-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; letter-spacing: -.01em; }
.logo-main .claras { font-style: italic; color: var(--red); }
.logo-tag { font-size: .63rem; letter-spacing: .13em; text-transform: uppercase; color: var(--grey-dk); margin-top: .18rem; }

.nav-list { display: flex; gap: 1.75rem; align-items: center; }
.nav-list a { font-size: .84rem; letter-spacing: .03em; color: var(--ink); opacity: .65; transition: opacity .2s; position: relative; }
.nav-list a:hover, .nav-list a[aria-current="page"] { opacity: 1; }
.nav-list a[aria-current="page"]::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1.5px; background: var(--red);
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .4rem; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .73rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: .52rem 1.1rem;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  cursor: pointer; transition: background .2s, color .2s; white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-red:hover { background: #7c1622; border-color: #7c1622; color: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.25); color: var(--white); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-lg { padding: .7rem 1.4rem; font-size: .78rem; }

.link-arrow {
  font-size: .78rem; font-weight: 500; letter-spacing: .04em; color: var(--ink);
  display: inline-flex; align-items: center; gap: .35rem;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
  transition: color .2s, gap .2s;
}
.link-arrow:hover { color: var(--red); gap: .6rem; }
.link-arrow-light { color: var(--grey); border-color: var(--grey); }
.link-arrow-light:hover { color: var(--white); border-color: var(--white); }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.section    { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-lg { padding: 6rem 0; }

.bg-white { background: var(--white); }
.bg-ink   { background: var(--ink); color: var(--white); }
.bg-cream { background: var(--cream); }

/* ── TYPOGRAPHY UTILITIES ───────────────────────────────── */
.eyebrow {
  display: block; font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--grey-dk); margin-bottom: .75rem;
}
.eyebrow-red { color: var(--red); }

h2.s-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15; letter-spacing: -.015em; text-wrap: balance;
}
h2.s-title em { font-style: italic; color: var(--red); }

.s-sub { font-size: .93rem; color: #5a5550; line-height: 1.65; max-width: 46ch; margin-top: .6rem; }
.s-head { margin-bottom: 2.5rem; }
.s-head-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem;
}

.cat-tag {
  display: inline-block; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); border: 1px solid currentColor; padding: .18rem .55rem;
}

/* ── DATELINE (homepage hero) ───────────────────────────── */
.dateline {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.75rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2.75rem;
}
.dl-txt { font-size: .67rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey-dk); white-space: nowrap; }
.dl-rule { flex: 1; height: 1px; background: var(--border); }

/* ── PAGE HERO (inner pages) ────────────────────────────── */
.page-hero { max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--pad) 0; }
.page-hero-inner { border-bottom: 1px solid var(--border); padding-bottom: 2.5rem; margin-bottom: 3rem; }
h1.page-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; margin-bottom: .75rem;
}
h1.page-title em { font-style: italic; color: var(--red); }
.page-lead { font-size: 1rem; color: #5a5550; line-height: 1.72; max-width: 52ch; margin-top: .5rem; }
.page-meta {
  margin-top: 1.25rem;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-dk);
}

/* ── ENTRY CARDS (homepage + diary) ─────────────────────── */
.entry-link { display: block; background: var(--white); color: inherit; transition: background .15s; }
.entry-link:hover { background: #f5f0e8; }

.entry-thumb { width: 100%; overflow: hidden; }
.thumb-fill { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.tf-1 { background: #EAE4DA; }
.tf-2 { background: #E5DDD4; }
.tf-3 { background: #EDEAE3; }
.tf-4 { background: #E2DAD0; }
.tf-5 { background: #EDEBE5; }
.thumb-word { font-family: var(--serif); font-style: italic; color: rgba(155,28,42,.13); line-height: 1.1; text-align: center; }

.entry-body { padding: 1.75rem; }
.entry-meta { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.e-date { font-family: var(--serif); font-style: italic; font-size: .87rem; color: var(--red); }
.e-cat { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-dk); }
.e-title { font-family: var(--serif); font-weight: 400; line-height: 1.22; margin-bottom: .7rem; font-size: 1.15rem; }
.e-title-lg { font-size: 1.6rem; letter-spacing: -.01em; }
.e-excerpt { font-size: .89rem; color: #5a5550; line-height: 1.62; margin-bottom: 1rem; }
.e-read { font-size: .76rem; letter-spacing: .04em; color: var(--red); display: inline-flex; align-items: center; gap: .3rem; transition: gap .2s; }
.entry-link:hover .e-read { gap: .55rem; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--white); border-top: 1px solid var(--border); }
.footer-top {
  max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--pad);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-logo { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; margin-bottom: .5rem; }
.footer-logo .claras { font-style: italic; color: var(--red); }
.footer-brand p { font-size: .83rem; color: #666; line-height: 1.6; max-width: 28ch; margin-top: .5rem; }
.footer-col h5 { font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-dk); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { font-size: .85rem; color: #555; transition: color .2s; }
.footer-col a:hover { color: var(--red); }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 1.25rem var(--pad);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.footer-copy { font-size: .68rem; color: var(--grey-dk); max-width: 60ch; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .68rem; color: var(--grey-dk); letter-spacing: .04em; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }

/* ── NEWSLETTER ─────────────────────────────────────────── */
.newsletter { background: var(--ink); color: var(--white); padding: 5.5rem 0; }
.nl-inner { max-width: 560px; margin: 0 auto; text-align: center; padding: 0 var(--pad); }
.nl-inner .eyebrow { color: var(--grey); }
.nl-inner h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.75rem, 3.5vw, 2.4rem); line-height: 1.15; color: var(--white); margin-bottom: .85rem; }
.nl-inner h2 em { font-style: italic; color: #c07080; }
.nl-inner p { font-size: .92rem; color: var(--grey); margin-bottom: 2rem; }
.nl-form { display: flex; max-width: 420px; margin: 0 auto; }
.nl-form input {
  flex: 1; border: 1px solid rgba(255,255,255,.18); border-right: none;
  background: rgba(255,255,255,.05); color: var(--white);
  font-size: .9rem; padding: .73rem 1rem; outline: none;
}
.nl-form input::placeholder { color: rgba(255,255,255,.3); }
.nl-form input:focus { border-color: rgba(255,255,255,.4); }
.nl-form button {
  background: var(--red); border: 1px solid var(--red); color: var(--white);
  font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: .73rem 1.1rem; cursor: pointer; transition: background .2s; white-space: nowrap;
}
.nl-form button:hover { background: #7c1622; border-color: #7c1622; }
.nl-note { margin-top: .75rem; font-size: .68rem; color: rgba(255,255,255,.27); letter-spacing: .04em; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.visible { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-list { display: none; }
  .nav-toggle { display: flex; }
  .tb-label { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .nl-form { flex-direction: column; }
  .nl-form input { border-right: 1px solid rgba(255,255,255,.18); border-bottom: none; }
}

/* ── IMAGE SLOTS ─────────────────────────────────────────── */
/* Entry thumbnails — cover photo fills the coloured placeholder */
.entry-thumb { position: relative; }
.entry-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured diary entry thumbnail */
.fe-thumb { position: relative; }
.fe-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Product card images — contain so packaging isn't cropped */
.pc-img-slot { aspect-ratio: 4/3; background: #F0EDE8; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pc-img-slot img { max-height: 85%; max-width: 65%; object-fit: contain; display: block; padding: .5rem; }

/* Shelf/testing cards — product against dark background */
.shelf-img-slot { width: 100%; aspect-ratio: 2/1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(255,255,255,.05); margin-bottom: .25rem; }
.shelf-img-slot img { height: 90%; max-width: 50%; object-fit: contain; display: block; }

/* Routine step images — small square beside each product name */
.step-img-slot { width: 72px; height: 72px; flex-shrink: 0; background: var(--cream); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.step-img-slot img { max-width: 100%; max-height: 100%; object-fit: contain; padding: .35rem; display: block; }

/* About/home portrait placeholder — photo fills the dark ink panel */
.portrait-slot { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.portrait-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
