@import url("./tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgb(0 51 102 / 0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgb(197 160 89 / 0.12), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--color-bg) 40%, #f3f6fa 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-accent-hover);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-5);
  color: var(--color-primary-deep);
}

h1 {
  font-size: var(--text-hero);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

p {
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - (2 * var(--container-pad)), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - (2 * var(--container-pad)), var(--container-narrow));
}

/* -- Header / Nav -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgb(250 251 252 / 0.72);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  background: rgb(255 255 255 / 0.86);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: min(100% - (2 * var(--container-pad)), var(--container));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-primary-deep);
  min-width: 0;
}

.brand__mark {
  width: auto;
  height: 2rem;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .brand__mark {
    height: 1.5rem;
  }

  .brand__role {
    display: none;
  }
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-heading);
  font-weight: 650;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__role {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--color-primary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__phone {
  display: none;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--color-primary);
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: inherit;
}

.nav-toggle__bar::before {
  top: -6px;
}

.nav-toggle__bar::after {
  top: 6px;
}

.nav__panel {
  display: none;
  position: absolute;
  inset: var(--header-h) 0 auto;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.nav__panel.is-open {
  display: block;
}

.nav__panel ul {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.nav__panel a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }

  .nav__phone {
    display: inline;
  }

  .nav-toggle,
  .nav__panel {
    display: none !important;
  }

  .brand__name {
    font-size: var(--text-base);
  }
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary-deep);
  box-shadow: 0 8px 20px rgb(197 160 89 / 0.28);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-primary-deep);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 0.55);
}

.btn--secondary:hover {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--block {
  width: 100%;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* -- Hero -- */
.hero {
  position: relative;
  min-height: min(88vh, 46rem);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img,
.hero__media .hero__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__fallback {
  background:
    linear-gradient(135deg, #001a33 0%, #003366 45%, #0a4a7a 70%, #1a3a52 100%),
    radial-gradient(circle at 70% 30%, rgb(197 160 89 / 0.25), transparent 45%);
}

.hero__media img {
  animation: heroKen 28s ease-in-out infinite alternate;
}

@keyframes heroKen {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(0 20 40 / 0.35) 0%, rgb(0 31 61 / 0.72) 55%, rgb(0 20 40 / 0.92) 100%),
    linear-gradient(90deg, rgb(0 31 61 / 0.55) 0%, transparent 70%);
}

.hero__content {
  padding: clamp(5rem, 10vh, 7rem) 0 clamp(3.5rem, 7vh, 5.5rem);
  width: min(100% - (2 * var(--container-pad)), var(--container));
  margin-inline: auto;
}

.hero__brand {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2vw + 0.75rem, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-6);
  color: #fff;
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

.hero h1 {
  color: #fff;
  max-width: 16ch;
  margin-bottom: var(--space-6);
}

.hero__lead {
  max-width: 38ch;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: rgb(255 255 255 / 0.88);
  margin-bottom: var(--space-10);
}

.hero__enter > * {
  opacity: 0;
  transform: translateY(1.25rem);
  animation: riseIn 0.8s var(--ease-out) forwards;
}

.hero__enter > *:nth-child(1) {
  animation-delay: 0.1s;
}

.hero__enter > *:nth-child(2) {
  animation-delay: 0.25s;
}

.hero__enter > *:nth-child(3) {
  animation-delay: 0.4s;
}

.hero__enter > *:nth-child(4) {
  animation-delay: 0.55s;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img {
    animation: none;
  }

  .hero__enter > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* -- Sections -- */
.section {
  padding: var(--section-y) 0;
}

.section--tight {
  padding: var(--section-y-tight) 0;
}

.section--soft {
  background: var(--color-bg-soft);
}

.section--primary {
  background: linear-gradient(160deg, var(--color-primary-deep), var(--color-primary));
  color: #fff;
}

.section--primary h2,
.section--primary h3 {
  color: #fff;
}

.section--primary p {
  color: rgb(255 255 255 / 0.85);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(2.75rem, 5vw, 4.25rem);
}

.section__head--center {
  text-align: center;
  margin-inline: auto;
}

.section__head h2 {
  margin-bottom: var(--space-5);
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  max-width: 42rem;
}

/* -- Trust strip -- */
.trust {
  padding: var(--space-8) 0;
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
}

.trust__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5) var(--space-10);
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust__list li {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

/* -- Pillars / grids -- */
.grid-3 {
  display: grid;
  gap: var(--stack-gap);
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    column-gap: clamp(2.25rem, 4vw, 3.5rem);
    row-gap: clamp(3rem, 5vw, 4.5rem);
  }
}

.grid-2 {
  display: grid;
  gap: var(--stack-gap);
}

@media (min-width: 800px) {
  .grid-2 {
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2.5rem, 4.5vw, 4rem);
    align-items: start;
  }

  .grid-2--flip > :first-child {
    order: 2;
  }
}

.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out);
}

.pillar:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgb(0 51 102 / 0.18);
}

.pillar__index {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.pillar h3,
.pillar h2 {
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  min-height: calc(2 * var(--leading-tight) * 1em);
}

.pillar p {
  margin-bottom: var(--space-5);
  flex: 1 1 auto;
}

.pillar__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-2);
  min-height: calc(2 * 1.5em + var(--space-3));
}

.pillar__link {
  font-weight: 600;
  text-decoration: none;
  line-height: 1.5;
}

.pillar > .pillar__link {
  margin-top: auto;
  padding-top: var(--space-2);
}

.pillar__link::after {
  content: " →";
}

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(3.5rem, 6vw, 6rem);
    align-items: center;
  }
}

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(145deg, var(--color-primary), #0b4f82);
  box-shadow: var(--shadow-lg);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.portrait--sm {
  max-width: 14rem;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-2);
}

.portrait__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: rgb(255 255 255 / 0.9);
  text-align: center;
  padding: var(--space-8);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

.check-list li {
  position: relative;
  padding-left: 1.85rem;
  color: var(--color-text);
  line-height: var(--leading-snug);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.steps {
  display: grid;
  gap: var(--space-8);
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.75rem, 3vw, 2.75rem);
  }
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 650;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.step h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.step p {
  margin-bottom: 0;
}

/* -- FAQ -- */
.faq {
  display: grid;
  gap: 0;
}

.faq details {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-5) 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary-deep);
  list-style: none;
  line-height: var(--leading-snug);
  padding-right: var(--space-8);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  margin-right: calc(-1 * var(--space-8));
  color: var(--color-accent);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

/* -- Forms -- */
.form {
  display: grid;
  gap: var(--space-5);
  background: var(--color-surface);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.form > h2 {
  margin-bottom: 0;
}

.form > p {
  margin-top: calc(-1 * var(--space-2));
}

.form__row {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--color-text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgb(37 99 235 / 0.25);
  border-color: var(--color-focus);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--color-error);
}

.field__error {
  display: none;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-error);
}

.field--error .field__error {
  display: block;
}

.checkbox {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.checkbox input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form__status {
  font-size: var(--text-sm);
  min-height: 1.25rem;
}

.form__status[data-state="error"] {
  color: var(--color-error);
}

.form__status[data-state="ok"] {
  color: var(--color-success);
}

.contact-aside {
  display: grid;
  gap: var(--space-5);
}

.contact-aside h2 {
  margin-bottom: var(--space-2);
}

.contact-aside a {
  font-weight: 600;
  text-decoration: none;
}

/* -- CTA band -- */
.cta-band {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
}

.cta-band .lead {
  margin-inline: auto;
}

.cta-band .btn-group {
  justify-content: center;
  margin-top: var(--space-8);
}

/* -- Footer -- */
.site-footer {
  background: var(--color-primary-deep);
  color: rgb(255 255 255 / 0.78);
  padding: var(--space-20) 0 var(--space-12);
  margin-top: 0;
}

.site-footer a {
  color: #fff;
}

.footer__grid {
  display: grid;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-12);
  }
}

.site-footer h2 {
  color: #fff;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.site-footer p,
.site-footer li {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 0.72);
  line-height: var(--leading-snug);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.footer__brand-copy {
  margin-top: var(--space-5);
}

.footer__legal {
  border-top: 1px solid rgb(255 255 255 / 0.12);
  padding-top: var(--space-8);
  display: grid;
  gap: var(--space-4);
}

.footer__legal p {
  font-size: var(--text-xs);
  line-height: 1.5;
  margin: 0;
}

.ia-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 650;
  color: #fff;
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border-radius: var(--radius-md);
}

.ia-lockup img {
  height: 2rem;
  width: auto;
}

/* -- Reveal -- */
[data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -- Page utilities -- */
.page-hero {
  padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(2.75rem, 4vw, 3.75rem);
  background:
    linear-gradient(180deg, var(--color-primary-soft), transparent);
}

.page-hero h1 {
  max-width: 18ch;
  margin-bottom: var(--space-5);
}

.page-hero .lead {
  margin-top: var(--space-2);
}

.prose {
  max-width: 48rem;
}

.prose h2 {
  margin-top: var(--space-12);
}

.prose h2:first-child {
  margin-top: 0;
}

.tools {
  display: grid;
  gap: 0;
}

@media (min-width: 700px) {
  .tools {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--space-10);
  }
}

.tool-link {
  display: block;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-primary-deep);
  font-weight: 600;
}

.tool-link span {
  display: block;
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  line-height: var(--leading-snug);
}

.merci {
  min-height: 60vh;
  display: grid;
  align-content: center;
  text-align: center;
  padding: var(--space-24) 0;
}

.sticky-cta {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 90;
  display: none;
}

@media (min-width: 768px) {
  .landing .sticky-cta {
    display: inline-flex;
  }
}

.divider-accent {
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  margin: var(--space-5) 0 var(--space-8);
  border: 0;
}

.stat-line {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  font-weight: 650;
  line-height: var(--leading-snug);
  margin: var(--space-6) 0;
}

.stack-actions {
  margin-top: var(--space-8);
}
