/* ============================================================
   style.css — shared styles across all pages
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Reset & base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f9f8f6;
  --surface: #ffffff;
  --border: #e5e2dc;
  --text: #1a1916;
  --muted: #6b6860;
  --accent: #2a6e5b;
  --accent-lt: #e8f2ef;
  --accent-dk: #1f5244;
  --danger: #b94040;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .07), 0 4px 16px rgba(0, 0, 0, .05);
  --nav-h: 64px;
  --max-w: 860px;
  --font-body: 'DM Sans', sans-serif;
  --font-head: 'DM Serif Display', serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 5rem;
  min-height: 100vh;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(249, 248, 246, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-nav .logo {
  font-family: var(--font-head);
  font-size: 2.1rem;
  color: var(--text);
  letter-spacing: -.01em;
}

.site-nav .logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  letter-spacing: .02em;
  transition: color .2s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.nav-links a.active {
  font-weight: 500;
}

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero (home page) ─────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 5rem) 0 5rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
  max-width: 680px;
  margin: 0 auto .75rem;
}

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

.hero-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .2s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(42, 110, 91, .25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--text);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn .spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Feature cards ────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .09);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-lt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: .4rem;
}

.card p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Page header (inner pages) ───────────────────────────── */
.page-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
}

/* ── Prose content ────────────────────────────────────────── */
.prose h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin: 2.5rem 0 .75rem;
  letter-spacing: -.01em;
}

.prose p {
  margin-bottom: 1.1rem;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ── Contact form ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-meta h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.contact-meta p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.contact-detail svg {
  flex-shrink: 0;
  color: var(--accent);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.1rem;
}

.field:last-of-type {
  margin-bottom: 0;
}

label {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: .65rem .9rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lt);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* honeypot */
.hp-field {
  display: none !important;
}

.form-note {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .75rem;
}

/* form feedback */
.alert {
  padding: .9rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.alert-success {
  background: var(--accent-lt);
  color: var(--accent-dk);
  border: 1px solid #b7d9cf;
}

.alert-error {
  background: #fdf0f0;
  color: var(--danger);
  border: 1px solid #f0c6c6;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: .82rem;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-copy {
  font-size: .82rem;
  color: var(--muted);
}

/* ── Cookie banner ────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
  padding: 1.1rem 1.5rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(0);
  transition: transform .3s var(--ease), opacity .3s;
}

#cookie-banner.hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.cookie-text {
  font-size: .84rem;
  color: var(--muted);
  max-width: 580px;
}

.cookie-text a {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}

.btn-cookie-accept {
  padding: .5rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}

.btn-cookie-accept:hover {
  background: var(--accent-dk);
}

.btn-cookie-decline {
  padding: .5rem 1rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .84rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.btn-cookie-decline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow);
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}