/* Future Flowhub — contemporary structure + warmth */
@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 {
  --ink: #1e2a32;
  --ink-soft: #3d4f5c;
  --paper: #f7f3ee;
  --paper-deep: #ede6dc;
  --accent: #b8653a;
  --accent-hover: #9a5230;
  --sage: #5a7268;
  --line: #d4cbc0;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(30, 42, 50, 0.08);
  --shadow-lg: 0 12px 40px rgba(30, 42, 50, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --max-width: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover { color: var(--accent-hover); }

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

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.625rem); }

p { margin: 0 0 1rem; }

main { flex: 1; }

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark { color: var(--ink); }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--white) !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(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding: 3.5rem 0 2.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer-col a:hover { color: var(--white); }

.site-footer address {
  font-style: normal;
  font-size: 0.9375rem;
}

.site-footer address p { margin-bottom: 0.375rem; }

.site-footer address a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.site-footer address a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding: 1.25rem 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
}

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

.footer-legal a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.footer-legal a:hover { color: var(--white); }

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

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 2rem;
}

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

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0 3.5rem; }
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.page-hero h1 { margin-bottom: 0.75rem; }

.page-hero p {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

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

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

.section-header p {
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

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

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.card-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 { margin: 0 0 0.5rem; }

.card-body p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.card-link {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

/* Feature strip */
.feature-strip {
  background: var(--paper-deep);
  padding: 3.5rem 0;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
}

.feature-list h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-list p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
}

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

/* Testimonial */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.testimonial {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.testimonial cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.testimonial cite strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

/* Story block */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.story-block img {
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

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

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.pricing-table th {
  background: var(--paper-deep);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.pricing-note {
  background: var(--white);
  border-left: 4px solid var(--sage);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-error {
  color: #a33;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.is-invalid input,
.form-group.is-invalid select,
.form-group.is-invalid textarea {
  border-color: #a33;
}

.form-group.is-invalid .form-error { display: block; }

.form-success {
  background: #e8f4ec;
  border: 1px solid #5a7268;
  color: var(--ink);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: none;
}

.form-success.is-visible { display: block; }

.form-failure {
  background: #fce8e8;
  border: 1px solid #a33;
  color: var(--ink);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: none;
}

.form-failure.is-visible { display: block; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-details {
  background: var(--paper-deep);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.contact-details h2 {
  font-size: 1.375rem;
  margin-bottom: 1.25rem;
}

.contact-details address {
  font-style: normal;
  margin-bottom: 1.5rem;
}

.contact-details address p { margin-bottom: 0.5rem; }

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

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

.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

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

.blog-meta {
  font-size: 0.8125rem;
  color: var(--sage);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

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

/* Service detail */
.service-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.service-sidebar {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.service-sidebar dl {
  margin: 0 0 1.5rem;
}

.service-sidebar dt {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage);
  margin-bottom: 0.25rem;
}

.service-sidebar dd {
  margin: 0 0 1rem;
  font-weight: 500;
}

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

/* Journal guide custom page */
.journal-template {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.journal-template h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.journal-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .journal-sections { grid-template-columns: 1fr; }
}

/* Legal pages */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
}

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

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

.cookies-table th {
  background: var(--paper-deep);
  font-weight: 600;
}

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

.error-page h1 {
  font-size: 6rem;
  color: var(--line);
  margin-bottom: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

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

.cookie-inner a { color: var(--paper); }

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

.cookie-btn {
  padding: 0.5rem 1.125rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s;
}

.cookie-btn-accept {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

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

.cookie-btn-reject {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

/* Script error display */
.script-error {
  background: #fce8e8;
  border: 1px solid #a33;
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* Decorative divider */
.divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem 0 1.5rem;
}
