/* The Facilitation Studio — site styles
   Modern CSS, no framework. Custom properties for everything tweakable. */

/* ---------- Fonts (self-hosted, variable WOFF2, latin subset) ---------- */

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/Lexend.woff2") format("woff2-variations"),
       url("../assets/fonts/Lexend.woff2") format("woff2");
}

@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/Lora.woff2") format("woff2-variations"),
       url("../assets/fonts/Lora.woff2") format("woff2");
}

@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/Lora-italic.woff2") format("woff2-variations"),
       url("../assets/fonts/Lora-italic.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  /* Palette — dark, with a warm orange accent pulled from the newsletter block */
  --bg: #121214;
  --bg-elev: #1a1a1e;
  --bg-card: #1f1f24;
  --text: #f4efe8;
  --text-muted: #a8a39a;
  --text-dim: #75716a;
  --rule: #2a2a30;
  --accent: #ef7c2b;
  --accent-hover: #ff8d3e;
  --accent-ink: #1a0a00;
  --focus: #ffb070;

  /* Type — Lexend for display/UI/structure, Lora for body and quote-feeling text */
  --font-display: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-body: "Lora", ui-serif, "Iowan Old Style", "Charter", "Source Serif Pro",
               Georgia, "Times New Roman", serif;

  /* Spacing — clamped for fluid layouts */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: clamp(2.5rem, 5vw, 4rem);
  --space-2xl: clamp(4rem, 8vw, 7rem);

  /* Layout */
  --container: 72rem;       /* ~1152px */
  --container-narrow: 56rem; /* ~896px */
  --radius: 8px;
  --radius-lg: 14px;

  /* Type scale — fluid */
  --fs-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
  --line: 1.6;
  --line-tight: 1.15;
}

/* ---------- Reset-ish ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--line);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-tight);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-md);
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-md); }

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

/* ---------- Skip link & a11y helpers ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.wrap-narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }
.section--tight-top { padding-top: 0; border-top: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
}

.site-header__logo {
  display: inline-block;
  flex: 0 0 auto;
}
.site-header__logo img {
  height: 28px;
  width: auto;
}

/* No-JS hamburger via checkbox toggle */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: var(--radius);
}
.nav-toggle-label:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.nav-toggle-label .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 640px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--rule);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav li { width: 100%; }
  .site-nav a {
    display: block;
    padding: 0.9rem clamp(1rem, 4vw, 2rem);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav li:last-child a { border-bottom: 0; }
  .nav-toggle:checked ~ .site-nav { max-height: 400px; }
  .nav-toggle:checked ~ .nav-toggle-label .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-toggle-label .bar:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: var(--space-2xl);
}
.hero__title {
  margin-bottom: var(--space-md);
}
.hero__sub {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
  max-width: 42ch;
  line-height: 1.5;
}

/* ---------- Buttons / CTAs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.05s, border-color 0.15s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

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

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ---------- Testimonials — CSS scroll-snap, no JS ---------- */

.testimonials {
  margin-top: var(--space-lg);
  /* Allow the strip to bleed to the viewport edge for a nicer feel */
  margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
}
.testimonials__strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 22rem);
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) clamp(1rem, 4vw, 2rem) var(--space-lg);
  scrollbar-color: var(--rule) transparent;
}
.testimonials__strip::-webkit-scrollbar { height: 8px; }
.testimonials__strip::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 999px;
}

.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.testimonial blockquote {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text);
}
.testimonial blockquote::before {
  content: "“";
  display: block;
  font-size: 2.5rem;
  line-height: 0.8;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.testimonial cite {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

/* ---------- Feature blocks (image + copy) ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 800px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--flip .feature__media { order: 2; }
}

.feature__media img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
}

.feature__body p {
  color: var(--text-muted);
  max-width: 52ch;
}
.feature__body h2 { margin-bottom: var(--space-md); }

/* ---------- Bio block ---------- */

.bio {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 800px) {
  .bio { grid-template-columns: 2fr 3fr; }
}
.bio__portrait img {
  border-radius: var(--radius-lg);
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
  height: auto;
}
.bio p { color: var(--text-muted); max-width: 56ch; }

/* ---------- Closing CTA ---------- */

.closing {
  text-align: center;
  padding-block: var(--space-2xl);
}
.closing h2 { margin-bottom: var(--space-md); }
.closing p {
  color: var(--text-muted);
  max-width: 38ch;
  margin-inline: auto;
}
.closing .btn-row { justify-content: center; }
.btn-row--center { justify-content: center; }

/* ---------- Form (Contact) ---------- */

.form {
  display: grid;
  gap: var(--space-md);
  max-width: 36rem;
  margin-top: var(--space-lg);
}
.form__row { display: grid; gap: 0.4rem; }
.form label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
}
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form .form__hp { display: none !important; }
.form__submit-row { margin-top: var(--space-sm); }
.form__fallback {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: var(--space-lg);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.site-footer h3 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.5rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.site-footer__copy {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-2xl);
}
.error-page p {
  color: var(--text-muted);
  max-width: 40ch;
  margin-inline: auto;
}

/* ---------- Motion-reduce ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
