/* ============================================================
   Project Wildflower — static replica of the original React site
   Translated 1:1 from Tailwind classes + inline styles.
   Dark mode default; [data-theme="light"] mirrors isDarkMode=false.
   ============================================================ */

:root {
  --black: #000000;
  --white: #FFFFFF;
  --dark-gray: #1A1A1A;

  /* Theme-dependent (dark defaults) */
  --bg: var(--black);
  --fg: var(--white);
  --border-10: rgba(255,255,255,0.063);   /* #FFFFFF10 */
  --border-15: rgba(255,255,255,0.082);   /* #FFFFFF15 */
  --border-20: rgba(255,255,255,0.125);   /* #FFFFFF20 */
  --border-25: rgba(255,255,255,0.145);   /* #FFFFFF25 */
  --border-30: rgba(255,255,255,0.188);   /* #FFFFFF30 */
  --border-40: rgba(255,255,255,0.25);    /* #FFFFFF40 */
  --panel-08: rgba(255,255,255,0.031);    /* #FFFFFF08 */
  --modal-bg: var(--dark-gray);
  --modal-backdrop: rgba(0,0,0,0.96);     /* #000000F5 */
  --modal-backdrop-light: rgba(0,0,0,0.95); /* #000000F2 */
  --grad-a: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
  --grad-b: radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
  --grad-c: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
  --grad-d: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
  --grid-line: rgba(255,255,255,0.1);
  --tree-bg: #0d1f0f;
  --tree-sub: rgba(255,255,255,0.65);
  --tree-note: rgba(255,255,255,0.65);
  --border-interactive: rgba(255,255,255,0.5);
  --header-scrim: rgba(0,0,0,0.3);
}

[data-theme="light"] {
  --bg: var(--white);
  --fg: var(--black);
  --border-10: rgba(0,0,0,0.063);
  --border-15: rgba(0,0,0,0.082);
  --border-20: rgba(0,0,0,0.082);   /* original uses ${colorBlack}15 where dark uses 20 */
  --border-25: rgba(0,0,0,0.125);   /* original: black20 where dark uses white25 */
  --border-30: rgba(0,0,0,0.188);
  --border-40: rgba(0,0,0,0.25);
  --panel-08: rgba(0,0,0,0.016);    /* #00000004 */
  --modal-bg: var(--white);
  --modal-backdrop: rgba(255,255,255,0.95);   /* #FFFFFFF2 */
  --modal-backdrop-light: rgba(255,255,255,0.9); /* #FFFFFFE6 */
  --grad-a: radial-gradient(circle at 30% 20%, rgba(0,0,0,0.05) 0%, transparent 50%);
  --grad-b: radial-gradient(circle at 70% 80%, rgba(0,0,0,0.04) 0%, transparent 50%);
  --grad-c: radial-gradient(circle at 70% 30%, rgba(0,0,0,0.05) 0%, transparent 50%);
  --grad-d: radial-gradient(circle at 30% 70%, rgba(0,0,0,0.04) 0%, transparent 50%);
  --grid-line: rgba(0,0,0,0.1);
  --tree-bg: #e8f0e9;
  --tree-sub: rgba(0,0,0,0.6);
  --tree-note: rgba(0,0,0,0.65);
  --border-interactive: rgba(0,0,0,0.5);
  --header-scrim: rgba(255,255,255,0.3);
}

/* ---------- Accessibility utilities ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background-color: var(--fg);
  color: var(--bg);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Bitter', serif;
  background-color: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.5s, color 0.5s;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { color: inherit; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 6px;
}

.hidden-seo { display: none !important; }

/* ---------- Background video (dark mode only) ---------- */

.bg-video-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}
[data-theme="light"] .bg-video-wrap { display: none; }
.bg-video-wrap video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0.15;
}

.page { position: relative; z-index: 10; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 50; background: var(--header-scrim); }
.site-header .inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) {
  .site-header .inner { padding: 0.75rem 2rem; }
}

.brand {
  flex-shrink: 0;
  margin: 0 auto;
  display: block;
  text-decoration: none;
  border-radius: 6px;
}
@media (min-width: 768px) { .brand { margin: 0; } }
.brand .logo-row { display: flex; align-items: center; gap: 0.875rem; transition: transform 0.15s; }
.brand:hover .logo-row { transform: scale(1.05); }
.brand img { height: 44px; width: auto; display: block; }
@media (min-width: 768px) { .brand img { height: 40px; } }
.brand .brand-name { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.025em; font-weight: 300; }

.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

.site-nav { display: none; }
@media (min-width: 768px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    font-size: 1.125rem;
    letter-spacing: 0.025em;
  }
}
.site-nav a, .site-nav button {
  font-size: inherit;
  text-decoration: none;
  transition: opacity 0.15s;
  border-radius: 6px;
}
.site-nav a:hover, .site-nav button:hover { opacity: 0.5; }

/* ---------- Theme toggle ---------- */

/* 44px target (WCAG 2.5.5 AAA; AA 2.5.8 needs only 24px). Resting opacity
   0.75 keeps the icon above 10:1 against the pill in both themes — group
   opacity fades pill and icon together, so their relative contrast holds. */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  background-color: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle:hover,
.theme-toggle:focus-visible { opacity: 1; }
.theme-toggle:hover { transform: scale(1.1); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---------- Background video pause control ---------- */

/* Matches .theme-toggle sizing and opacity so the two controls read as a pair. */
.video-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.video-toggle svg { width: 18px; height: 18px; }
.video-toggle:hover { transform: scale(1.1); }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }

/* The video toggle starts invisible; script.js adds .is-revealed while the
   video is actually playing. It stays in the tab order while hidden and
   reveals on focus (the skip-link pattern), so it is never stranded from the
   keyboard. Resting 0.6 keeps the icon visually softer while still usable. */
.video-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease, transform 0.15s ease;
}
.video-toggle.is-revealed {
  opacity: 0.6;
  pointer-events: auto;
}
.video-toggle.is-revealed:hover,
.video-toggle:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .video-toggle { transition: none; }
}

/* ---------- Shared decorative pieces ---------- */

.overline-row {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.overline-row .line {
  height: 1px;
  width: 3rem;
  background-color: var(--fg);
  opacity: 0.3;
}
@media (min-width: 768px) { .overline-row .line { width: 5rem; } }
.overline-row p {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.62;
}
@media (min-width: 768px) { .overline-row p { font-size: 0.875rem; } }

.gradient-a, .gradient-b { position: absolute; inset: 0; }
.gradient-a { opacity: 0.4; }
.gradient-b { opacity: 0.3; }

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Ghost CTA button (hero, contact, forms) */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border-interactive);
  border-radius: 6px;
  background-color: transparent;
  color: var(--fg);
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.ghost-btn:hover { transform: scale(1.05); }
.ghost-btn > * { position: relative; z-index: 10; }
.ghost-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--fg);
  opacity: 0;
  transition: opacity 0.15s;
}
.ghost-btn:hover::before { opacity: 0.1; }
.ghost-btn svg { transition: transform 0.15s; }
.ghost-btn:hover svg { transform: translateX(0.25rem); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero .fx { position: absolute; inset: 0; z-index: 0; }
.hero .fx .gradient-a { background: var(--grad-a); }
.hero .fx .gradient-b { background: var(--grad-b); }
.hero .content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
@media (min-width: 768px) { .hero .content { padding: 0 2rem; } }

.hero h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin-bottom: 3rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; } }

.bordered-sub {
  max-width: 42rem;
  margin: 0 auto 4rem;
}
.bordered-sub .in {
  border-top: 1px solid var(--border-15);
  border-bottom: 1px solid var(--border-15);
  padding: 1.5rem 0;
}
@media (min-width: 768px) { .bordered-sub .in { padding: 2rem 0; } }
.bordered-sub p {
  font-size: 1.125rem;
  line-height: 1.625;
  opacity: 0.7;
}
@media (min-width: 768px) { .bordered-sub p { font-size: 1.25rem; } }

.hero .cta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.scroll-hint {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.62;
  animation: bounce 1s infinite;
}
.scroll-hint p {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- One Two Tree ---------- */

.tree-section {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
@media (min-width: 768px) { .tree-section { padding: 2rem 2rem; } }

.tree-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--border-10);
  border-radius: 6px;
  background-color: var(--tree-bg);
  text-decoration: none;
}
@media (min-width: 768px) { .tree-card { min-height: 400px; } }

.tree-photo {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 50%;
  overflow: hidden;
}
@media (min-width: 768px) { .tree-photo { width: 45%; } }
.tree-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.7s;
}
.tree-card:hover .tree-photo img { transform: scale(1.03); }
.tree-photo .fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--tree-bg) 0%, transparent 50%);
}

.tree-copy {
  position: relative;
  z-index: 10;
  padding: 3rem 2rem;
  max-width: 28rem;
  color: var(--fg);
}
@media (min-width: 768px) { .tree-copy { padding: 4rem 4rem; } }
.tree-copy .kicker {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: 0.62;
}
.tree-copy h2 {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}
@media (min-width: 768px) { .tree-copy h2 { font-size: 3rem; } }
.tree-copy .sub {
  font-size: 1rem;
  line-height: 1.625;
  margin-bottom: 0.75rem;
  color: var(--tree-sub);
}
@media (min-width: 768px) { .tree-copy .sub { font-size: 1.125rem; } }
.tree-copy .note {
  font-size: 0.875rem;
  line-height: 1.625;
  margin-bottom: 2rem;
  color: var(--tree-note);
}
.tree-copy .visit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.72;
  transition: opacity 0.15s;
}
.tree-copy .visit span { letter-spacing: 0.05em; }
.tree-card:hover .visit { opacity: 1; }
.tree-card .visit svg { transition: transform 0.15s; }
.tree-card:hover .visit svg { transform: translateX(0.25rem); }

/* ---------- Digital in the AI era ---------- */

.era-section {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
  padding: 8rem 1.5rem;
}
@media (min-width: 768px) { .era-section { padding: 10rem 2rem; } }
.era-section .in { max-width: 72rem; margin: 0 auto; }
.era-section h2 {
  text-align: center;
  margin-bottom: 5rem;
  font-size: 1.875rem;
  letter-spacing: -0.025em;
  font-weight: 300;
}
@media (min-width: 768px) { .era-section h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .era-section h2 { font-size: 3rem; } }

.era-grid { display: grid; gap: 4rem; }
@media (min-width: 768px) { .era-grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.era-item { display: flex; flex-direction: column; gap: 0.75rem; }
.era-item h3 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  font-weight: 400;
  line-height: 1.3;
}
@media (min-width: 768px) { .era-item h3 { font-size: 1.875rem; } }
.era-item p {
  font-size: 1.125rem;
  line-height: 1.625;
  opacity: 0.6;
}

/* ---------- Case Studies ---------- */

.cs-section { position: relative; padding: 8rem 0; }
@media (min-width: 768px) { .cs-section { padding: 10rem 0; } }
.cs-section .heading {
  max-width: 80rem;
  margin: 0 auto 6rem;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .cs-section .heading { padding: 0 2rem; } }
.cs-section h2 {
  text-align: center;
  font-size: 1.875rem;
  letter-spacing: -0.025em;
  font-weight: 300;
}
@media (min-width: 768px) { .cs-section h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .cs-section h2 { font-size: 3rem; } }

.cs-list {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 60px;
}
@media (min-width: 768px) { .cs-list { padding: 0 2rem; } }

.cs-card {
  position: relative;
  display: grid;
  align-items: center;
  height: 300px;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.5s;
  cursor: pointer;
}
@media (min-width: 768px) { .cs-card { height: 240px; } }
.cs-card:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; }
.cs-card:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.cs-card.even { grid-template-columns: 30% 70%; }
.cs-card.odd  { grid-template-columns: 70% 30%; }

.cs-card .img-wrap { position: relative; height: 100%; overflow: hidden; }
.cs-card.even .img-wrap { order: 1; }
.cs-card.even .copy { order: 2; }
.cs-card.odd .img-wrap { order: 2; }
.cs-card.odd .copy { order: 1; }
.cs-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}
.cs-card:hover .img-wrap img { transform: scale(1.05); }
.cs-card .img-wrap .shade {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
}

.cs-card .copy {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 768px) { .cs-card .copy { padding: 2rem; } }
@media (min-width: 1024px) { .cs-card .copy { padding: 3rem; } }

.cs-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 6px;
}
.cs-card h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  font-weight: 400;
}
@media (min-width: 768px) { .cs-card h3 { font-size: 1.875rem; } }

.cs-coral    { background-color: #FF6B6B; color: #000000; }
.cs-turquoise{ background-color: #4ECDC4; color: #000000; }
.cs-yellow   { background-color: #FFE66D; color: #000000; }
.cs-mint     { background-color: #A8E6CF; color: #000000; }

/* ---------- Contact CTA section ---------- */

.contact-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-top: 1px solid var(--border-10);
}
.contact-section .fx { position: absolute; inset: 0; z-index: 0; }
.contact-section .fx .gradient-a { background: var(--grad-c); }
.contact-section .fx .gradient-b { background: var(--grad-d); }
.contact-section .content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 8rem 1.5rem;
  text-align: center;
}
@media (min-width: 768px) { .contact-section .content { padding: 10rem 2rem; } }

.contact-section h2 {
  margin-bottom: 3rem;
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.2;
}
@media (min-width: 768px) { .contact-section h2 { font-size: 3rem; } }
@media (min-width: 1024px) { .contact-section h2 { font-size: 3.75rem; } }

.contact-section .bordered-sub p { opacity: 0.6; }
@media (min-width: 1024px) { .contact-section .bordered-sub p { font-size: 1.5rem; } }

.contact-section .cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
@media (min-width: 640px) { .contact-section .cta-row { flex-direction: row; } }

.email-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0.6;
}
.email-row .line {
  height: 1px;
  width: 2rem;
  background-color: var(--fg);
  opacity: 0.3;
}
@media (min-width: 768px) { .email-row .line { width: 3rem; } }
.email-row a {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity 0.15s;
  border-radius: 6px;
}
@media (min-width: 768px) { .email-row a { font-size: 1rem; } }
.email-row a:hover { opacity: 1; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-10);
  padding: 3rem 1.5rem;
}
@media (min-width: 768px) { .site-footer { padding: 3rem 2rem; } }
.site-footer .inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 768px) { .site-footer .inner { flex-direction: row; } }
.site-footer .logo-row { display: flex; align-items: center; gap: 1rem; opacity: 0.6; }
.site-footer .logo-row img { height: 36px; width: auto; }
.site-footer .logo-row .brand-name { font-size: 1.5rem; letter-spacing: -0.025em; font-weight: 300; }
.site-footer p {
  font-size: 0.875rem;
  line-height: 1.625;
  opacity: 0.65;
  max-width: 42rem;
  text-align: center;
}
@media (min-width: 768px) { .site-footer p { text-align: right; } }

/* ---------- Modals ---------- */

.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: var(--modal-backdrop);
}
.modal-backdrop.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background-color: var(--modal-backdrop-light);
}
.modal-scroll {
  min-height: 100vh;
  padding: 3rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.modal-panel {
  position: relative;
  width: 100%;
  background-color: var(--modal-bg);
  border: 2px solid var(--fg);
  border-radius: 6px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  color: var(--fg);
}
.modal-panel.about { max-width: 56rem; }
.modal-panel.contact-panel { max-width: 42rem; padding: 3rem; }
@media (min-width: 768px) { .modal-panel.contact-panel { padding: 5rem; } }
.modal-panel.case { max-width: 64rem; }

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem;
  transition: opacity 0.15s;
  border-radius: 6px;
  z-index: 5;
}
.modal-close:hover { opacity: 0.5; }

/* Case study modal close button (inverted, offset) */
.case-close {
  position: absolute;
  top: -4rem;
  right: 0;
  padding: 1rem;
  border: 2px solid var(--fg);
  border-radius: 6px;
  background-color: var(--fg);
  color: var(--bg);
  transition: all 0.15s;
  z-index: 5;
}
@media (min-width: 768px) {
  .case-close { top: 2rem; right: -5rem; }
}
.case-close:hover { transform: scale(1.1); }

/* About modal internals */
.about-body { padding: 2rem; display: flex; flex-direction: column; gap: 5rem; }
@media (min-width: 768px) { .about-body { padding: 4rem; } }
.about-body .overline-row { margin-bottom: 2rem; justify-content: flex-start; }
.about-body .overline-row .line { width: 3rem; }
.about-body h2 {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) { .about-body h2 { font-size: 3rem; } }
.about-open { display: flex; flex-direction: column; gap: 1.5rem; }
.about-open .lead {
  font-size: 1.25rem;
  line-height: 1.625;
  opacity: 0.8;
}
@media (min-width: 768px) { .about-open .lead { font-size: 1.5rem; } }
.about-open .body {
  font-size: 1.125rem;
  line-height: 1.625;
  opacity: 0.7;
}
@media (min-width: 768px) { .about-open .body { font-size: 1.25rem; } }

.bios-grid { display: grid; gap: 3rem; }
@media (min-width: 768px) { .bios-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.bio-block { border-top: 2px solid var(--border-30); padding-top: 2rem; }
[data-theme="light"] .bio-block { border-top-color: rgba(0,0,0,0.125); }
.bio-block h3 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  font-weight: 400;
}
@media (min-width: 768px) { .bio-block h3 { font-size: 1.875rem; } }
.bio-block p {
  font-size: 1rem;
  line-height: 1.625;
  opacity: 0.7;
}
@media (min-width: 768px) { .bio-block p { font-size: 1.125rem; } }

.how-block h3 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
  font-weight: 400;
}
@media (min-width: 768px) { .how-block h3 { font-size: 1.875rem; } }
.step {
  padding: 2rem;
  border: 2px solid var(--border-20);
  margin-bottom: -1px;
}
.step:first-of-type { border-radius: 6px 6px 0 0; }
.step:last-of-type { border-radius: 0 0 6px 6px; margin-bottom: 0; }
.step.mid {
  border-color: var(--border-40);
  background-color: var(--panel-08);
}
[data-theme="light"] .step { border-color: rgba(0,0,0,0.082); }
[data-theme="light"] .step.mid { border-color: rgba(0,0,0,0.188); background-color: rgba(0,0,0,0.016); }
.step .label {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-bottom: 0.75rem;
}
.step .chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.step .chips span {
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-25);
  border-radius: 6px;
  opacity: 0.7;
}
[data-theme="light"] .step .chips span { border-color: rgba(0,0,0,0.125); }
.step .handshake {
  font-size: 1.125rem;
  line-height: 1.625;
  opacity: 0.8;
  font-weight: 300;
  font-style: italic;
}
.about-body .closing { border-top: 1px solid var(--border-15); padding-top: 3rem; }

/* Contact modal internals */
.contact-panel h3#contact-modal-title {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  font-weight: 300;
}
@media (min-width: 768px) { .contact-panel h3#contact-modal-title { font-size: 3rem; } }
.contact-panel .subtitle { font-size: 1.25rem; margin-bottom: 3rem; opacity: 0.6; }

.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form .field { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-form label {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}
.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid var(--border-interactive);
  border-radius: 6px;
  background-color: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.15s;
}
.contact-form textarea { resize: none; }
.contact-form .error { font-size: 0.875rem; color: #ef4444; display: none; }
[data-theme="light"] .contact-form .error { color: #c81e1e; }
.contact-form .field.invalid .error { display: block; }
.contact-form .submit-wrap { padding-top: 1.5rem; }
.contact-form .ghost-btn { width: 100%; padding-top: 1.25rem; padding-bottom: 1.25rem; }

/* Case study modal internals */
.case-body { padding: 2rem; }
@media (min-width: 768px) { .case-body { padding: 4rem; } }
.gallery { margin-bottom: 4rem; }
.gallery .frame { overflow: hidden; margin-bottom: 1.5rem; border-radius: 6px; }
.gallery .frame img { width: 100%; height: auto; }
.gallery .controls { display: flex; align-items: center; justify-content: space-between; }
.gallery .nav-btn {
  padding: 1rem;
  border: 2px solid var(--fg);
  border-radius: 6px;
  transition: opacity 0.15s;
}
.gallery .nav-btn:hover { opacity: 0.5; }
.gallery .dots { display: flex; gap: 1rem; }
.gallery .dot {
  position: relative;
  height: 24px;
  width: 2rem;
  background: transparent;
  transition: all 0.15s;
  padding: 0;
}
.gallery .dot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 0.25rem;
  border-radius: 6px;
  background-color: var(--border-30);
  transition: background-color 0.15s;
}
.gallery .dot.active { width: 4rem; }
.gallery .dot.active::after { background-color: var(--fg); }
.gallery[data-count="1"] .controls { display: none; }

.case-sections { display: flex; flex-direction: column; gap: 4rem; }
.case-sections h2 {
  font-size: 1.875rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
@media (min-width: 768px) { .case-sections h2 { font-size: 2.25rem; } }
.case-sections h3 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  font-weight: 400;
}
@media (min-width: 768px) { .case-sections h3 { font-size: 2.25rem; } }
.case-sections p.body,
.case-sections .approach-text p {
  font-size: 1.25rem;
  line-height: 1.625;
  opacity: 0.7;
}
.approach-text { display: flex; flex-direction: column; gap: 1.5rem; }
.approach-text ul {
  list-style: none;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.625;
  opacity: 0.7;
}
.approach-text li { display: flex; gap: 1rem; align-items: flex-start; }

.stats-grid { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-box {
  border: 2px solid var(--border-20);
  padding: 2rem;
  text-align: center;
  border-radius: 6px;
}
[data-theme="light"] .stat-box { border-color: rgba(0,0,0,0.082); }
.stat-box .value { font-size: 2.25rem; margin-bottom: 0.5rem; }
@media (min-width: 768px) { .stat-box .value { font-size: 3rem; } }
.stat-box .label { font-size: 1.125rem; opacity: 0.6; }

.learnings { display: flex; flex-direction: column; gap: 1rem; }
.learnings .row { display: flex; align-items: flex-start; gap: 1rem; }
.learnings .row .dash { font-size: 1.25rem; }
.learnings .row p { font-size: 1.25rem; line-height: 1.625; opacity: 0.7; }

/* Thank you modal */
.thanks-panel { text-align: center; }
.thanks-panel h3 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
  font-weight: 300;
  line-height: 1.2;
}
@media (min-width: 768px) { .thanks-panel h3 { font-size: 3rem; } }
.thanks-panel .flower {
  border-top: 1px solid var(--border-15);
  border-bottom: 1px solid var(--border-15);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .thanks-panel .flower { padding: 2rem 0; } }
.thanks-panel .flower p {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  opacity: 0.7;
}
@media (min-width: 768px) { .thanks-panel .flower p { font-size: 1.875rem; } }

/* Lock body scroll while a modal is open */
body.modal-open { overflow: hidden; }


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