/* ============================================================
   FrontDoor Systems — Homepage
   Mobile-first. 8px spacing base. Inter. Reserved accent.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:           #FAFAF8;
  --surface:      #F5F5F3;
  --text:         #111827;
  --slate:        #334155;
  --slate-dark:   #1E293B;
  --slate-300:    #94A3B8;
  --border:       #E5E5E2;
  --accent:       #3B82F6;
  --accent-hover: #2563EB;

  --container-max: 1200px;
  --container-pad: 24px;

  --radius-sm: 6px;
  --radius-md: 8px;

  --nav-h: 72px;

  --t-xs:   14px;
  --t-sm:   16px;
  --t-base: 18px;
  --t-lg:   20px;
  --t-xl:   24px;
  --t-2xl:  32px;
  --t-3xl:  44px;
  --t-hero: clamp(40px, 7vw, 64px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

ul { margin: 0; padding: 0; list-style: none; }

p { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--slate-dark);
  font-weight: 600;
  letter-spacing: -0.01em;
}

button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

section { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: 56px 0;
}

.section--surface { background: var(--surface); }

.section__title {
  font-size: clamp(28px, 4.4vw, var(--t-3xl));
  line-height: 1.15;
  max-width: 22ch;
}

.section__intro {
  margin-top: 20px;
  max-width: 60ch;
  font-size: var(--t-base);
  color: var(--slate);
  line-height: 1.55;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  margin: 0 0 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: var(--t-sm);
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.btn--primary,
.btn--accent {
  background: var(--accent);
  color: #fff;
}

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

.btn--primary:active,
.btn--accent:active {
  transform: translateY(1px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--slate-dark);
}

.nav__logo-mark {
  height: 36px;
  width: auto;
  display: block;
}

.nav__links {
  display: none;
  gap: 32px;
  font-size: var(--t-sm);
  color: var(--slate);
}

.nav__links a {
  position: relative;
  padding: 4px 0;
}

.nav__links a:hover { color: var(--slate-dark); }

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease);
}

.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta { display: none; }

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
}

.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--slate-dark);
  border-radius: 1px;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__sheet {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  z-index: 999;
  background: var(--bg);
  padding: 32px var(--container-pad) 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.nav__sheet[hidden] { display: none; }

.nav__sheet-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.nav__sheet-links a {
  display: block;
  padding: 16px 0;
  font-size: var(--t-xl);
  color: var(--slate-dark);
  border-bottom: 1px solid var(--border);
}

.nav__sheet-cta {
  width: 100%;
  margin-top: 24px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}

.hero__inner {
  max-width: 760px;
}

.hero__title {
  font-size: var(--t-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero__lede {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--slate);
  max-width: 60ch;
}

.hero__lede + .hero__lede {
  margin-top: 20px;
}

.hero__cta {
  margin-top: 28px;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 56px;
}

.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

/* ---------- Card (Problem) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.section--surface .card {
  background: var(--bg);
}

.card__title {
  font-size: var(--t-lg);
  line-height: 1.3;
  margin-bottom: 10px;
}

.card__body {
  font-size: var(--t-sm);
  color: var(--slate);
  line-height: 1.55;
}

/* ---------- Service tile ---------- */
.service {
  padding: 8px 0 0;
}

.service__icon {
  width: 32px;
  height: 32px;
  color: var(--slate-dark);
  margin-bottom: 20px;
}

.service__title {
  font-size: var(--t-lg);
  line-height: 1.3;
}

/* ---------- Steps (Process) ---------- */
.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.step__number {
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  color: var(--slate-dark);
  letter-spacing: -0.04em;
}

.step__content { padding-top: 4px; }

.step__title {
  font-size: var(--t-xl);
  margin-bottom: 8px;
}

.step__body {
  color: var(--slate);
  font-size: var(--t-base);
  max-width: 60ch;
}

/* ---------- Who We Work With (Fit) ---------- */
.fit {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.fit__col {}

.fit__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  font-weight: 500;
  margin-bottom: 20px;
}

.fit__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: var(--t-base);
  color: var(--slate-dark);
}

.fit__list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fit__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  color: var(--slate-dark);
}

.fit__mark--yes { background: #E2E8F0; }
.fit__mark--no  { background: #E5E5E2; }
.fit__mark svg { width: 14px; height: 14px; }

.fit__divider {
  height: 1px;
  background: var(--border);
}

/* ---------- What We Look For (Approach) ---------- */
.approach {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 40px;
  column-gap: 64px;
}

.approach__title {
  font-size: var(--t-xl);
  line-height: 1.3;
  margin-bottom: 12px;
}

.approach__body {
  color: var(--slate);
  max-width: 50ch;
  font-size: var(--t-base);
  line-height: 1.55;
}

/* ---------- Final CTA ---------- */
.cta {
  background: var(--slate-dark);
  padding: 80px 0;
  color: #fff;
}

.cta__inner {
  max-width: 720px;
  text-align: center;
}

.cta__copy {
  font-size: clamp(22px, 3.2vw, var(--t-2xl));
  line-height: 1.3;
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cta__button {
  margin-top: 40px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--slate-dark);
  color: #E2E8F0;
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.footer__logo-mark {
  height: 40px;
  width: auto;
  display: block;
}

.footer__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-300);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--t-sm);
}

.footer__nav a:hover { color: #fff; }

.footer__email {
  color: #fff;
  font-size: var(--t-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
}

.footer__email:hover { border-bottom-color: #fff; }

.footer__base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__copy {
  color: var(--slate-300);
  font-size: var(--t-xs);
}

/* ============================================================
   Breakpoints
   ============================================================ */

/* ---------- ≥ 640px: tablet portrait ---------- */
@media (min-width: 640px) {
  :root { --container-pad: 32px; }

  .section { padding: 68px 0; }

  .hero { padding: 88px 0 64px; }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }

  .step {
    grid-template-columns: 72px 1fr;
    gap: 20px;
    align-items: baseline;
  }

  .step__number { font-size: 60px; }
  .step__title { font-size: 26px; }

  .fit {
    grid-template-columns: 1fr 1px 1fr;
    column-gap: 48px;
  }

  .fit__divider {
    height: auto;
    width: 1px;
  }

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

/* ---------- ≥ 900px: small desktop ---------- */
@media (min-width: 900px) {
  .nav__links { display: inline-flex; }
  .nav__cta   { display: inline-flex; }
  .nav__toggle { display: none; }
  .nav__sheet  { display: none !important; }

  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- ≥ 1100px: full desktop ---------- */
@media (min-width: 1100px) {
  .section { padding: 104px 0; }
  .hero { padding: 96px 0 64px; }
  .cta { padding: 104px 0; }
  .footer { padding: 80px 0 40px; }

  .footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 64px;
  }

  .step__number { font-size: 64px; }
  .step { gap: 28px; }
  .step__title { font-size: 28px; }

  .fit { column-gap: 80px; }

  .approach {
    column-gap: 96px;
    row-gap: 56px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
