/* ============================================
   STRABO - Design Tokens
   Warm editorial palette: parchment, ink, terracotta
   ============================================ */

:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 880px;
  --content-wide: 1140px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Instrument Serif', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

/* ---- LIGHT MODE (Parchment) ---- */
:root,
[data-theme='light'] {
  --color-bg: #f6f1e9;
  --color-surface: #faf6ee;
  --color-surface-2: #fbf8f2;
  --color-surface-offset: #efe8dc;
  --color-surface-offset-2: #e8e0d0;
  --color-divider: #d9d0c2;
  --color-border: #d4c9b6;

  --color-text: #2c2418;
  --color-text-muted: #7a6e5a;
  --color-text-faint: #b0a48f;
  --color-text-inverse: #faf6ee;

  --color-accent: #a04518;
  --color-accent-hover: #833810;
  --color-accent-active: #5f2808;
  --color-accent-highlight: #e8d4c4;
  --color-accent-soft: #d4a878;

  --color-gold: #b8851a;
  --color-gold-soft: #e8d4a0;

  --shadow-sm: 0 1px 2px oklch(0.3 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.3 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.3 0.02 60 / 0.12);
}

/* ---- DARK MODE (Ink & Ember) ---- */
[data-theme='dark'] {
  --color-bg: #1a1612;
  --color-surface: #211d18;
  --color-surface-2: #251f1a;
  --color-surface-offset: #1e1a15;
  --color-surface-offset-2: #2a241e;
  --color-divider: #2e2820;
  --color-border: #3d3528;

  --color-text: #d8cdba;
  --color-text-muted: #948672;
  --color-text-faint: #5e5447;
  --color-text-inverse: #211d18;

  --color-accent: #cc6b3e;
  --color-accent-hover: #e07e50;
  --color-accent-active: #a85530;
  --color-accent-highlight: #3a2a1e;
  --color-accent-soft: #6e4830;

  --color-gold: #d4a040;
  --color-gold-soft: #3a3020;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a1612;
    --color-surface: #211d18;
    --color-surface-2: #251f1a;
    --color-surface-offset: #1e1a15;
    --color-surface-offset-2: #2a241e;
    --color-divider: #2e2820;
    --color-border: #3d3528;
    --color-text: #d8cdba;
    --color-text-muted: #948672;
    --color-text-faint: #5e5447;
    --color-text-inverse: #211d18;
    --color-accent: #cc6b3e;
    --color-accent-hover: #e07e50;
    --color-accent-active: #a85530;
    --color-accent-highlight: #3a2a1e;
    --color-accent-soft: #6e4830;
    --color-gold: #d4a040;
    --color-gold-soft: #3a3020;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.5);
  transition: box-shadow var(--transition-interactive);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.logo svg { width: 32px; height: 32px; }
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  line-height: 1;
}

.header-nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}
.header-nav a {
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 500;
}
.header-nav a:hover { color: var(--color-accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
}
.theme-toggle:hover { color: var(--color-accent); border-color: var(--color-accent); }

@media (min-width: 768px) {
  .header-nav { display: flex; }
}

/* ---- Layout helpers ---- */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

section { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); }

.section-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-top: clamp(var(--space-16), 12vw, var(--space-24));
  padding-bottom: clamp(var(--space-12), 8vw, var(--space-20));
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.hero-eyebrow {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  max-width: 14ch;
}

.hero-title .accent { color: var(--color-accent); font-style: italic; }

.hero-tagline {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 38ch;
  line-height: 1.5;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-interactive);
  min-height: 44px;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:active { background: var(--color-accent-active); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: oklch(from var(--color-border) l c h / 0.6);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- How It Works ---- */
.steps {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-10);
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
}

.step {
  position: relative;
  padding-top: var(--space-6);
}
.step-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.step-number::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: var(--space-3);
}
.step h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.step p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- Banner ---- */
.banner {
  position: relative;
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(26, 22, 18, 0.25), rgba(26, 22, 18, 0.55));
  padding: var(--space-6);
}
.banner-quote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  color: #f6f1e9;
  text-align: center;
  max-width: 700px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
  .banner-quote {
    font-size: var(--text-xl);
  }
}

/* ---- Services ---- */
.services {
  background: var(--color-surface-offset);
}
.service-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
}
@media (min-width: 768px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: oklch(from var(--color-accent) l c h / 0.3);
}

.service-icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.service-card .price {
  font-size: var(--text-sm);
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.service-card p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.service-card ul {
  list-style: none;
  padding: 0;
  margin-top: auto;
}
.service-card ul li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  padding-left: var(--space-4);
  position: relative;
}
.service-card ul li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ---- About ---- */
.about-grid {
  display: grid;
  gap: var(--space-12);
  align-items: start;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1.2fr; gap: var(--space-16); }
}

.about-portrait {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
}
/* Pin the portrait only in the two-column layout, where it sits in its own
   column and cannot collide with the body text. In the single-column stack a
   sticky card stays put while the About copy scrolls up over the top of it,
   which reads as a rendering error. The min-height guard keeps the card from
   being clipped below the fold on short windows (card is ~700px tall). */
@media (min-width: 768px) and (min-height: 780px) {
  .about-portrait {
    position: sticky;
    top: 4.5rem;
  }
}
.about-portrait .initials {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-4);
}
.about-portrait .about-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  background: var(--color-surface-offset);
}
.about-portrait .about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.about-portrait .name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}
.about-portrait .title-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.about-portrait .credentials {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.credential {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-accent-soft);
}

.about-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.about-body h3:first-child { margin-top: 0; }
.about-body p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin: var(--space-8) 0;
}
@media (min-width: 768px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); max-width: 26rem; }
}
.stat-item .stat-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.stat-item .stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Testimonial ---- */
.testimonial {
  background: var(--color-surface-offset);
  text-align: center;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.4;
  max-width: 30ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}
.testimonial blockquote::before {
  content: '\201C';
  font-size: var(--text-3xl);
  color: var(--color-accent);
  display: block;
  line-height: 0.5;
  margin-bottom: var(--space-4);
}
.testimonial cite {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.testimonial cite strong { color: var(--color-text); font-weight: 600; }

/* ---- Why Strabo (origin inset) ---- */
.origin-inset {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: var(--space-10);
  align-items: start;
  max-width: 900px;
  margin-inline: auto;
  padding: var(--space-10);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
}
.origin-figure {
  margin: 0;
}
.origin-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  filter: sepia(0.18) contrast(1.04);
  border: 1px solid var(--color-border);
}
.origin-figure figcaption {
  margin-top: var(--space-3);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.origin-body p {
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.origin-body .section-label {
  margin-bottom: var(--space-4);
}
.origin-body .origin-kicker {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-accent);
  margin-bottom: 0;
}
@media (max-width: 720px) {
  .origin-inset {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-6);
  }
  .origin-figure {
    max-width: 200px;
    margin-inline: auto;
  }
  .origin-figure figcaption {
    text-align: center;
  }
}

/* ---- Contact ---- */
.contact {
  text-align: center;
}
.contact .section-title { margin-inline: auto; }
.contact p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 40ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}
.contact .btn { margin-inline: auto; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid oklch(from var(--color-border) l c h / 0.5);
  padding-block: var(--space-8);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.footer-inner p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-inner a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--color-accent); }
.footer-links { display: flex; gap: var(--space-4); }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Mobile nav ---- */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.5);
}
.mobile-nav a {
  font-size: var(--text-base);
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-2) 0;
}
.mobile-nav a:hover { color: var(--color-accent); }
@media (min-width: 768px) {
  .mobile-nav { display: none; }
}
.mobile-nav.hidden { display: none; }
