/* ──────────────────────────────────────────────
   NoeMi Creative — Shared Components
   Reset, base, layout, nav, footer, buttons, cards
   ────────────────────────────────────────────── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video { max-width: 100%; display: block; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ── Layout helpers ────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw-default);
  margin: 0 auto;
  padding: 0 var(--gutter-mobile);
}

.container-prose { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 var(--gutter-mobile); }
.container-wide  { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 var(--gutter-mobile); }
.container-tight { max-width: var(--maxw-tight); margin: 0 auto; padding: 0 var(--gutter-mobile); }

@media (min-width: 768px) {
  .container, .container-prose, .container-wide, .container-tight {
    padding: 0 var(--gutter-tablet);
  }
}

@media (min-width: 1100px) {
  .container, .container-prose, .container-wide, .container-tight {
    padding: 0 var(--gutter-desk);
  }
}

section { padding: var(--section-py) 0; }
section.section-lg { padding: var(--section-py-lg) 0; }

/* ── Typography ──────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text);
}

h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h5 { font-size: var(--fs-lg); line-height: var(--lh-snug); }

.display {
  font-size: var(--fs-5xl);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

em, .italic { font-style: italic; }

p { line-height: var(--lh-relaxed); }
p + p { margin-top: 1em; }
.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-tracked);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-tracked);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.eyebrow-line::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 18px 32px;
  border-radius: 0;
  text-decoration: none;
  transition: all var(--dur-base) var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost-light {
  background: transparent;
  color: var(--bg);
  border-color: var(--bg);
}
.btn-ghost-light:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-light {
  background: var(--bg);
  color: var(--text);
}
.btn-light:hover {
  background: var(--bg-soft);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 4px;
  transition: all var(--dur-base) var(--ease);
}
.btn-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-arrow::after {
  content: '→';
  display: inline-block;
  transition: transform var(--dur-base) var(--ease);
  font-size: 1.1em;
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ── Navigation ──────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(251, 248, 243, 0.94);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--border);
}

/* .scrolled keeps backwards-compat with old JS toggle (no-op now). */
.nav.scrolled { background: rgba(251, 248, 243, 0.96); }

.nav-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 14px var(--gutter-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

@media (min-width: 768px) { .nav-inner { padding-left: var(--gutter-tablet); padding-right: var(--gutter-tablet); } }
@media (min-width: 1100px) { .nav-inner { padding-left: var(--gutter-desk); padding-right: var(--gutter-desk); } }

.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand em {
  font-style: italic;
  color: var(--accent);
}
.brand:hover { color: var(--accent); }

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--text);
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-base) var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: all var(--dur-base) var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile menu drawer */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--bg);
  padding-top: 80px;
  flex-direction: column;
}

.nav-mobile.open { display: flex; }

.nav-mobile-list {
  list-style: none;
  padding: var(--space-8) var(--gutter-mobile);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.nav-mobile-list a {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  color: var(--text);
}

.nav-mobile-list a:hover { color: var(--accent); }

.nav-mobile-cta {
  margin-top: auto;
  padding: var(--space-8) var(--gutter-mobile);
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .nav-mobile { display: none !important; }
}

/* ── Footer ──────────────────────────────────── */
.footer {
  background: var(--bg-deep);
  color: var(--text-on-deep);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 var(--gutter-mobile);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    padding: 0 var(--gutter-tablet);
  }
}

@media (min-width: 1100px) {
  .footer-inner { padding: 0 var(--gutter-desk); }
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
}
.footer-brand em { font-style: italic; color: var(--accent-soft); }

.footer-tagline {
  font-size: var(--fs-sm);
  color: var(--text-on-deep-muted);
  max-width: 320px;
  line-height: var(--lh-relaxed);
}

.footer h5 {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-tracked);
  text-transform: uppercase;
  color: var(--text-on-deep-muted);
  margin-bottom: var(--space-4);
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer ul a {
  font-size: var(--fs-sm);
  color: var(--text-on-deep);
  transition: color var(--dur-base) var(--ease);
}
.footer ul a:hover { color: var(--accent-soft); }

.footer-bottom {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: var(--space-8) var(--gutter-mobile) 0;
  margin-top: var(--space-8);
  border-top: 1px solid rgba(251, 248, 243, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-on-deep-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-8) var(--gutter-tablet) 0;
  }
}

@media (min-width: 1100px) {
  .footer-bottom { padding: var(--space-8) var(--gutter-desk) 0; }
}

/* ── Page header offset (under fixed nav) ───── */
main { padding-top: 0; }
.page-hero { padding-top: 140px; }
@media (min-width: 768px) { .page-hero { padding-top: 180px; } }

/* ── Mobile photo-slot height cap ────────────── */
/* Photo-placeholder containers can become very tall on narrow screens.
   Cap them so the gradient doesn't dominate the page when no real
   image has been provided. Photos with object-fit:cover still fill. */
@media (max-width: 767px) {
  .hero-photo,
  .about-teaser-photo,
  .despre-portrait,
  .case-photo,
  .gallery-item {
    max-height: 60vh;
  }
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--space-8);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

/* ── Forms ──────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.field label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-tracked);
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  color: var(--text);
  transition: border-color var(--dur-base) var(--ease);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: var(--lh-relaxed);
}

.field input.error,
.field textarea.error {
  border-color: var(--error);
}

.field-hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: var(--space-1);
}

/* ── Consent checkbox (newsletter opt-in, etc.) ─── */
.field-checkbox {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  margin: var(--space-5) 0;
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease);
}

.field-checkbox:hover { background: var(--accent-50, var(--bg-soft)); }

.field-checkbox input[type="checkbox"] {
  margin-top: 0.25em;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.field-checkbox span {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
}

/* Variant for the contact modal (darker context, slightly different) */
.contact-modal .field-checkbox {
  background: var(--bg);
  border-left-color: var(--accent);
}

/* Required-consent variant: slightly stronger accent so the obligatory
   privacy bifa reads visually distinct from the optional newsletter one. */
.field-checkbox.required {
  border-left-width: 3px;
  background: var(--accent-50, var(--bg-soft));
}
.field-checkbox.required:hover { background: var(--accent-100, var(--accent-50, var(--bg-soft))); }
.field-checkbox.required strong {
  color: var(--accent);
  font-weight: 600;
}

/* Error state — validation tripped because user didn't tick the required box */
.field-checkbox.error {
  border-left-color: #b32d2d;
  background: rgba(179, 45, 45, 0.06);
  animation: cb-shake 0.32s var(--ease);
}
.field-checkbox.error span { color: #7a1f1f; }
@keyframes cb-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* Dark-section variant — used on the webinar page where the form sits on
   a dark background. Inverts text + softens the surface so the checkbox
   reads as part of the dark composition rather than a pasted light card. */
.field-checkbox-on-dark {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--accent-200, var(--accent));
}
.field-checkbox-on-dark:hover { background: rgba(255, 255, 255, 0.09); }
.field-checkbox-on-dark span { color: rgba(255, 255, 255, 0.86); }
.field-checkbox-on-dark span a {
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.field-checkbox-on-dark.required {
  background: rgba(255, 255, 255, 0.08);
}
.field-checkbox-on-dark.required strong {
  color: var(--accent-200, var(--accent));
}
.field-checkbox-on-dark.error {
  border-left-color: #ff8b8b;
  background: rgba(255, 130, 130, 0.12);
}
.field-checkbox-on-dark.error span { color: #ffd5d5; }

/* ── Photo slots: img overlays gradient when src is set ──────────── */
img[data-content-attr] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 2;
}
img[data-content-attr][src]:not([src=""]) { display: block; }

/* Empty-photo treatment: centered "N" watermark + atmospheric overlay
   so empty placeholders read as intentional brand surfaces, not missing.
   Image overlay (z-index:2) covers the watermark when a real photo loads. */
.hero-photo,
.about-teaser-photo,
.despre-portrait,
.case-photo,
.gallery-item {
  overflow: hidden;
}

.hero-photo::before,
.about-teaser-photo::before,
.despre-portrait::before,
.case-photo::before,
.gallery-item::before {
  content: 'N';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(6rem, 22vw, 16rem);
  letter-spacing: -0.05em;
  color: rgba(122, 79, 51, 0.16);
  pointer-events: none;
  z-index: 0;
  user-select: none;
  line-height: 1;
}

/* Subtle inner border for editorial framing */
.hero-photo::after,
.about-teaser-photo::after,
.despre-portrait::after,
.case-photo::after,
.gallery-item::after {
  z-index: 1;
}

/* Containers that hold avatar-style overlays need a positioning context */
.speaker-avatar, .speaker-card-photo, .testimonial-tile .avatar {
  position: relative;
}

/* Circular containers — make the overlay image circular too */
.speaker-avatar img[data-content-attr],
.speaker-card-photo img[data-content-attr],
.testimonial-tile .avatar img[data-content-attr] {
  border-radius: 50%;
}

/* ── Animations: fade in on scroll ──────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger by data attribute */
.fade-in[data-delay="1"] { transition-delay: 80ms; }
.fade-in[data-delay="2"] { transition-delay: 160ms; }
.fade-in[data-delay="3"] { transition-delay: 240ms; }
.fade-in[data-delay="4"] { transition-delay: 320ms; }

/* ── Cookie consent banner (CMP-grade with granular controls) ── */
.consent {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: var(--z-modal);
  background: var(--bg-deep);
  color: var(--text-on-deep);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: block;
  box-shadow: var(--shadow-lift);
  max-width: 520px;
  animation: consent-slide-up 320ms var(--ease-out);
  border-top: 3px solid var(--accent);
}

@keyframes consent-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 768px) {
  .consent { left: auto; bottom: 24px; right: 24px; }
}

.consent h4,
.consent h5 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-lg);
  color: var(--text-on-deep);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}
.consent h5 {
  font-size: var(--fs-base);
  font-style: italic;
}

.consent p {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-on-deep-muted);
  margin: 0 0 var(--space-5);
}

.consent a {
  color: var(--accent-200);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color var(--dur-base) var(--ease);
}
.consent a:hover { color: var(--bg); }

.consent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consent-btn {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  white-space: nowrap;
}

.consent-btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.consent-btn-primary:hover {
  background: var(--accent-hover);
}

.consent-btn-ghost {
  background: transparent;
  color: var(--text-on-deep);
  border-color: rgba(251, 248, 243, 0.3);
}
.consent-btn-ghost:hover {
  background: rgba(251, 248, 243, 0.06);
  border-color: var(--text-on-deep);
}

.consent-btn-link {
  background: transparent;
  color: var(--accent-200);
  padding: 11px 6px;
  border-bottom: 1px solid transparent;
}
.consent-btn-link:hover {
  color: var(--bg);
  border-bottom-color: var(--bg);
}

/* ── Preferences panel (granular controls) ── */
.consent-prefs {
  display: block;
}
.consent-prefs[hidden] { display: none; }

.consent-pref {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(251, 248, 243, 0.08);
  cursor: pointer;
}
.consent-pref:last-of-type { border-bottom: none; margin-bottom: var(--space-4); }

.consent-pref input[type="checkbox"] {
  margin-top: 0.25em;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-pref input[disabled] { opacity: 0.6; cursor: not-allowed; }

.consent-pref div { display: flex; flex-direction: column; gap: 4px; }

.consent-pref strong {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-on-deep);
}

.consent-pref span {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-on-deep-muted);
}

/* ── Toast notifications ────────────────────── */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: var(--z-toast);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur-base) var(--ease-out);
}

.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }

/* ── Modal ──────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: var(--z-modal);
  background: rgba(26, 22, 18, 0.72);
  align-items: center;
  justify-content: center;
  padding: var(--gutter-mobile);
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--bg);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  max-width: 460px;
  width: 100%;
}

.modal-box .modal-emoji { font-size: 3rem; margin-bottom: var(--space-4); }
.modal-box h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.modal-box p { color: var(--text-muted); margin-bottom: var(--space-6); }

/* ── Contact Modal (auto-injected by contact-modal.js) ── */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(26, 22, 18, 0.78);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
  overflow-y: auto;
}

.contact-modal-overlay[hidden] { display: none; }
.contact-modal-overlay.open { opacity: 1; }

@media (min-width: 700px) {
  .contact-modal-overlay { align-items: center; padding: var(--space-6); }
}

.contact-modal {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 540px;
  max-height: 100svh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform var(--dur-base) var(--ease-out);
  border-top: 4px solid var(--accent);
}

@media (min-width: 700px) {
  .contact-modal {
    max-height: calc(100svh - 48px);
    border-top: none;
    border-left: 4px solid var(--accent);
  }
}

.contact-modal-overlay.open .contact-modal { transform: translateY(0); }

.contact-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border-radius: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal-close:hover { background: var(--bg-soft); color: var(--text); }

.contact-modal-inner {
  padding: var(--space-10) var(--space-6) var(--space-8);
}

@media (min-width: 700px) {
  .contact-modal-inner { padding: var(--space-10) var(--space-8); }
}

.contact-modal-inner h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-3);
  line-height: var(--lh-snug);
}

.contact-modal-inner h2 em {
  font-style: italic;
  color: var(--accent);
}

.contact-modal-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  line-height: var(--lh-relaxed);
}

.contact-modal .form-error {
  background: rgba(180, 87, 87, 0.08);
  border-left: 2px solid var(--error);
  padding: 10px 14px;
  font-size: var(--fs-sm);
  color: var(--error);
  margin-bottom: var(--space-4);
  display: none;
}
.contact-modal .form-error.show { display: block; }

.contact-modal .honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
}

/* ── Nav logo image (with text-wordmark fallback) ──── */
.brand-logo {
  display: block;
  height: 60px;
  width: auto;
  max-width: 220px;
}
@media (min-width: 768px) {
  .brand-logo { height: 76px; max-width: 280px; }
}

.footer-brand-logo {
  display: block;
  height: 88px;
  width: auto;
  max-width: 320px;
  margin-bottom: var(--space-3);
}

/* Text wordmark fallback — used when /assets/logo.png 404s */
.brand-text {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
  display: inline-block;
}
.brand-text em {
  font-style: italic;
  color: var(--accent);
}
@media (min-width: 768px) {
  .brand-text { font-size: 1.8rem; }
}

.footer-brand-text {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: -0.01em;
  color: var(--text-on-deep);
  line-height: 1;
  display: inline-block;
  margin-bottom: var(--space-3);
}
.footer-brand-text em {
  font-style: italic;
  color: var(--accent-soft);
}

/* ── Section dividers ───────────────────────── */
.divider-rule {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--border-strong);
  margin: var(--space-8) auto;
}

/* ── Utility ────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.serif-italic { font-family: var(--serif); font-style: italic; }
.no-wrap { white-space: nowrap; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Section dark variant */
.section-dark {
  background: var(--bg-deep);
  color: var(--text-on-deep);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark h5 { color: var(--text-on-deep); }
.section-dark .lead, .section-dark p { color: var(--text-on-deep-muted); }
.section-dark .eyebrow-line { color: var(--text-on-deep-muted); }
.section-dark .eyebrow { color: var(--accent-soft); }

/* Section soft variant */
.section-soft { background: var(--bg-soft); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}
