/* Cortex PathBase — contemporary structure + creative accents */

:root {
  --ink: #1a2332;
  --ink-soft: #3d4a5c;
  --paper: #f4efe6;
  --paper-warm: #ebe4d8;
  --accent: #e07a4a;
  --accent-dark: #c4623a;
  --accent-muted: #d4a574;
  --line: #d8cfc0;
  --white: #fffcf7;
  --success: #2d6a4f;
  --error: #9b2226;
  --shadow: 0 4px 24px rgba(26, 35, 50, 0.08);
  --radius: 8px;
  --radius-lg: 16px;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "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-sans);
  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-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; }

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: var(--white);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
}

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

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

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

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

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

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

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

.nav-cta:hover {
  background: var(--accent-dark);
  color: var(--white) !important;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(244, 239, 230, 0.15);
}

.footer-brand .logo { color: var(--paper); margin-bottom: 1rem; }
.footer-tagline { font-size: 0.9375rem; opacity: 0.85; max-width: 28ch; }

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-bottom: 1rem;
}

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

.footer-col a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.9375rem;
  opacity: 0.85;
}

.footer-col a:hover { opacity: 1; color: var(--accent-muted); }

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

.site-footer address a { color: var(--paper); text-decoration: none; opacity: 0.85; }
.site-footer address a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  opacity: 0.7;
}

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

.footer-legal a { color: var(--paper); text-decoration: none; }
.footer-legal a:hover { opacity: 1; }

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

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

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  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-dark);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.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.08em;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

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

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

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

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

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent-muted);
  border-radius: var(--radius-lg);
  transform: translate(12px, 12px);
  z-index: -1;
}

.hero-compact {
  text-align: center;
  padding: 3rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.hero-compact h1 { max-width: 20ch; margin-inline: auto; }
.hero-compact p { max-width: 52ch; margin-inline: auto; color: var(--ink-soft); }

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

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

.section-header {
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

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

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

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

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

.card-body { padding: 1.5rem; }

.card-meta {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.card h3 { margin-bottom: 0.75rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-dark); }

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

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

.feature-item {
  padding: 1.5rem;
  border-left: 3px solid var(--accent);
}

.feature-item h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

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

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

.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-serif);
  font-size: 1.0625rem;
  line-height: 1.5;
}

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

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

/* 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-sans);
  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: var(--error);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  background: #d8f3dc;
  color: var(--success);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

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

.form-failure {
  background: #fde8e8;
  color: var(--error);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

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

.script-error {
  background: #fde8e8;
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.875rem;
}

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

.cookie-banner.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-banner p {
  margin: 0;
  font-size: 0.9375rem;
  max-width: 60ch;
  flex: 1;
}

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

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

.cookie-actions .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

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

.btn-cookie-reject {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(244,239,230,0.4);
}

/* Content pages */
.page-content {
  padding: 3rem 0 4rem;
}

.page-content .container-narrow {
  width: min(100% - 2rem, 720px);
  margin-inline: auto;
}

.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { margin-bottom: 1rem; }

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

.contact-info address {
  font-style: normal;
  line-height: 1.8;
}

.contact-info h2 { font-size: 1.25rem; margin-top: 2rem; }

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

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

.pricing-table th {
  font-family: var(--font-serif);
  background: var(--white);
}

.pricing-note {
  background: var(--paper-warm);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}

/* Glossary */
.glossary-nav {
  columns: 2;
  column-gap: 2rem;
  margin-bottom: 3rem;
}

.glossary-term {
  break-inside: avoid;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.glossary-term dt {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.glossary-term dd {
  margin: 0;
  color: var(--ink-soft);
}

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

.service-detail-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.service-detail-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.service-detail-list li span:first-child { font-weight: 600; }

/* Blog article */
.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
}

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

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

/* Legal */
.legal-content h2 { font-size: 1.375rem; margin-top: 2rem; }
.legal-content p, .legal-content li { font-size: 0.9375rem; }

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

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

.cookies-table th { background: var(--white); }

/* Responsive */
@media (max-width: 900px) {
  .hero-split,
  .service-hero,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .glossary-nav { columns: 1; }
}

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

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }

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

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.875rem 0; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }

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

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
