/* ==========================================================================
   Daniel and Seretta Birch Partnership brochure site. Plain CSS, no frameworks.
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #121726;
  --text-soft: #4a5468;
  --muted: #6b7489;
  --border: rgba(18, 23, 38, .09);
  --brand: #4f6bff;
  --brand-2: #14b8d4;
  --brand-grad: linear-gradient(135deg, #5b6cff 0%, #3aa0ff 50%, #14c8d4 100%);
  --hero-bg: #0b1020;
  --hero-text: #eef2ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 10px 30px -12px rgba(16, 24, 40, .25);
  --shadow-lg: 0 30px 60px -20px rgba(16, 24, 40, .35);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 72px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-alt: #0f1529;
  --surface: #141b31;
  --surface-2: #1a2340;
  --text: #e9edf8;
  --text-soft: #b3bdd4;
  --muted: #8b96b1;
  --border: rgba(255, 255, 255, .08);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-alt: #0f1529;
    --surface: #141b31;
    --surface-2: #1a2340;
    --text: #e9edf8;
    --text-soft: #b3bdd4;
    --muted: #8b96b1;
    --border: rgba(255, 255, 255, .08);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  overflow-x: clip;
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: .08em; text-underline-offset: .2em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--text); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); font-weight: 800; }
h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 750; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.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; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--brand-grad); border-radius: 2px; }

/* Buttons ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand-grad);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 0;
  background: var(--btn-bg); color: #fff; font: inherit; font-weight: 650; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(79, 107, 255, .8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(79, 107, 255, .9); filter: saturate(1.15); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: var(--hero-text); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.btn-small { padding: .55rem 1.1rem; font-size: .925rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

/* Header -------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  color: var(--hero-text);
  transition: background .3s, box-shadow .3s, color .3s, backdrop-filter .3s;
}
.site-header.is-scrolled,
body:has(.section.legal) .site-header {
  background: color-mix(in srgb, var(--bg-alt) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 var(--border);
  color: var(--text);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-grad); color: #fff; font-size: .82rem; font-weight: 850; letter-spacing: -.01em;
  box-shadow: 0 6px 18px -6px rgba(79, 107, 255, .7);
}
.brand-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand-primary { font-weight: 780; font-size: 1.02rem; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: inherit; text-decoration: none; font-weight: 550; font-size: .975rem; opacity: .85; position: relative; transition: opacity .2s; }
.site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--brand-grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); border-radius: 2px; }
.site-nav a:not(.btn):hover, .site-nav a.is-current { opacity: 1; }
.site-nav a:not(.btn):hover::after, .site-nav a.is-current::after { transform: scaleX(1); }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent);
  background: transparent; color: inherit; cursor: pointer; transition: background .2s, transform .3s var(--ease);
}
.theme-toggle:hover { background: color-mix(in srgb, currentColor 10%, transparent); transform: rotate(15deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .site-nav { gap: 1.25rem; }
}
@media (max-width: 380px) {
  .brand-mark { width: 38px; height: 38px; font-size: .75rem; }
  .brand-primary { font-size: .92rem; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: transparent; border: 0; color: inherit; cursor: pointer; position: relative; z-index: 2;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-open .nav-toggle-bar { background: transparent; }
  .nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .75rem 1.25rem 1.5rem;
    background: var(--bg-alt); color: var(--text);
    box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s, visibility 0s .3s;
  }
  .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .25s; }
  .site-nav a:not(.btn) { padding: .9rem .25rem; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }
  .site-nav .theme-toggle { margin-top: 1rem; align-self: center; }
  .nav-open .site-header { background: var(--bg-alt); color: var(--text); }
}

/* Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero-bg); color: var(--hero-text);
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(4rem, 8vw, 7rem);
}
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.1rem); font-weight: 850; letter-spacing: -.035em; margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #fff 30%, #b9c6ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .eyebrow { color: #8fb4ff; }
.hero .lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: #bac4de; max-width: 34rem; margin-bottom: 2rem; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; background: #4f46e5; top: -180px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #0891b2; bottom: -200px; right: -100px; animation-delay: -6s; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
@keyframes float { to { transform: translate(60px, 40px) scale(1.1); } }

.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-stats { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); margin: 2.75rem 0 0; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dd { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; }
.hero-stats dt { font-size: .85rem; color: #94a0bf; max-width: 10rem; line-height: 1.35; margin-top: .3rem; }

/* Carousel ------------------------------------------------------------ */
.carousel { position: relative; }
.carousel-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #11182e; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
  transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
  transition: transform .8s var(--ease);
}
.carousel:hover .carousel-frame { transform: perspective(1600px) rotateY(0) rotateX(0); }
.browser-bar {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  background: #1a2240; border-bottom: 1px solid rgba(255,255,255,.06);
}
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.browser-bar span:nth-child(2) { background: #febc2e; }
.browser-bar span:nth-child(3) { background: #28c840; }
.browser-bar em {
  flex: 1; margin-left: 12px; max-width: 60%; font-style: normal; font-size: .75rem; color: #9aa6c6;
  background: rgba(255,255,255,.06); border-radius: 6px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carousel-track { position: relative; aspect-ratio: 16 / 10; }
.carousel-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
.carousel-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.04); transition: transform 6s linear; }
.carousel-slide.is-active img { transform: scale(1); }
.carousel-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3.5rem 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: .2rem;
  background: linear-gradient(to top, rgba(8,12,26,.95), rgba(8,12,26,.6) 55%, transparent);
  color: #dfe5f6; font-size: .95rem;
}
.carousel-slide figcaption strong { font-size: 1.3rem; color: #fff; letter-spacing: -.01em; }
.carousel-slide figcaption .chip { align-self: flex-start; margin-bottom: .35rem; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 1.4rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #dbe3ff; cursor: pointer;
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .i-play { display: none; fill: currentColor; }
.icon-btn[aria-pressed="true"] .i-play { display: block; }
.icon-btn[aria-pressed="true"] .i-pause { display: none; }
.carousel-dots { display: flex; gap: .45rem; padding: 0 .5rem; }
.dot { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.28); cursor: pointer; transition: width .35s var(--ease), background .3s; }
.dot.is-active { width: 28px; background: linear-gradient(90deg, #7c8dff, #22d3ee); }

/* Chips & tags -------------------------------------------------------- */
.chip {
  display: inline-flex; align-self: flex-start; align-items: center; gap: .45rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 99px;
  color: var(--accent, var(--brand)); background: color-mix(in srgb, var(--accent, var(--brand)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 28%, transparent);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--brand)); }
.hero .chip { color: #fff; background: color-mix(in srgb, var(--accent) 45%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.1rem 0 1.4rem; }
.tags li { font-size: .8rem; padding: .28rem .7rem; border-radius: 8px; background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }

/* Sections ------------------------------------------------------------ */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section.legal { padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 3.5rem)); }
.legal h2 { font-size: 1.35rem; margin: 1.75rem 0 .4rem; }
.section-head { max-width: 46rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head .muted { font-size: 1.1rem; }

.about { background: var(--bg-alt); }
.about-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-copy { font-size: 1.15rem; color: var(--text-soft); }
.about-copy p:first-child { font-size: 1.3rem; color: var(--text); line-height: 1.55; font-weight: 500; }

.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.service-card {
  position: relative; padding: 1.9rem 1.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  overflow: hidden;
}
.service-card::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand-grad);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.service-card:hover::after { transform: scaleX(1); }
.service-card h3 { font-size: 1.2rem; margin: 1.2rem 0 .5rem; }
.service-card p { color: var(--text-soft); font-size: .975rem; margin: 0; }
.service-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand-2) 18%, transparent));
  color: var(--brand);
}
.service-icon svg { width: 26px; height: 26px; }

/* Showcase: featured alternating rows -------------------------------- */
.showcase { background: var(--bg); }
.feature-list { display: grid; gap: clamp(4rem, 9vw, 7rem); }
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature.is-flipped .feature-media { order: 2; }
.feature-media { position: relative; padding: 0 0 2.5rem 0; }
.feature.is-flipped .feature-media { padding: 0 0 2.5rem 0; }
.feature-media::before {
  content: ""; position: absolute; inset: 8% -4% -2% 6%; z-index: -1; border-radius: 32px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
  filter: blur(30px); opacity: .8;
}
.device-desktop {
  border-radius: 14px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  transition: transform .6s var(--ease);
}
.device-desktop img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: top; }
.device-phone {
  position: absolute; right: -2%; bottom: 0; width: 25%; min-width: 110px;
  border-radius: 22px; padding: 6px; background: #0d1222;
  box-shadow: 0 25px 50px -15px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .6s var(--ease);
}
.feature.is-flipped .device-phone { right: auto; left: -2%; }
.device-phone img { border-radius: 17px; aspect-ratio: 390 / 760; object-fit: cover; object-position: top; width: 100%; }
.feature:hover .device-desktop { transform: translateY(-6px); }
.feature:hover .device-phone { transform: translateY(-14px) rotate(-2deg); }
.feature.is-flipped:hover .device-phone { transform: translateY(-14px) rotate(2deg); }
.feature-copy h3 { font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.4rem); margin: 1rem 0 .4rem; }
.feature-summary { font-size: 1.15rem; font-weight: 550; color: var(--text); }
.feature-copy p { color: var(--text-soft); }
.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none;
  color: var(--accent, var(--brand));
}
.link-arrow svg { transition: transform .3s var(--ease); }
.link-arrow:hover svg, .site-card:hover .link-arrow svg { transform: translate(3px, -3px); }

/* Showcase: card grid ------------------------------------------------- */
.subhead { text-align: center; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin: clamp(5rem, 10vw, 8rem) 0 2.25rem; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
/* Three remaining cards sit in one row on a wide screen, instead of two plus a gap. */
@media (min-width: 960px) {
  .card-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.site-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.site-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.site-card-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.site-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--accent) 30%, transparent), transparent 50%); opacity: 0; transition: opacity .4s; }
.site-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.site-card:hover .site-card-media img { transform: scale(1.06); }
.site-card:hover .site-card-media::after { opacity: 1; }
.site-card-body { padding: 1.5rem 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.site-card-body h4 { font-size: 1.4rem; margin: .85rem 0 .5rem; }
.site-card-body h4 a { color: var(--text); text-decoration: none; }
.site-card-body p { color: var(--text-soft); font-size: .985rem; margin: 0; }
.site-card-body .tags { margin-bottom: 1.1rem; }
.site-card-body .link-arrow { margin-top: auto; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Contact ------------------------------------------------------------- */
.contact { background: var(--bg-alt); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; width: 600px; height: 600px; right: -200px; top: -150px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 16%, transparent), transparent 65%);
  pointer-events: none;
}
.contact-inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.contact-copy > p { color: var(--text-soft); font-size: 1.1rem; }
.contact-points { display: grid; gap: .8rem; margin-top: 1.75rem; }
.contact-points li { display: flex; align-items: center; gap: .75rem; color: var(--text-soft); }
.contact-points span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-size: .8rem; font-weight: 800; }
.form-card {
  padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 24px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.field label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 12px; padding: .8rem 1rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.field .input-validation-error, .field [aria-invalid="true"] { border-color: #e5484d; }
.field-error { color: #e5484d; font-size: .85rem; margin-top: .35rem; min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { text-align: center; margin: 1rem 0 0; }
.form-success { text-align: center; padding: 2.5rem 1rem; animation: pop .5s var(--ease); }
.form-success svg { width: 64px; height: 64px; color: #22c55e; stroke-width: 1.6; margin-bottom: 1rem; }
.form-success:focus { outline: none; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
[hidden] { display: none !important; }

/* Footer -------------------------------------------------------------- */
.site-footer { background: var(--hero-bg); color: #c3cbe2; padding: 3.5rem 0 2.5rem; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem 3rem; align-items: start; }
.site-footer .brand { color: #fff; margin-bottom: .75rem; }
.site-footer .muted { color: #8792b0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem 1.5rem; }
.footer-links a { color: #c3cbe2; text-decoration: none; font-size: .95rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.site-footer .small { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; margin: 0; }
.site-footer .small a { color: #c3cbe2; }
.site-footer .small a:hover { color: #fff; }

/* Reveal on scroll ---------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.card-grid .reveal:nth-child(2n) { transition-delay: .1s; }
.service-grid .reveal:nth-child(2) { transition-delay: .08s; }
.service-grid .reveal:nth-child(3) { transition-delay: .16s; }
.service-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-inner, .about-inner, .contact-inner, .feature { grid-template-columns: 1fr; }
  .feature.is-flipped .feature-media { order: 0; }
  .carousel-frame { transform: none; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero .eyebrow::before { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .card-grid, .service-grid, .field-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem; }
  .hero-stats dt { font-size: .75rem; }
  .device-phone { width: 30%; min-width: 0; border-radius: 16px; padding: 4px; right: -1%; }
  .device-phone img { border-radius: 12px; }
  .feature-media { padding-bottom: 1.75rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .carousel-slide figcaption { padding: 2.5rem 1rem .9rem; font-size: .85rem; }
  .carousel-slide figcaption strong { font-size: 1.1rem; }
  .carousel-slide figcaption > span:last-child { display: none; }
  .carousel-slide figcaption .chip { font-size: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
