/* ============================================================
   Nicoletta Angelini — Psicologa · Design System
   Type: Newsreader (serif) + Hanken Grotesk (sans)
   Palette: warm paper · sage · sand
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #f6f0ea;
  --bg-2:      #ebe2da;
  --bg-3:      #ddd0c6;
  --card:      #fbf6f0;
  --ink:       #2c1c25;
  --ink-soft:  #604a55;
  --ink-faint: #9a8290;

  /* Brand */
  --sage-deep: #5e3c4a;
  --sage:      #7d556780;
  --sage-mid:  #7d5567;
  --sage-soft: #aa8493;
  --tan:       #e1a47f;
  --tan-soft:  #f0c4a8;

  /* Lines & shadows */
  --line:      rgba(44, 28, 37, 0.12);
  --line-soft: rgba(44, 28, 37, 0.07);
  --shadow-sm: 0 1px 2px rgba(44,28,37,.05), 0 2px 8px rgba(44,28,37,.04);
  --shadow-md: 0 4px 14px rgba(44,28,37,.07), 0 12px 36px rgba(44,28,37,.06);
  --shadow-lg: 0 10px 30px rgba(44,28,37,.10), 0 24px 60px rgba(44,28,37,.08);

  /* Type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --container: 1180px;
  --radius:   12px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}

.section { padding: clamp(72px, 9vw, 132px) 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-mid);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--tan);
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  max-width: 18ch;
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--sage-deep);
  --fg-btn: #f7f6f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--bg-btn);
  color: var(--fg-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  --bg-btn: transparent;
  --fg-btn: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(35,38,31,.04); box-shadow: none; }

.btn--tan { --bg-btn: var(--tan); --fg-btn: #34301f; }
.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(244, 242, 236, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav__inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 9999;
  background: var(--sage-deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; outline: 3px solid var(--tan); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-deep);
  color: #f3f2ea;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: -0.02em;
  flex: none;
}
.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand__name span { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

.nav__links { display: flex; align-items: center; gap: 30px; white-space: nowrap; }
.nav__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: var(--sage-mid);
  transition: right .3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }

.nav__cta { display: flex; align-items: center; gap: 14px; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__toggle span { position: relative; width: 18px; height: 1.6px; background: var(--ink); display: block; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink); }
.nav__toggle span::before { top: -6px; } .nav__toggle span::after { top: 6px; }

/* ---------- Image placeholders ---------- */
.ph {
  position: relative;
  background-color: var(--bg-3);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(94,60,74,.10) 0 2px,
    transparent 2px 11px
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ph__tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--sage-deep);
  background: rgba(251,250,245,.78);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 100px;
  backdrop-filter: blur(2px);
}

/* ---------- Reveal animation (visible by default; hidden only when JS active) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
