@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #1a3a4a;
  --color-primary-light: #2a5568;
  --color-accent: #c9a227;
  --color-accent-dark: #a8841a;
  --color-teal: #2d6a6a;
  --color-bg: #f7f4ef;
  --color-surface: #ffffff;
  --color-text: #1c1c1c;
  --color-muted: #5c5c5c;
  --color-border: #ddd5c8;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(26, 58, 74, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 58, 74, 0.1);
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a { color: var(--color-teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-primary); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin: 0 0 1rem; }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  min-height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.logo:hover { color: var(--color-teal); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover { color: var(--color-teal); }

.nav-cta {
  background: var(--color-primary);
  color: var(--color-surface) !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--color-primary-light);
  color: var(--color-surface) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: none;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
  }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 0.85rem 0.5rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4rem;
  padding: 3rem 1rem 1.5rem;
}

.site-footer a { color: var(--color-accent); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto 2rem;
}

.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; opacity: 0.85; }

.footer-links h3,
.footer-contact h3 {
  color: var(--color-accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }

.footer-contact address { font-style: normal; font-size: 0.9rem; }
.footer-contact p { margin-bottom: 0.4rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

.legal-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-surface);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Hero variants */
.hero {
  padding: 4rem 0;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-split .hero-visual {
  position: relative;
}

.hero-split .hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-split .hero-visual::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 60%;
  height: 60%;
  border: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--color-muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-banner {
  background: var(--color-primary);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(201, 162, 39, 0.08) 100%);
  pointer-events: none;
}

.hero-banner h1 { color: #fff; }
.hero-banner .hero-lead { color: rgba(255, 255, 255, 0.8); }

@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-visual { order: -1; }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-header p {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.section-alt {
  background: var(--color-surface);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body { padding: 1.5rem; }

.card-body h3 { margin: 0 0 0.5rem; }
.card-body p { color: var(--color-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.card-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-teal);
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .feature-strip { grid-template-columns: 1fr; }
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--color-surface);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-style: italic;
  color: var(--color-text);
}

.testimonial cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-muted);
}

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

.page-header h1 { margin: 0 0 0.5rem; }
.page-header p { color: var(--color-muted); margin: 0; max-width: 60ch; }

/* Content prose */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.5rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.pricing-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-note {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-top: 2rem;
}

/* Forms */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 1px;
}

.field-error {
  color: #b33;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  min-height: 1.2em;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.form-message--success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-message--error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.contact-details {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.contact-details h2 { margin-top: 0; }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.blog-card .card-body { padding: 1.5rem; }

.blog-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.article-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

/* Service detail */
.service-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

.service-hero img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin: 2rem 0;
}

.service-meta dt {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.service-meta dd {
  margin: 0.25rem 0 0;
  font-weight: 500;
}

@media (max-width: 768px) {
  .service-hero { grid-template-columns: 1fr; }
}

/* Workbook page */
.workbook-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.workbook-section:nth-child(even) { direction: rtl; }
.workbook-section:nth-child(even) > * { direction: ltr; }

@media (max-width: 768px) {
  .workbook-section,
  .workbook-section:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 1rem;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--color-accent);
  margin: 0;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 200;
  padding: 1rem;
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-banner .btn { padding: 0.5rem 1.25rem; font-size: 0.9rem; }

/* Inline errors */
.inline-error {
  background: #ffebee;
  color: #c62828;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Legal pages */
.legal-content {
  max-width: 72ch;
  padding-bottom: 4rem;
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.cookies-table th,
.cookies-table td {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.cookies-table th {
  background: var(--color-primary);
  color: #fff;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-teal) 100%);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
  margin-top: 3rem;
}

.cta-band h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 50ch; margin: 0 auto 1.5rem; }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.team-member img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.team-member h3 { margin: 0 0 0.25rem; }
.team-member .role { color: var(--color-teal); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.75rem; }

/* Case study */
.case-study {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin: 2rem 0;
}

.case-study h3 { margin-top: 0; }
