/* ============================================
   Westcountry AI – site styles
   v1, plain CSS, no framework
   ============================================ */

/* ---- Fonts (Google Fonts) ---- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
}

/* ---- Design tokens ---- */
:root {
  /* Palette */
  --bg: #FAF7F2;
  --bg-alt: #F1EBDF;
  --bg-dark: #2D5040;
  --text: #2D2B26;
  --text-muted: #5C5950;
  --primary: #2D5040;
  --accent: #C25B1E;
  --accent-hover: #A04816;
  --border: #E5DFD2;

  /* Type */
  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;

  /* Type scale (mobile defaults; larger via clamp) */
  --fs-display: clamp(2.5rem, 6vw, 4.5rem);  /* H1 hero */
  --fs-h1: clamp(2rem, 4.5vw, 3rem);          /* page H1 */
  --fs-h2: clamp(1.625rem, 3vw, 2.25rem);     /* H2 */
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);       /* H3 */
  --fs-large: 1.25rem;                         /* lead paragraphs */
  --fs-body: 1.0625rem;                        /* 17px body */
  --fs-small: 0.9375rem;                       /* 15px */
  --fs-caption: 0.8125rem;                     /* 13px */

  /* Spacing */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.75rem;
  --space-l: 3rem;
  --space-xl: 5rem;
  --space-xxl: 7rem;

  /* Layout */
  --max-prose: 65ch;
  --max-content: 1100px;
}

/* ---- Base ---- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  margin-bottom: var(--space-m);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: var(--space-s);
}

p {
  margin-bottom: 1.1em;
  max-width: 65ch;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

strong {
  font-weight: 600;
  color: var(--primary);
}

em {
  font-style: italic;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.prose {
  max-width: var(--max-prose);
}

.prose-narrow {
  max-width: 55ch;
}

section {
  padding: var(--space-xxl) 0;
}

section.alt {
  background: var(--bg-alt);
}

section.tight {
  padding: var(--space-xl) 0;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--space-s);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 1.125rem var(--space-m);
}

.nav-links {
  margin-left: auto;
}

.nav-social {
  margin-left: 1.25rem;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  font-size: 2rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.logo-icon {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}

.nav-social {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-social svg {
  width: 26px;
  height: 26px;
  display: block;
}

.nav-social:hover {
  color: var(--accent-hover);
}

.logo:hover {
  color: var(--primary);
}

.logo-text {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: var(--fs-small);
  color: var(--text);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  margin-left: auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--bg);
}

.btn-text {
  color: var(--primary);
  font-size: var(--fs-small);
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--accent);
}

/* ---- Hero ---- */
.hero {
  padding: var(--space-xxl) 0 var(--space-xl);
}

.hero h1 {
  font-size: var(--fs-display);
  font-weight: 600;
  margin-bottom: var(--space-m);
  max-width: 18ch;
}

.hero .subhead {
  font-size: var(--fs-large);
  color: var(--text);
  margin-bottom: var(--space-l);
  max-width: 55ch;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.secondary-cta {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-style: italic;
}

.secondary-cta a {
  color: var(--primary);
}

/* ---- Three-column ---- */
.three-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-l);
  margin-top: var(--space-l);
}

.three-cols .col h3 {
  margin-bottom: var(--space-s);
  color: var(--primary);
}

/* ---- Bullet list ---- */
.bullet-list {
  list-style: none;
  margin: var(--space-m) 0;
}

.bullet-list li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: var(--space-s);
  max-width: 65ch;
  line-height: 1.55;
}

.bullet-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---- Worry / Q&A blocks ---- */
.worries {
  display: grid;
  gap: var(--space-l);
  max-width: 70ch;
  margin-top: var(--space-l);
}

.worry-item .q {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.worry-item .a {
  color: var(--text);
  margin: 0;
}

/* ---- Pull quote / testimonial ---- */
.quote-block {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-m);
  margin: var(--space-m) 0;
  max-width: 60ch;
}

.quote-block .quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.375rem;
  color: var(--primary);
  line-height: 1.4;
  font-weight: 400;
}

.quote-block .attr {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: var(--space-s);
}

/* ---- Final CTA band ---- */
.cta-band {
  background: var(--bg-dark);
  color: var(--bg);
  padding: var(--space-xxl) 0;
}

.cta-band h2,
.cta-band h3 {
  color: var(--bg);
}

.cta-band .subhead {
  color: color-mix(in srgb, var(--bg) 90%, transparent);
  font-size: var(--fs-large);
  margin-bottom: var(--space-l);
  max-width: 55ch;
}

.cta-band .secondary-cta {
  color: color-mix(in srgb, var(--bg) 75%, transparent);
}

.cta-band .secondary-cta a {
  color: var(--bg);
}

/* ---- FAQ accordion-ish (no JS) ---- */
.faq {
  margin-top: var(--space-l);
  max-width: 70ch;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: var(--space-m) 0;
}

.faq details:first-child {
  border-top: 1px solid var(--border);
}

.faq summary {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-s);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details > *:not(summary) {
  margin-top: var(--space-s);
}

/* ---- Day timeline (Opportunities Survey) ---- */
.day-step {
  margin-bottom: var(--space-l);
  padding-left: var(--space-m);
  border-left: 2px solid var(--border);
}

.day-step h3 {
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.day-step .duration {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Cards (case studies placeholder) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: var(--space-m);
  border-radius: 6px;
}

.card-empty {
  text-align: center;
  padding: var(--space-xl);
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-style: italic;
  border-radius: 6px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary);
  color: var(--bg);
  padding: var(--space-xl) 0 var(--space-m);
}

.site-footer h4 {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-s);
  font-weight: 500;
}

.site-footer a {
  color: var(--bg);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-l);
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: var(--space-xs);
  font-size: var(--fs-small);
}

.footer-grid p {
  font-size: var(--fs-small);
  color: color-mix(in srgb, var(--bg) 80%, transparent);
  margin-bottom: var(--space-xs);
}

.copyright {
  text-align: center;
  font-size: var(--fs-caption);
  color: color-mix(in srgb, var(--bg) 60%, transparent);
  margin-top: var(--space-xl);
  padding-top: var(--space-m);
  border-top: 1px solid color-mix(in srgb, var(--bg) 15%, transparent);
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-m);
  padding-right: var(--space-m);
}

/* ---- Utility ---- */
.lead {
  font-size: var(--fs-large);
  color: var(--text);
  line-height: 1.5;
}

.muted {
  color: var(--text-muted);
}

.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: var(--space-l) 0;
}

.placeholder-note {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-left: 3px solid var(--accent);
  padding: var(--space-s) var(--space-m);
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-style: italic;
  margin: var(--space-m) 0;
}

/* ---- Page-specific helpers ---- */
.page-hero {
  padding: var(--space-xxl) 0 var(--space-l);
}

.page-hero h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-m);
}

.page-hero .subhead {
  font-size: var(--fs-large);
  color: var(--text);
  max-width: 55ch;
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .nav {
    flex-wrap: wrap;
    padding: 1rem var(--space-s);
    gap: var(--space-s);
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: var(--space-s);
    border-top: 1px solid var(--border);
  }

  .nav-cta {
    margin-left: 0;
  }

  section {
    padding: var(--space-xl) 0;
  }

  .hero {
    padding: var(--space-xl) 0 var(--space-l);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-cta {
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
