/* ImageForge AI — Darkroom Forge */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&family=Inter:wght@400;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --ink: #0B0C0E;
  --graphite: #17181C;
  --bone: #F3F1EC;
  --ember: #F0563A;
  --steel: #3D6FB0;
  --ash: #8A8F96;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --section-pad: clamp(3.5rem, 8vw, 8rem);
  --max-width: 72rem;
  --header-h: 4.5rem;
}

*, *::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;
  -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 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin-top: 0; }
h1 { font-size: clamp(2.875rem, 6vw, 5.375rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
p { margin: 0 0 1.15rem; }
ul, ol { margin: 0 0 1.15rem; padding-left: 1.35rem; }

.surface-ink { background: var(--ink); color: var(--bone); }
.surface-bone { background: var(--bone); color: var(--ink); }
.surface-graphite { background: var(--graphite); color: var(--bone); }
.surface-ember { background: var(--ember); color: var(--ink); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}
.mono { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.04em; }

.container { width: min(100% - 2.5rem, var(--max-width)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.hairline { border: none; border-top: 1px solid rgba(243, 241, 236, 0.2); margin: 0; }
.surface-bone .hairline { border-top-color: rgba(11, 12, 14, 0.15); }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-sticky {
  background: var(--bone);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(11, 12, 14, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--ember); }

/* Transparent header: light text on dark hero (homepage), dark text on light pages */
body:not(.surface-bone) .site-header:not(.is-sticky) {
  color: var(--bone);
}
body:not(.surface-bone) .site-header:not(.is-sticky) .logo {
  color: var(--bone);
}
body.surface-bone .site-header:not(.is-sticky) {
  color: var(--ink);
}
body.surface-bone .site-header:not(.is-sticky) .logo {
  color: var(--ink);
}
.site-header:not(.is-sticky) .logo span {
  color: var(--ember);
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: inherit;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.65rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--ember); color: var(--ink); border-color: var(--ember); }
.btn-secondary {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn:hover { filter: brightness(1.08); box-shadow: 0 4px 20px rgba(0,0,0,0.18); }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* APERTURE Hero */
.hero-aperture {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-aperture__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: ken-burns 28s ease-in-out infinite alternate;
}
@keyframes ken-burns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
.hero-aperture__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,12,14,0.55) 0%, rgba(11,12,14,0.72) 45%, rgba(11,12,14,0.92) 100%);
}
.hero-aperture__seam {
  position: absolute;
  bottom: 28%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  animation: seam-draw 2.4s ease 0.6s forwards;
}
@keyframes seam-draw { to { transform: scaleX(1); } }
.hero-aperture__iris {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px; height: 48px;
  border: 1px solid var(--ember);
  border-radius: 50%;
  opacity: 0.5;
}
.hero-aperture__iris::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--ember);
  border-radius: 50%;
  animation: iris-open 1.8s ease 0.3s forwards;
  transform: scale(0.3);
}
@keyframes iris-open { to { transform: scale(1); } }

.hero-topbar {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 1.5rem);
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}
.hero-topbar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.85rem;
}
.hero-topbar__accent { color: var(--ember); }
.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
  padding-bottom: 4rem;
  max-width: 42rem;
}
.hero-content h1 .forged {
  position: relative;
  display: inline-block;
}
.hero-content h1 .forged::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0.08em;
  width: 100%; height: 3px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  animation: forged-line 1.2s ease 0.8s forwards;
}
@keyframes forged-line { to { transform: scaleX(1); } }
.hero-sub { max-width: 34rem; opacity: 0.88; font-size: 1.0625rem; }
.trust-strip {
  position: relative;
  z-index: 2;
  padding: 0.85rem 0 1.25rem;
  text-align: center;
  color: var(--ash);
  border-top: 1px solid rgba(243,241,236,0.12);
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Image plates */
.image-plate {
  position: relative;
  border: 1px solid rgba(243, 241, 236, 0.25);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  overflow: hidden;
}
.image-plate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(243, 241, 236, 0.06);
  pointer-events: none;
  z-index: 1;
}
.surface-bone .image-plate {
  border-color: rgba(11, 12, 14, 0.12);
  box-shadow: 0 20px 48px rgba(11, 12, 14, 0.12);
}
.surface-bone .image-plate::before { background: rgba(11, 12, 14, 0.03); }

/* Grid layouts */
.grid-2 { display: grid; gap: 2.5rem; }
.grid-3 { display: grid; gap: 2rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Metrics */
.metric-card {
  padding: 1.75rem;
  border: 1px solid rgba(11, 12, 14, 0.1);
}
.metric-card .mono { color: var(--ember); margin-bottom: 0.5rem; }
.metric-card strong {
  font-family: var(--font-display);
  font-size: 2rem;
  display: block;
  line-height: 1;
  margin-bottom: 0.35rem;
}

/* Stages */
.stage-list { counter-reset: stage; list-style: none; padding: 0; }
.stage-list li {
  counter-increment: stage;
  padding: 1.5rem 0 1.5rem 4rem;
  position: relative;
  border-bottom: 1px solid rgba(11, 12, 14, 0.08);
}
.stage-list li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  left: 0; top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  opacity: 0.12;
  line-height: 1;
}

/* Service cards */
.service-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  padding: 2rem 1.75rem;
  border: 1px solid rgba(11, 12, 14, 0.1);
  position: relative;
  overflow: hidden;
}
.service-card .card-num {
  position: absolute;
  top: 0.5rem; right: 1rem;
  font-family: var(--font-mono);
  font-size: 3.5rem;
  opacity: 0.06;
  line-height: 1;
}

/* Work cards */
.work-card {
  padding: 2rem;
  border: 1px solid rgba(243, 241, 236, 0.12);
  margin-bottom: 2rem;
}
.surface-bone .work-card { border-color: rgba(11, 12, 14, 0.1); }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(11, 12, 14, 0.1); padding: 1.5rem 0; }
.surface-graphite .faq-item,
.surface-ink .faq-item { border-bottom-color: rgba(243, 241, 236, 0.12); }
.faq-item h3 { margin-bottom: 0.65rem; font-size: 1.125rem; }

/* Forms */
.contact-form {
  max-width: 34rem;
  width: 100%;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9375rem; }
.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(11, 12, 14, 0.2);
  background: var(--bone);
  color: var(--ink);
}
.form-group textarea { min-height: 9rem; resize: vertical; }
.form-check { display: flex; gap: 0.65rem; align-items: flex-start; }
.form-check input { margin-top: 0.25rem; width: auto; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* CTA band */
.cta-band { text-align: center; padding-block: var(--section-pad); }
.cta-band h2 { margin-bottom: 0.75rem; }

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-disclaimer {
  font-size: 0.8125rem;
  opacity: 0.82;
  line-height: 1.6;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(243, 241, 236, 0.12);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { text-decoration: none; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  opacity: 0.7;
}

/* Page hero (inner pages) */
.page-hero {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 3rem;
}
.page-hero h1 { margin-bottom: 0.75rem; }
.lead { font-size: 1.1875rem; max-width: 42rem; opacity: 0.88; }

/* Legal prose */
.legal-prose h2 { margin-top: 2.5rem; font-size: 1.375rem; }
.legal-prose h3 { margin-top: 1.75rem; font-size: 1.125rem; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.25rem;
  background: var(--graphite);
  color: var(--bone);
  border-top: 1px solid rgba(243, 241, 236, 0.12);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-inner {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .cookie-inner { grid-template-columns: 1fr auto; align-items: center; }
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.cookie-actions button {
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid rgba(243, 241, 236, 0.3);
  background: transparent;
  color: var(--bone);
}
.cookie-actions .btn-accept { background: var(--ember); color: var(--ink); border-color: var(--ember); }
.cookie-panel {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(243, 241, 236, 0.12);
}
.cookie-panel.is-open { display: block; }
.cookie-panel label { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.875rem; }

/* Reveal animations */
.js .reveal {
  opacity: 1;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 404 */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

/* Thanks */
.thanks-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* Mobile nav */
@media (max-width: 767px) {
  .hero-aperture { min-height: 82vh; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bone);
    color: var(--ink);
    padding: 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; gap: 1rem; }
}

@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;
  }
  .hero-aperture__bg { animation: none; }
  .js .reveal { transform: none; }
}
