/* Planform Consulting — one-page site
   Palette: paper #F3F4F6, ink #15181E, accent #2B4C7E
   Type: Geist (body/headings), Instrument Sans (labels)
*/

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3F4F6;
  --paper-deep: #E6E8ED;
  --white: #FFFFFF;
  --ink: #15181E;
  --ink-soft: #4A5060;
  --accent: #2B4C7E;
  --accent-hover: #1E3862;
  --line: rgba(21, 24, 30, 0.12);
  --line-strong: rgba(21, 24, 30, 0.2);
  --header-h: 4.5rem;
  --wrap: 70rem;
  --gutter: 1.5rem;
  --radius: 8px;
  --font: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-label: "Instrument Sans", "Geist", system-ui, sans-serif;
  --shadow: none;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection { background: var(--accent); color: var(--white); }

.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: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(243, 244, 246, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  line-height: 0;
}
.logo:hover { color: inherit; }
.logo-mark {
  display: block;
  height: 2.45rem;
  width: 2.45rem;
}
.logo-type {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  line-height: 1;
  padding-top: 0.05rem;
}
.logo-word {
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.38rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo-sub {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.logo-on-dark .logo-word { color: var(--paper); }
.logo-on-dark .logo-sub { color: #9BB4D4; }

.nav-toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: currentColor;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
}
.nav-toggle-bars::before { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle-bars::after { transform: translate(-50%, calc(-50% + 6px)); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav .btn { color: var(--white); }
.site-nav .btn:hover { color: var(--white); }

/* ---------- Buttons & type ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--white); }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.9rem; }

.text-link {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1em;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

.eyebrow,
.title-block-label,
.step-num,
.area-code,
.hero-meta dt,
.title-block dt,
.form-fallback {
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.72rem;
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
h1 {
  font-size: clamp(1.85rem, 1.05rem + 3.3vw, 4.05rem);
  letter-spacing: -0.035em;
  font-weight: 500;
}
h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.02em; }

.lede {
  max-width: 38rem;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--ink-soft);
  margin: 1.25rem 0 0;
}

.section-head { max-width: 38rem; margin-bottom: 2.75rem; }
.section-lead {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 4.25rem 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(43, 76, 126, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 76, 126, 0.09) 1px, transparent 1px),
    linear-gradient(to right, rgba(21, 24, 30, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 24, 30, 0.045) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.35) 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.35) 70%, transparent);
  pointer-events: none;
}
.hero-inner { padding-bottom: 0; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin: 2rem 0 0;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 4.5rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line-strong);
}
.hero-meta div { min-width: 0; }
.hero-meta dt {
  font-size: 0.68rem;
  color: var(--accent);
  margin: 0 0 0.3rem;
}
.hero-meta dd {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.45rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card p { margin: 0; color: var(--ink-soft); }
.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.card-icon svg { width: 100%; height: 100%; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  counter-reset: none;
  position: relative;
}
.step { min-width: 0; }
.step-num {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.step-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.step h3 { margin-bottom: 0.55rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- Why ---------- */
.why-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-strong);
}
.why-grid li {
  padding: 1.75rem 1.75rem 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.why-grid li:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.why-grid li:nth-child(even) { padding-left: 2rem; }
.why-grid h3 { margin-bottom: 0.5rem; }
.why-grid p { margin: 0; color: var(--ink-soft); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: start;
}
.about-copy p { color: var(--ink-soft); }
.about-copy p:first-of-type { color: var(--ink); } /* first body after h2 stays readable; actually both can be soft after lead */
.about-copy h2 + p { color: var(--ink-soft); }

.title-block {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 1.4rem 1.4rem 0.5rem;
}
.title-block-label {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.7rem;
  color: var(--accent);
}
.title-block dl { margin: 0; }
.title-block dl > div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.title-block dl > div:last-child { border-bottom: 0; }
.title-block dt {
  font-size: 0.66rem;
  color: var(--accent);
  margin: 0 0 0.25rem;
}
.title-block dd {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- Area ---------- */
.area-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.area-grid li {
  border: 1px solid var(--line-strong);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.area-code {
  margin: 0;
  font-size: 0.7rem;
  color: var(--accent);
}
.area-grid h3 {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem);
  margin-top: 1.5rem;
}

/* ---------- Contact ---------- */
.section-contact {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-bottom: 5.5rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-copy p { color: var(--ink-soft); }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.4rem;
  display: grid;
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field label {
  font-weight: 500;
  font-size: 0.92rem;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(21, 24, 30, 0.4); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field input::placeholder,
.field textarea::placeholder { color: #7A8090; }
.contact-form .btn { justify-self: start; margin-top: 0.25rem; }
.form-fallback {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--font);
  font-weight: 400;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C8CBD2;
  padding: 3.5rem 0 2.25rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  align-items: flex-start;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(243, 244, 246, 0.14);
  margin-bottom: 1.75rem;
}
.footer-email {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
}
.footer-email:hover { color: #9BB0D0; }
.footer-brand p {
  margin: 1rem 0 0;
  max-width: 22rem;
  color: #C8CBD2;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.5rem;
  justify-content: flex-end;
}
.footer-nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.footer-nav a:hover { color: #9BB0D0; }
.footer-legal {
  max-width: 48rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #B3B7C0;
}
.footer-legal p { margin: 0 0 0.7rem; }
.copyright { color: #C8CBD2; margin-bottom: 0 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --gutter: 1.25rem; }
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem var(--gutter) 2rem;
    z-index: 2;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
  }
  .site-nav.is-open { display: flex; }
  body.nav-open { overflow: hidden; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav ul a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav .btn { margin-top: 1rem; width: 100%; }

  .card-grid,
  .steps,
  .area-grid,
  .about-grid,
  .contact-grid,
  .why-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .hero { padding-top: 3rem; }
  .hero-meta {
    margin-top: 2.75rem;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-meta dd { font-size: 0.92rem; line-height: 1.35; }
  .section { padding: 3.5rem 0; }
  .section-contact { padding-bottom: 3.75rem; }
  .area-grid li { min-height: 0; padding: 1.15rem 1.2rem 1.15rem; }
  .area-grid h3 { margin-top: 1.1rem; }

  .why-grid li,
  .why-grid li:nth-child(odd),
  .why-grid li:nth-child(even) {
    padding: 1.4rem 0;
    border-right: 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.75rem;
  }
  .footer-nav { justify-content: flex-start; max-width: none; }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .card-grid { gap: 1rem; }
  .about-grid, .contact-grid { gap: 2rem; }
  .site-nav { gap: 1.1rem; }
  .site-nav ul { gap: 0.2rem 1.1rem; }
}

@media (max-width: 400px) {
  h1 { max-width: none; }
}

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