/* Coffee Roasters Pro — Design System */
:root {
  --forge: #121212;
  --forge-light: #E8E4DF;
  --rust: #C45C26;
  --rust-dark: #9A4520;
  --iron: #4A4F57;
  --iron-light: #6B7280;
  --cream: #F5F2ED;
  --cream-dark: #D9D4CC;
  --white: #FFFFFF;
  --text-dark: #1A1A1A;
  --text-muted: #5A5A5A;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --radius-pill: 999px;
  --radius-sm: 4px;
  --shadow: 0 4px 24px rgba(18, 18, 18, 0.12);
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-h: 72px;
  --page-gutter: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rust-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

/* Surfaces */
.surface-dark {
  background: var(--forge);
  color: var(--forge-light);
}
.surface-dark a:not(.btn) { color: var(--rust); }
.surface-dark a:not(.btn):hover { color: #E07A45; }

.surface-light {
  background: var(--cream);
  color: var(--text-dark);
}

.surface-accent {
  background: var(--rust);
  color: var(--white);
}
.surface-accent a { color: var(--white); text-decoration: underline; }

.surface-iron {
  background: var(--iron);
  color: var(--forge-light);
}
.surface-iron a:not(.btn) { color: var(--cream); }
.surface-iron a:not(.btn):hover { color: var(--white); }

.surface-dark .eyebrow,
.surface-iron .eyebrow { color: var(--rust); }

.surface-accent .eyebrow { color: rgba(255, 255, 255, 0.75); }

.surface-dark .package-price,
.surface-iron .package-price { color: var(--rust); }

.surface-accent .package-price { color: var(--white); }

.surface-dark .faq-question,
.surface-iron .faq-question,
.surface-accent .faq-question { color: var(--forge-light); }

.surface-accent .faq-question { color: var(--white); }

.surface-dark .faq-item,
.surface-iron .faq-item { border-bottom-color: rgba(232, 228, 223, 0.2); }

.surface-dark .faq-answer p,
.surface-iron .faq-answer p { color: rgba(232, 228, 223, 0.9); }

.surface-accent .faq-answer p { color: rgba(255, 255, 255, 0.9); }

.surface-dark .btn-outline-dark,
.surface-iron .btn-outline-dark {
  color: var(--forge-light);
  border-color: var(--forge-light);
}
.surface-dark .btn-outline-dark:hover,
.surface-iron .btn-outline-dark:hover {
  background: var(--forge-light);
  color: var(--forge);
}

.surface-dark .tier-detail h2,
.surface-iron .tier-detail h2,
.surface-accent .tier-detail h2,
.surface-dark .tier-detail p,
.surface-iron .tier-detail p,
.surface-accent .tier-detail p { color: inherit; }

.surface-iron .two-col h3,
.surface-iron .section-header h2,
.surface-iron .section-header p { color: inherit; }

/* Diagonal cuts */
.diagonal-top {
  position: relative;
  margin-top: -3rem;
  padding-top: 5rem;
  clip-path: polygon(0 3rem, 100% 0, 100% 100%, 0 100%);
}

.diagonal-bottom {
  position: relative;
  padding-bottom: 5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 0 100%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--forge);
  border-bottom: 1px solid rgba(232, 228, 223, 0.1);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forge-light);
  letter-spacing: 0.02em;
}
.logo span { color: var(--rust); }

.nav-main { display: flex; gap: 1.75rem; align-items: center; }
.nav-main a {
  color: var(--forge-light);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-main a:hover, .nav-main a.active { color: var(--rust); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--forge-light);
  margin: 5px 0;
  transition: var(--transition);
}

/* Buttons — Pill CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--rust);
  color: var(--white);
  border-color: var(--rust);
}
.btn-primary:hover {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--forge-light);
  border-color: var(--forge-light);
}
.btn-outline:hover {
  background: var(--forge-light);
  color: var(--forge);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--text-dark);
}
.btn-outline-dark:hover {
  background: var(--text-dark);
  color: var(--cream);
}

/* Hero Pattern C — Asymmetric Magazine */
.hero-magazine {
  display: grid;
  grid-template-columns: 60px 1fr 1.2fr;
  min-height: 85vh;
  background: var(--forge);
  color: var(--forge-light);
  overflow: hidden;
}

.hero-magazine.surface-light {
  background: var(--forge);
  color: var(--forge-light);
}

.hero-trust {
  font-size: 0.8125rem;
  color: var(--cream-dark);
  margin-top: 1rem;
}

.hero-brand-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  border-right: 1px solid rgba(196, 92, 38, 0.3);
  padding: 2rem 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem 3rem 5rem;
  margin-left: 80px;
}

.hero-content h1 {
  color: var(--forge-light);
  margin-bottom: 1.5rem;
}

.hero-content .lead {
  font-size: 1.125rem;
  color: var(--cream-dark);
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-photo {
  position: relative;
  display: flex;
  align-items: stretch;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.hero-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(18, 18, 18, 0.85);
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--forge-light);
}

.hero-serial {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  background: rgba(18, 18, 18, 0.75);
  padding: 0.5rem 1rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 4rem 0 3rem;
  background: var(--forge);
  color: var(--forge-light);
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero .breadcrumb {
  font-size: 0.8125rem;
  color: var(--iron-light);
  margin-bottom: 1rem;
}
.page-hero .breadcrumb a { color: var(--cream-dark); }

/* Sections */
.section { padding: 5rem 0; }
.section-header { max-width: 640px; margin-bottom: 3rem; }
.section-header .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Counter strip */
.counter-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(232, 228, 223, 0.15);
  border-bottom: 1px solid rgba(232, 228, 223, 0.15);
}

.counter-item {
  padding: 2.5rem 2rem;
  text-align: center;
  border-right: 1px solid rgba(232, 228, 223, 0.15);
}
.counter-item:last-child { border-right: none; }

.counter-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rust);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.counter-label {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dark);
}

/* Module bands */
.module-bands { display: flex; flex-direction: column; }

.module-band {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.module-band:last-child { border-bottom: none; }

.module-index {
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  padding-left: 2rem;
}

.module-band h3 { color: var(--white); margin-bottom: 0.5rem; }
.module-band p { color: rgba(255, 255, 255, 0.85); margin-bottom: 0; }

/* Onboarding panel */
.onboarding-panel {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0;
  background: var(--cream);
}

.onboarding-rail {
  background: var(--iron);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  gap: 2rem;
}

.rail-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rust);
  opacity: 0.4;
}
.rail-marker.active { opacity: 1; box-shadow: 0 0 0 4px rgba(196, 92, 38, 0.3); }

.onboarding-content { padding: 3rem 2.5rem; }
.onboarding-image { position: relative; }
.onboarding-image img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }

/* Package cards */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.package-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 2rem;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}

.package-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.package-label {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  background: var(--rust);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

.package-card h3 { margin-top: 0.5rem; }
.package-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--rust);
  margin: 1rem 0;
}

/* FAQ Accordion */
.faq-list { max-width: 800px; }

.faq-item {
  border-bottom: 1px solid var(--cream-dark);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-dark);
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--rust);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: 1.25rem;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.content-image img {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* CTA block */
.cta-block {
  text-align: center;
  padding: 4rem 2rem;
}
.cta-block h2 { margin-bottom: 1rem; }
.cta-block p { max-width: 560px; margin: 0 auto 2rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rust);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.form-check input { margin-top: 0.25rem; flex-shrink: 0; }
.form-check label { font-size: 0.875rem; font-weight: 400; }

.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.form-alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.form-alert-error { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }

/* Legal content */
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.legal-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.125rem; }
.legal-content ul, .legal-content ol { margin: 0 0 1rem 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
}

.legal-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
  background: var(--forge);
  color: var(--cream-dark);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { margin-bottom: 1rem; display: inline-block; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forge-light);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--cream-dark); font-size: 0.875rem; }
.footer-col a:hover { color: var(--rust); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 228, 223, 0.1);
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--forge);
  color: var(--forge-light);
  padding: 1.5rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.cookie-text { flex: 1; min-width: 280px; font-size: 0.875rem; }
.cookie-text a { color: var(--rust); }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.cookie-customise {
  display: none;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid rgba(232, 228, 223, 0.15);
  margin-top: 0.5rem;
}

.cookie-customise.show { display: block; }

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

/* Scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.no-js .reveal { opacity: 1; transform: none; }

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--rust);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Service cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
}

.service-card img { width: 100%; height: 220px; object-fit: cover; }
.service-card-body { padding: 1.75rem; }

/* Program tier detail */
.tier-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--cream-dark);
  align-items: center;
}

.tier-detail:nth-child(even) { direction: rtl; }
.tier-detail:nth-child(even) > * { direction: ltr; }

.tier-detail .package-label { position: static; display: inline-block; margin-bottom: 1rem; }

/* Contact info */
.contact-info-block {
  background: var(--iron);
  color: var(--forge-light);
  padding: 2.5rem;
}

.contact-info-block h3 { color: var(--forge-light); margin-bottom: 1.5rem; }
.contact-info-block p { margin-bottom: 0.75rem; font-size: 0.9375rem; }
.contact-info-block a { color: var(--cream); }

/* Responsive */
@media (max-width: 960px) {
  .hero-magazine {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-brand-label {
    writing-mode: horizontal-tb;
    transform: none;
    border-right: none;
    border-bottom: 1px solid rgba(196, 92, 38, 0.3);
    padding: 1rem;
    font-size: 0.6875rem;
  }

  .hero-content {
    margin-left: 0;
    padding: 2rem var(--page-gutter);
  }

  .hero-photo img { aspect-ratio: 16 / 9; }

  .counter-strip { grid-template-columns: 1fr; }
  .counter-item { border-right: none; border-bottom: 1px solid rgba(232, 228, 223, 0.15); }

  .onboarding-panel { grid-template-columns: 1fr; }
  .onboarding-rail { flex-direction: row; padding: 1rem; }
  .onboarding-image img { min-height: 280px; }

  .two-col, .tier-detail, .footer-grid { grid-template-columns: 1fr; }
  .tier-detail:nth-child(even) { direction: ltr; }

  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--forge);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(232, 228, 223, 0.1);
  }

  .nav-main.open { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 768px) {
  .hero-content {
    margin-left: 0;
    padding: 2rem var(--page-gutter);
  }

  .hero-brand-label {
    padding: 1rem var(--page-gutter);
  }

  .onboarding-content {
    padding: 2rem var(--page-gutter);
  }

  .cookie-banner {
    padding: 1.25rem var(--page-gutter);
  }

  .section {
    padding-block: 3.5rem;
  }
}

@media (max-width: 600px) {
  .module-band { grid-template-columns: 60px 1fr; }
  .module-index { font-size: 1.25rem; padding-left: 0.75rem; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
}
