/* VisualForge AI — Spectrum Studio design system */
:root {
  --aubergine: #1E1622;
  --plum: #2E2036;
  --porcelain: #F4F1F5;
  --iris: #6C4CF1;
  --teal: #23B5A6;
  --cool-grey: #8790A6;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --max-width: 1200px;
  --section-pad: clamp(4rem, 8vw, 8.75rem);
  --transition: 0.35s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.75rem, 5.5vw, 5.5rem); }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.375rem, 2vw, 1.625rem); font-weight: 600; }

p { margin: 0 0 1.25rem; }

/* Surface system — paired bg + text only */
.surface-porcelain { background-color: var(--porcelain); color: var(--aubergine); }
.surface-aubergine { background-color: var(--aubergine); color: var(--porcelain); }
.surface-plum { background-color: var(--plum); color: var(--porcelain); }
.surface-iris { background-color: var(--iris); color: var(--porcelain); }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--iris);
  margin: 0 0 1rem;
}

.lead-dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.5em;
  line-height: 0.85;
  padding-right: 0.12em;
  color: var(--iris);
  font-weight: 700;
}

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background-color var(--transition), box-shadow var(--transition), padding var(--transition);
}

.site-header.is-sticky {
  position: fixed;
  background-color: var(--porcelain);
  box-shadow: 0 1px 0 rgba(30, 22, 34, 0.08);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

.logo img { width: 36px; height: 36px; }

.main-nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.main-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.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: currentColor;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;
}

.mobile-nav.is-open { display: flex; }

@media (max-width: 768px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: filter var(--transition), box-shadow var(--transition);
}

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

.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 4px 20px rgba(108, 76, 241, 0.35); }

.btn-outline {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}

.btn-outline:hover { filter: brightness(0.92); box-shadow: 0 2px 12px rgba(30, 22, 34, 0.12); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Spectrum motif */
.spectrum-arc {
  display: inline-block;
  width: 48px;
  height: 8px;
  background: linear-gradient(90deg, var(--iris), var(--teal));
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.5rem;
}

.swatch-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.swatch-chip {
  width: 12px;
  height: 12px;
  border-radius: 1px;
  border: 1px solid rgba(30, 22, 34, 0.15);
}

.swatch-chip:nth-child(1) { background: var(--aubergine); }
.swatch-chip:nth-child(2) { background: var(--plum); }
.swatch-chip:nth-child(3) { background: var(--iris); }
.swatch-chip:nth-child(4) { background: var(--teal); }
.swatch-chip:nth-child(5) { background: var(--porcelain); }

.hairline {
  border: none;
  border-top: 1px solid rgba(30, 22, 34, 0.15);
  margin: 0;
}

.surface-aubergine .hairline,
.surface-plum .hairline { border-top-color: rgba(244, 241, 245, 0.15); }

/* Gallery Masthead hero */
.hero-gallery-masthead {
  min-height: 90vh;
  padding-top: 5rem;
  padding-bottom: var(--section-pad);
  position: relative;
}

@media (max-width: 768px) {
  .hero-gallery-masthead { min-height: 78vh; padding-top: 4.5rem; }
}

.masthead-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}

.masthead-left {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title .highlight {
  color: var(--iris);
}

.hero-standfirst {
  max-width: 560px;
  font-size: 1.125rem;
  opacity: 0.85;
  margin: 2rem 0;
}

.gallery-plate {
  margin: 2.5rem 0;
  border: 1px solid rgba(30, 22, 34, 0.2);
  padding: 0.5rem;
  background: var(--porcelain);
  box-shadow: 0 24px 64px rgba(30, 22, 34, 0.08);
}

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

@media (max-width: 768px) {
  .gallery-plate img { aspect-ratio: 16/10; }
}

.trust-strip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cool-grey);
  letter-spacing: 0.04em;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(30, 22, 34, 0.1);
}

/* Ken-burns on hero — subtle */
@media (prefers-reduced-motion: no-preference) {
  .gallery-plate img {
    animation: kenBurns 24s ease-in-out infinite alternate;
  }
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-plate img { animation: none; }
}

/* Sections */
.section {
  padding: var(--section-pad) 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 3rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Metric folios */
.metric-folio {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(30, 22, 34, 0.12);
}

.metric-folio .folio-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--iris);
  margin-bottom: 0.75rem;
}

.metric-folio strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-folio span {
  font-size: 0.875rem;
  opacity: 0.75;
}

.surface-aubergine .metric-folio,
.surface-plum .metric-folio {
  border-color: rgba(244, 241, 245, 0.15);
}

/* Pillars / stages */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.pillar-card {
  padding: 1.75rem;
  border: 1px solid rgba(30, 22, 34, 0.1);
  position: relative;
}

.pillar-card .folio-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--iris);
  margin-bottom: 0.75rem;
}

.surface-aubergine .pillar-card,
.surface-plum .pillar-card {
  border-color: rgba(244, 241, 245, 0.12);
}

/* Service / capability cards */
.capability-card {
  padding: 2rem;
  border: 1px solid rgba(30, 22, 34, 0.12);
  position: relative;
}

.capability-card .folio-bg {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 500;
  opacity: 0.06;
  line-height: 1;
}

.capability-card h3 { margin-top: 0; }

/* Work cards */
.work-card {
  border: 1px solid rgba(30, 22, 34, 0.12);
  overflow: hidden;
}

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

.work-card-body { padding: 1.75rem; }

.work-card .tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* FAQ */
.faq-list { max-width: 800px; }

.faq-item {
  border-bottom: 1px solid rgba(30, 22, 34, 0.12);
  padding: 1.75rem 0;
}

.faq-item:first-child { padding-top: 0; }

.faq-item h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

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

.surface-aubergine .faq-item,
.surface-plum .faq-item {
  border-bottom-color: rgba(244, 241, 245, 0.12);
}

/* 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 rgba(30, 22, 34, 0.2);
  border-radius: 2px;
  background: var(--porcelain);
  color: var(--aubergine);
}

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

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

.checkbox-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.checkbox-group input { width: auto; margin-top: 0.25rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Legal prose */
.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content ul, .legal-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.legal-content li { margin-bottom: 0.5rem; }

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a { text-decoration: none; font-size: 0.875rem; }

.footer-disclaimer {
  font-size: 0.8125rem;
  opacity: 0.75;
  line-height: 1.6;
  padding-top: 2rem;
  border-top: 1px solid rgba(244, 241, 245, 0.12);
}

.footer-bottom {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  opacity: 0.65;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: var(--section-pad) 0;
}

.cta-band h2 { margin-bottom: 1rem; }

.cta-band p {
  max-width: 540px;
  margin-inline: auto;
  opacity: 0.9;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: var(--section-pad) 0;
}

.error-page h1 { margin-bottom: 1rem; }

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

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

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

.cookie-text {
  flex: 1 1 400px;
  font-size: 0.875rem;
  line-height: 1.55;
}

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

.cookie-actions button {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(244, 241, 245, 0.3);
  background: transparent;
  color: var(--porcelain);
  cursor: pointer;
  border-radius: 2px;
}

.cookie-actions button:hover { background: rgba(244, 241, 245, 0.1); }

.cookie-actions .cookie-accept {
  background: var(--iris);
  border-color: var(--iris);
}

.cookie-panel {
  display: none;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 241, 245, 0.15);
}

.cookie-panel.is-open { display: block; }

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.cookie-option input[type="checkbox"]:disabled { opacity: 0.6; }

/* Reveal animations — JS only, with fallback visible */
.js .reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* Page hero (inner pages) */
.page-hero {
  padding: 7rem 0 3rem;
}

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

.page-hero .lead {
  max-width: 640px;
  font-size: 1.125rem;
  opacity: 0.85;
}

/* Contact block */
.contact-block {
  padding: 2rem;
  border: 1px solid rgba(30, 22, 34, 0.12);
}

.contact-block dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iris);
  margin-top: 1.25rem;
}

.contact-block dt:first-child { margin-top: 0; }

.contact-block dd {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.contact-block a { text-decoration: none; }

/* Thanks page */
.thanks-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: var(--section-pad) 0;
}

.thanks-page h1 { margin-bottom: 1rem; }
