/* ============================================================
   MABI WRITER — Design System
   Palette: caldo e letterario / Einaudi-Feltrinelli aesthetic
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lora:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-bg:          #FAFAFA;
  --color-surface:     #F2F0ED;
  --color-surface-2:   #E8E4DF;
  --color-text:        #2C2C2C;
  --color-heading:     #1A1A1A;
  --color-accent:      #F07818;
  --color-accent-dark: #C45E08;
  --color-accent-light:#F5A050;
  --color-muted:       #7A6E64;
  --color-border:      #D4C9BA;
  --color-dark:        #1E1A16;
  --color-dark-2:      #2C2520;
  --color-white:       #FFFDF9;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;

  --max-width: 1100px;
  --nav-height: 70px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --transition: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin-bottom: 0.45em; text-wrap: balance; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); margin-bottom: 0.4em; font-weight: 600; text-wrap: balance; }
h4 { font-size: 1.0625rem; font-family: var(--font-ui); font-weight: 600; }

/* Prose body text: Lora at 17px/1.8 sits comfortably in a ~60–65ch measure */
p { margin-bottom: 1.2em; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* Section-level prose containers reset the measure so they flow full-width */
.section-intro,
.hero__description,
.footer__tagline { max-width: none; }

em { font-style: italic; }
strong { font-weight: 500; }

a {
  color: var(--color-accent);
  transition: color var(--transition);
}
a:hover { color: var(--color-accent-dark); }

blockquote {
  position: relative;
  padding: 2.25rem 2.25rem 1.75rem 2.5rem;
  margin: 2.5rem 0;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  max-width: none;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-style: normal;
  line-height: 1;
  color: rgba(240, 120, 24, 0.16);
  pointer-events: none;
  user-select: none;
}

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.section--alt {
  background-color: var(--color-surface);
  /* Hairline borders to separate sections clearly */
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.5rem;
}
/* Used on dark section backgrounds */
.section-label--light { color: rgba(217, 126, 90, 0.75); }

.section-title {
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 580px;
  line-height: 1.75;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }

/* ---------- Grid ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.875rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.btn--primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240, 120, 24, 0.35);
}
.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--outline:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 10px rgba(240, 120, 24, 0.25);
}
.btn--outline:active { transform: scale(0.97); opacity: 0.9; }

.btn--ghost {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.45);
}
.btn--ghost:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.75);
  color: var(--color-white);
}

.btn--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
}
.btn--dark:hover {
  background-color: var(--color-dark-2);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
  border-color: var(--color-surface-2);
}

.card__body {
  padding: 1.625rem;
}

.card__meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card__title {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.65;
  max-width: none;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: 0.4rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(240, 120, 24, 0.15);
}

.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-border); }

/* Inline newsletter form */
.form-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.form-inline .form-input { flex: 1; min-width: 200px; }
.form-inline .btn { flex-shrink: 0; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid rgba(212, 201, 186, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 250, 250, 0.93);
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 16px rgba(30,26,22,0.08);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.navbar__logo:hover { opacity: 0.78; }
.navbar__logo-icon {
  height: 26px;
  width: auto;
  display: block;
}
.navbar__logo span {
  color: var(--color-accent);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.navbar__link {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  padding: 0.375rem 0.7rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.navbar__link:hover {
  color: var(--color-heading);
  background: rgba(44, 44, 44, 0.05);
}
.navbar__link.active {
  color: var(--color-accent);
  background: rgba(240, 120, 24, 0.08);
  font-weight: 600;
}

.navbar__social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--color-muted);
  transition: color var(--transition), background var(--transition);
}
.social-icon:hover {
  color: var(--color-accent);
  background: rgba(240, 120, 24, 0.1);
}
.social-icon svg { width: 18px; height: 18px; }

/* Hamburger */
.navbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: -8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.navbar__burger:hover { background: rgba(44,44,44,0.06); }
.navbar__burger span {
  display: block;
  width: 22px;
  height: 1.75px;
  background: var(--color-heading);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease;
  transform-origin: center;
}
.navbar__burger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.navbar__burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar__burger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile nav */
.navbar__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(250, 250, 250, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem 1.5rem;
  flex-direction: column;
  gap: 0.125rem;
  box-shadow: 0 8px 32px rgba(30,26,22,0.12);
  z-index: 99;
}
.navbar__mobile.open { display: flex; }
.navbar__mobile .navbar__link {
  font-size: 0.9375rem;
  padding: 0.7rem 0.75rem;
  color: var(--color-text);
  border-radius: var(--radius);
}
.navbar__mobile .navbar__link:hover { background: rgba(44,44,44,0.05); color: var(--color-heading); }
.navbar__mobile .navbar__link.active { color: var(--color-accent); background: rgba(240,120,24,0.08); }
.navbar__mobile .navbar__social {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .navbar__nav,
  .navbar__social { display: none; }
  .navbar__burger { display: flex; }
}

/* ---------- Lang Selector ---------- */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
}
.lang-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 5px 7px;
  transition: border-color var(--transition), background var(--transition);
}
.lang-btn:hover { border-color: var(--color-accent); background: rgba(240,120,24,0.06); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.lang-dropdown.open { display: block; }
.lang-option {
  padding: 0.55rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--color-text);
  transition: background var(--transition);
  white-space: nowrap;
}
.lang-option:hover { background: var(--color-surface); }
.lang-option.active { color: var(--color-accent); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  padding: 5.5rem 0 5rem;
  background: var(--color-bg);
}

.hero__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5rem;
  align-items: center;
}

/* Book cover — editorial treatment */
.hero__book-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Ambient glow to suggest warmth */
}

.hero__book-wrap::before {
  content: '';
  position: absolute;
  inset: 8% 6%;
  background: rgba(240, 120, 24, 0.18);
  filter: blur(32px);
  border-radius: 50%;
  z-index: 0;
}

.hero__book-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 310px;
  border-radius: 3px 8px 8px 3px;
  /* Layered shadow: soft ambient + sharp left spine edge */
  box-shadow:
    -4px 0 8px rgba(0,0,0,0.22),
    0 8px 32px rgba(0,0,0,0.18),
    0 32px 64px rgba(0,0,0,0.12);
  transform: rotate(-1.5deg);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
}

.hero__book-wrap:hover .hero__book-img {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    -4px 0 8px rgba(0,0,0,0.2),
    0 16px 48px rgba(0,0,0,0.18),
    0 40px 80px rgba(0,0,0,0.1);
}

.hero__book-badge {
  position: absolute;
  bottom: -0.75rem;
  right: -0.5rem;
  z-index: 2;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.875rem;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(240,120,24,0.4);
}

.hero__kicker {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  display: block;
}

.hero__title {
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--color-muted);
  font-weight: 400;
  margin-bottom: 1.75rem;
  font-style: normal;
  letter-spacing: 0.01em;
}

.hero__description {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 2.25rem;
  max-width: 52ch;
}

@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 0 4rem;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    text-align: center;
  }
  .hero__book-wrap {
    justify-content: center;
  }
  .hero__book-img {
    max-width: 230px;
    transform: rotate(-1deg);
  }
  .hero__book-wrap:hover .hero__book-img {
    transform: rotate(0deg) translateY(-3px);
  }
  .hero__description {
    margin: 0 auto 2rem;
    max-width: 44ch;
  }
  .btn-group { justify-content: center; }
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, #1E1A16 0%, #2C2520 100%);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.page-hero__kicker {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(217, 126, 90, 0.72);
  display: block;
  margin-bottom: 0.75rem;
}
.page-hero__title {
  color: var(--color-white);
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.page-hero__subtitle {
  color: rgba(255,255,255,0.6);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Book Cover Placeholder ---------- */
.book-cover-placeholder {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, var(--color-dark) 0%, var(--color-dark-2) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--color-white);
}
.book-cover-placeholder__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.book-cover-placeholder__author {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
}
.book-cover-placeholder__line {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 1rem auto;
}

/* ---------- Book Cover Image (il-libro sidebar) ---------- */
.book-cover-img {
  width: 100%;
  display: block;
  border-radius: 3px 8px 8px 3px;
  box-shadow:
    -5px 0 10px rgba(0,0,0,0.25),
    0 8px 32px rgba(0,0,0,0.2),
    0 24px 56px rgba(0,0,0,0.14);
}

/* ---------- Portrait Photo (Chi sono) ---------- */
.portrait {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  /* Warm, editorial shadow — heavier on bottom to ground the subject */
  box-shadow:
    0 2px 8px rgba(30,20,10,0.14),
    0 12px 40px rgba(30,20,10,0.16),
    0 32px 64px rgba(30,20,10,0.1);
  /* Subtle warm filter via CSS to enhance the "caldo" feel */
  filter: contrast(1.01) saturate(1.06);
}

.portrait-wrap {
  position: relative;
}

.portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(240, 120, 24, 0.12);
  pointer-events: none;
}

/* ---------- Alert / Notice Box ---------- */
.notice {
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.notice--amber {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.notice--accent {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.notice__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* ---------- Newsletter Section ---------- */
.newsletter-section {
  background: linear-gradient(160deg, #1E1A16 0%, #2C2520 100%);
  padding: 5.5rem 0;
  text-align: center;
}
.newsletter-section h2 { color: var(--color-white); }
.newsletter-section p { color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto 2rem; }
.newsletter-section .form-inline { justify-content: center; max-width: 500px; margin: 0 auto; }
.newsletter-section .form-input { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--color-white); }
.newsletter-section .form-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-section .form-input:focus { border-color: var(--color-accent); }
.newsletter-section .form-note {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  margin-top: 1.125rem;
}
.newsletter-section .form-note a { color: rgba(255,255,255,0.55); }
.newsletter-section .form-note a:hover { color: var(--color-accent-light); }

/* ---------- Kit (ConvertKit) embedded form — matched to site style ---------- */
.newsletter-kit-form .formkit-form { max-width: 460px !important; margin: 0 auto !important; }
.newsletter-kit-form .formkit-background { display: none !important; }
.newsletter-kit-form .formkit-fields {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}
.newsletter-kit-form .formkit-field { flex: 1 1 200px !important; margin: 0 !important; }
.newsletter-kit-form .formkit-input {
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  background: var(--color-white) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}
.newsletter-kit-form .formkit-input::placeholder { color: var(--color-border) !important; }
.newsletter-kit-form .formkit-input:focus {
  outline: none !important;
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(240, 120, 24, 0.15) !important;
}
.newsletter-kit-form .formkit-submit {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.8rem 1.875rem !important;
  font-family: var(--font-ui) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  border-radius: var(--radius) !important;
  border: 1.5px solid transparent !important;
  background-color: var(--color-accent) !important;
  color: var(--color-white) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
  transition: background-color var(--transition), transform 0.15s ease, box-shadow var(--transition) !important;
  cursor: pointer !important;
}
.newsletter-kit-form .formkit-submit:hover {
  background-color: var(--color-accent-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240, 120, 24, 0.35) !important;
}
.newsletter-kit-form .formkit-submit span { color: var(--color-white) !important; }
.newsletter-kit-form .formkit-alert {
  font-family: var(--font-ui) !important;
  font-size: 0.85rem !important;
  border-radius: var(--radius) !important;
  margin-top: 0.75rem !important;
}
.newsletter-kit-form .formkit-guarantee {
  font-family: var(--font-ui) !important;
  font-size: 0.78rem !important;
  color: var(--color-muted) !important;
  margin-top: 0.75rem !important;
}
@media (max-width: 640px) {
  .newsletter-kit-form .formkit-fields { flex-direction: column; }
  .newsletter-kit-form .formkit-submit { width: 100% !important; }
}

/* CTA button large variant — used in newsletter sections */
.btn--cta {
  font-size: 0.9375rem;
  padding: 0.9375rem 2.25rem;
  letter-spacing: 0.02em;
}

/* ---------- Media / Video ---------- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Photo Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery__item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-2);
  cursor: pointer;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery__item:hover img { transform: scale(1.04); }

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-heading);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--color-accent); }

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.faq-icon svg { width: 12px; height: 12px; stroke: var(--color-muted); }

.faq-item.open .faq-icon {
  background: var(--color-accent);
  transform: rotate(45deg);
}
.faq-item.open .faq-icon svg { stroke: white; }

.faq-answer {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  color: var(--color-muted);
  line-height: 1.7;
  font-size: 1rem;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 0 1.25rem;
}

/* ---------- Social Icons Bar ---------- */
.social-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: border-color var(--transition), color var(--transition), background var(--transition),
              box-shadow var(--transition), transform var(--transition);
  background: transparent;
}
.social-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(240, 120, 24, 0.05);
  box-shadow: 0 1px 6px rgba(240,120,24,0.12);
  transform: translateY(-1px);
}
.social-pill:active { transform: scale(0.97); }
.social-pill svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--color-dark) 0%, #141210 100%);
  color: rgba(255,255,255,0.65);
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.footer__logo span { color: var(--color-accent-light); }
.footer__tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
}
.footer__nav-title {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.125rem;
}
.footer__nav-link {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  padding: 0.325rem 0;
  transition: color var(--transition);
}
.footer__nav-link:hover { color: var(--color-accent-light); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.775rem;
  color: rgba(255,255,255,0.28);
}
.footer__social {
  display: flex;
  gap: 0.375rem;
}
.footer .social-icon { color: rgba(255,255,255,0.35); }
.footer .social-icon:hover { color: var(--color-accent-light); background: rgba(255,255,255,0.07); }

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ---------- Divider ---------- */
.divider {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: 1.5rem 0;
  opacity: 0.85;
}
.divider--center { margin: 1.5rem auto; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb__sep { color: var(--color-border); }

/* ---------- Tag ---------- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: var(--color-surface);
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
}

/* ---------- Phase badge ---------- */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: rgba(240, 120, 24, 0.12);
  border: 1px solid rgba(240, 120, 24, 0.3);
  color: var(--color-accent);
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.phase-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 50;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-2px); }
.scroll-top:active { transform: scale(0.9); }
.scroll-top svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }
}

@media (max-width: 480px) {
  .section { padding: 3rem 0; }
  blockquote { padding: 1.75rem 1.5rem 1.25rem 1.75rem; }
  blockquote::before { font-size: 3rem; left: 0.75rem; }
  .grid-stats { grid-template-columns: 1fr !important; }
  .form-inline { flex-direction: column; }
  .form-inline .btn { width: 100%; justify-content: center; }
  .newsletter-section .btn--cta {
    white-space: normal;
    text-align: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
  }
}

/* ---------- Blockquote cite ---------- */
blockquote cite {
  display: block;
  margin-top: 0.625rem;
  font-size: 0.825rem;
  font-style: normal;
  color: var(--color-muted);
  font-family: var(--font-ui);
}

/* ---------- Book stat numbers ---------- */
.book-stat {
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Utility ---------- */
.btn--full { width: 100%; justify-content: center; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Hero page-load animation ---------- */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__book-wrap  { animation: heroFadeIn  0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__kicker     { animation: heroFadeIn  0.6s  0.1s  cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__title      { animation: heroReveal  0.7s  0.15s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__subtitle   { animation: heroFadeIn  0.6s  0.26s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__description{ animation: heroFadeIn  0.65s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .btn-group  { animation: heroFadeIn  0.65s 0.44s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
