:root {
  color-scheme: light;
  --ink: #0f1218;
  --slate: #2f3745;
  --mist: #e9f0f8;
  --ivory: #fbf7f2;
  --warm: #ffb774;
  --glow: #86c9ff;
  --accent: #2f62ff;
  --accent-strong: #1737a6;
  --card: rgba(255, 255, 255, 0.78);
  --shadow: 0 26px 70px rgba(13, 24, 38, 0.18);
  --radius: 24px;
  --focus: 0 0 0 3px rgba(47, 98, 255, 0.2);
  --stroke: rgba(15, 18, 24, 0.12);
}

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

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #fbf4ea 0%, rgba(251, 244, 234, 0.2) 38%, transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(134, 201, 255, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(255, 183, 116, 0.25) 0%, transparent 45%),
    linear-gradient(160deg, #eef2f8 0%, #dde7f5 55%, #eef0f6 100%);
  min-height: 100vh;
  overflow-y: auto;
  line-height: 1.6;
}

.page {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.3;
  z-index: 0;
}

.page::before {
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, var(--glow), transparent 70%);
}

.page::after {
  bottom: -140px;
  left: -120px;
  background: radial-gradient(circle, var(--warm), transparent 70%);
}

.hero,
.expertise,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  gap: 1rem;
  max-width: none;
  position: relative;
  padding-right: clamp(0rem, 8vw, 8rem);
  animation: float-in 600ms ease both;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  grid-template-rows: auto auto auto auto;
}

.hero > *:not(.hero-portrait) {
  grid-column: 1;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  line-height: 1.1;
}

h1 .accent {
  color: var(--accent);
  text-shadow: 0 6px 20px rgba(42, 93, 255, 0.2);
}

.rotating {
  display: inline-block;
  transition: opacity 0.35s ease, transform 0.35s ease;
  will-change: opacity, transform;
}

.rotating.swap {
  opacity: 0;
  transform: translateY(6px);
}

.lede {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 620px;
}

.cta-row,
.footer-actions,
.overlay-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.cta {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 32px rgba(47, 98, 255, 0.26);
}

.cta.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.cta:hover {
  transform: translateY(-1px);
}

.cta:focus-visible,
.chip:focus-visible,
.pill:focus-visible,
.close-x:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.hero-portrait {
  position: static;
  width: clamp(120px, 18vw, 200px);
  height: clamp(120px, 18vw, 200px);
  border-radius: 24px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 40px rgba(16, 28, 44, 0.18);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  justify-self: end;
  grid-row: 2 / 4;
  align-self: center;
  grid-column: 2;
}

.cta-row {
  grid-column: 2;
  justify-self: end;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.expertise {
  display: grid;
  grid-template-columns: minmax(230px, 28%) 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.expertise-nav {
  display: grid;
  gap: 0.65rem;
}

.chip {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  box-shadow: 0 12px 30px rgba(18, 20, 24, 0.22);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 1.5rem;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: float-in 700ms ease 120ms both;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-header h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.panel-header p {
  color: var(--slate);
  max-width: 480px;
}

.panel-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-self: start;
}

.panel-tags span {
  background: rgba(42, 93, 255, 0.12);
  color: var(--accent-strong);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.panel-body {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr);
  gap: 1.5rem;
}

.signal {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  color: var(--ink);
}

.signal li {
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.98rem;
}

.signal li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.5rem;
}

.panel-metrics {
  display: grid;
  gap: 1rem;
}

.metric {
  font-weight: 700;
  font-size: 1.2rem;
}

.metric-label {
  color: var(--slate);
  font-size: 0.9rem;
}

.panel-footer {
  border-top: 1px solid rgba(18, 20, 24, 0.1);
  padding-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--slate);
}

.panel-footer span {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--slate);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.footer-left {
  display: grid;
  gap: 0.4rem;
}

.footer-contact {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 600;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 24, 0.45);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 2rem;
  z-index: 20;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  background: white;
  padding: 2rem;
  border-radius: 18px;
  max-width: 460px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  position: relative;
  z-index: 21;
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow: auto;
  animation: float-in 400ms ease both;
}

.overlay-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.close-x {
  border: none;
  background: rgba(18, 20, 24, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.overlay-form {
  display: grid;
  gap: 1rem;
}

.progress {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.progress-label {
  font-weight: 600;
  color: var(--ink);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(18, 20, 24, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 33%;
  background: linear-gradient(120deg, var(--accent), var(--glow));
  border-radius: 999px;
  transition: width 0.2s ease;
}

.step {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--slate);
  background: rgba(251, 247, 242, 0.75);
  padding: 0.8rem 1rem;
  border-radius: 16px;
}

.field span {
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pill-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--stroke);
  background: rgba(42, 93, 255, 0.08);
  color: var(--accent-strong);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.form-note {
  font-size: 0.8rem;
  color: var(--slate);
}

.overlay-success {
  display: grid;
  gap: 0.8rem;
}

@media (max-width: 960px) {
  .page {
    height: auto;
    min-height: 100vh;
    max-width: 100%;
  }

  .expertise {
    grid-template-columns: 1fr;
  }

  .panel-body {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-right: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-portrait {
    position: static;
    margin-top: 1rem;
    justify-self: start;
    grid-row: auto;
    align-self: start;
    grid-column: auto;
  }

  .cta-row {
    grid-column: auto;
    justify-self: start;
  }
}

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

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .hero {
    gap: 0.8rem;
  }

  .cta {
    width: 100%;
    justify-content: center;
  }

  .cta-row,
  .footer-actions {
    flex-direction: column;
  }

  .panel {
    padding: 1.5rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
