/* ==========================================================================
   Fig Data — Design tokens
   Palette:
     --bg-deep     #241522  (fig-skin aubergine, page background)
     --bg-panel    #2E1B2C  (slightly lifted panel surface)
     --pomegranate #C23B4C  (primary accent — CTAs, headline highlight)
     --mauve       #C98FA0  (secondary accent — eyebrows, hover states)
     --mountain    #6E8299  (tertiary — hairlines, secondary text, data marks)
     --cream       #F5EDE4  (primary text on dark)
   Type:
     Display — Fraunces (organic serif, variable optical size)
     Body    — IBM Plex Sans
     Utility — IBM Plex Mono (labels, numerals, data-flavored accents)
   ========================================================================== */

:root {
  --bg-deep: #241522;
  --bg-panel: #2E1B2C;
  --bg-panel-2: #34202F;
  --pomegranate: #C23B4C;
  --pomegranate-light: #E8637A;
  --mauve: #C98FA0;
  --mountain: #6E8299;
  --cream: #F5EDE4;
  --cream-dim: rgba(245, 237, 228, 0.68);
  --hairline: rgba(110, 130, 153, 0.28);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
  --wrap-wide: 1440px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px);
}

/* On wide viewports, let content breathe further out instead of
   sitting in a fixed narrow column with large dead margins. */
@media (min-width: 1440px) {
  .wrap { max-width: var(--wrap-wide); }
}
@media (min-width: 1800px) {
  .wrap { max-width: 1640px; }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--cream); }
p { margin: 0; }
a { color: inherit; }

/* subtle film-grain texture over the whole page, purely decorative */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(36, 21, 34, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--cream);
}

.logo-mark {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  cursor: pointer;
  transform-origin: 50% 55%;
}
.logo-mark.small { opacity: 0.92; }

/* gentle jello wobble on hover */
.logo:hover .logo-mark,
.footer-inner > div:first-child:hover .logo-mark {
  animation: figWobble 0.7s ease-in-out;
}

@keyframes figWobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-12deg) scale(1.06); }
  40% { transform: rotate(9deg) scale(1.03); }
  60% { transform: rotate(-6deg) scale(1.04); }
  80% { transform: rotate(3deg) scale(1.01); }
}

/* playful roll-and-spin on click */
.logo-mark.rolling {
  animation: figRoll 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes figRoll {
  0%   { transform: translateX(0) rotate(0deg); }
  55%  { transform: translateX(34px) rotate(300deg); }
  100% { transform: translateX(0) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .logo:hover .logo-mark,
  .footer-inner > div:first-child:hover .logo-mark,
  .logo-mark.rolling {
    animation: none;
  }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.main-nav a {
  text-decoration: none;
  color: var(--cream-dim);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--cream); }

.nav-cta {
  border: 1px solid var(--pomegranate);
  color: var(--cream) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--pomegranate); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--cream);
  display: block;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--pomegranate);
  color: var(--cream);
}
.btn-primary:hover { background: var(--pomegranate-light); }

.btn-ghost {
  border-color: var(--hairline);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--mauve); color: var(--mauve); }

.btn-light {
  background: var(--cream);
  color: var(--bg-deep);
}
.btn-light:hover { background: #fff; }

.btn-small { padding: 10px 18px; font-size: 13px; }

/* ============ Hero ============ */
.hero { padding: 96px 0 64px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.accent-text { color: var(--pomegranate-light); font-style: italic; }

.hero-sub {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--cream-dim);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fig-rings { width: 100%; max-width: 440px; height: auto; }

.fig-graphic-logo {
  position: absolute;
  width: 42%;
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(194, 59, 76, 0.35));
}

@media (min-width: 1440px) {
  .fig-rings { max-width: 560px; }
  .fig-graphic-logo { max-width: 250px; }
}

/* ============ Trust strip ============ */
.trust-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0;
}
.trust-strip p {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cream-dim);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ============ Section shared ============ */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mountain);
  margin-bottom: 14px;
}

.services, .process, .about { padding: 96px 0; }

.services h2, .process h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  max-width: 18ch;
  margin-bottom: 56px;
}

/* ============ Services grid ============ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.service-card {
  background: var(--bg-panel);
  padding: 36px 32px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pomegranate-light);
}

.service-card h3 { font-size: 1.15rem; }
.service-card p { color: var(--cream-dim); font-size: 0.95rem; }

.service-card-cta {
  background: var(--pomegranate);
  justify-content: center;
}
.service-card-cta h3, .service-card-cta p { color: var(--cream); }
.service-card-cta .btn-primary {
  background: var(--cream);
  color: var(--pomegranate);
  align-self: flex-start;
}
.service-card-cta .btn-primary:hover { background: #fff; }

/* ============ Process ============ */
.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.process-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}
.process-list li:last-child { border-bottom: 1px solid var(--hairline); }

.step-index {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--mauve);
  line-height: 1;
}

.process-list h3 { font-size: 1.1rem; margin-bottom: 8px; }
.process-list p { color: var(--cream-dim); max-width: 60ch; }

/* ============ About ============ */
.about { background: var(--bg-panel); }

.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: start;
}

.about h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 20px; }
.about-lead { font-size: 1.05rem; margin-bottom: 18px; color: var(--cream-dim); }
.about p:not(.about-lead) { color: var(--cream-dim); }

.about-labs {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.about-labs-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mountain);
  line-height: 1.6;
}

/* ============ Why section ============ */
.why { padding: 96px 0; }

.why-inner { width: 100%; }

.why h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 28px;
  max-width: 26ch;
}

.why-lead {
  font-size: 1.15rem;
  color: var(--cream-dim);
  max-width: 68ch;
  margin-bottom: 36px;
}

/* body copy flows into as many columns as the page width allows,
   so it fills the section instead of sitting in one narrow block */
.why-body {
  column-width: 320px;
  column-gap: 48px;
  column-rule: 1px solid var(--hairline);
}

.why-body p {
  color: var(--cream-dim);
  margin: 0;
}

/* pull-quote closer, breaks out of the text column */
.why-closer {
  display: block;
  margin: 40px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  color: var(--mauve);
  max-width: 52ch;
}

@media (max-width: 860px) {
  .why-body { column-width: 100%; }
}

/* ============ CTA band ============ */
.cta-band {
  background: var(--pomegranate);
  padding: 88px 0;
}
.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-band h2 { color: var(--cream); font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 16px; }
.cta-band p { color: rgba(245, 237, 228, 0.85); margin-bottom: 32px; font-size: 1.05rem; }

/* ============ Footer ============ */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cream-dim);
}
.footer-inner > div:first-child { display: flex; align-items: center; gap: 8px; color: var(--cream); }
.tagline { font-style: italic; font-family: var(--font-display); color: var(--mauve); }
.footer-contact { display: flex; gap: 20px; }
.footer-contact a { text-decoration: none; color: var(--cream-dim); }
.footer-contact a:hover { color: var(--cream); }

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 280px; margin: 0 auto; }
  .service-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .services, .process, .about { padding: 64px 0; }
}