/* ============================================================
   KALMAN AERO — styles.css
   ============================================================ */

:root {
  --paper: #F7F7F4;
  --bond: #FFFFFF;
  --graphite: #0E1116;
  --slate: #4A5159;
  --graticule: #D9D6CE;
  --instrument: #0B5FA5;
  --amber: #C77D1C;

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max-width: 1100px;
  --section-v-desktop: 96px;
  --section-v-mobile: 64px;
  --nav-height: 72px;
  --radius-sm: 4px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--graphite);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: 0.01em;
  color: var(--graphite);
}

p { color: var(--slate); line-height: 1.7; }

a { color: var(--instrument); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  border: 1px solid var(--graticule);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bond);
  color: var(--graphite);
  white-space: nowrap;
}

ul {
  padding-left: 1.2rem;
}

ul li {
  color: var(--slate);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s ease;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--instrument);
  color: var(--bond);
}

.btn-primary:hover {
  opacity: 0.88;
  text-decoration: none;
}

.btn-text {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--instrument);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 14px 0;
}

.btn-text:hover { text-decoration: underline; }

.link-arrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--instrument);
  text-decoration: none;
  margin-top: 1.25rem;
}
.link-arrow:hover { text-decoration: underline; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--paper);
  border-bottom: 1px solid var(--graticule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  text-decoration: none;
  flex-shrink: 0;
}

.wordmark:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--graphite); text-decoration: none; }

.nav-links .btn-primary {
  font-size: 0.875rem;
  padding: 10px 20px;
  color: var(--bond);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--graphite);
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--graticule);
  padding: var(--section-v-desktop) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-figure {
  margin: 0;
  min-width: 0;
}

.hero-figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 480px;
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--graticule);
}

.cfr-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

.cfr-line code {
  font-size: 0.775rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1.5rem;
  color: var(--graphite);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--slate);
  max-width: 620px;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--section-v-desktop) 0;
  border-bottom: 1px solid var(--graticule);
}

.section-alt {
  background: var(--bond);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--graphite);
  margin-bottom: 1.5rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 760px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.services-footer {
  font-size: 0.9rem;
  color: var(--slate);
  max-width: 900px;
  margin: 2.5rem auto 0;
  text-align: center;
  line-height: 1.7;
  padding-top: 2rem;
  border-top: 1px solid var(--graticule);
}

.cfr-sep {
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  align-self: center;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bond);
  border: 1px solid var(--graticule);
  border-radius: var(--radius-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--graphite);
}

.card-price code,
.card-turnaround code {
  font-size: 0.85rem;
}

.card-price {
  color: var(--graphite);
}

.card-turnaround {
  color: var(--slate);
  font-size: 0.875rem;
}

.card ul {
  margin-top: 0.25rem;
}

/* ============================================================
   WHY
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
}

.why-block h4 {
  margin-bottom: 0.6rem;
}

/* ============================================================
   APPROACH
   ============================================================ */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
}

.approach-block h4 {
  margin-bottom: 0.6rem;
}

/* ============================================================
   PROCESS
   ============================================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--graticule);
  padding-top: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--graticule);
  line-height: 1;
  display: block;
}

.step h4 {
  margin-top: 0.25rem;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  border-top: 1px solid var(--graticule);
}

.faq-item {
  border-bottom: 1px solid var(--graticule);
}

.faq-item summary {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--graphite);
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

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

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--slate);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-body {
  padding-bottom: 1.5rem;
}

.faq-body p {
  font-size: 0.95rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: start;
}

.calendly-inline-widget {
  min-width: 320px;
  height: 720px;
  border: 1px solid var(--graticule);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper);
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--graticule);
  border-radius: var(--radius-sm);
}

.contact-form h4 {
  margin: 0 0 0.25rem 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--graphite);
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.02em;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--graphite);
  background: #FFFFFF;
  border: 1px solid var(--graticule);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--instrument-blue);
}

.contact-form textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--font-sans);
}

.contact-form .btn {
  align-self: flex-start;
  min-height: 44px;
}

.form-success,
.form-error {
  font-size: 0.875rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.form-success {
  color: #0E5C2F;
  background: #E8F4ED;
  border: 1px solid #B7DEC4;
}

.form-error {
  color: #8A1F1F;
  background: #FBEAEA;
  border: 1px solid #E5B8B8;
}

.form-error a {
  color: inherit;
  text-decoration: underline;
}

.info-block h4 {
  margin-bottom: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--graphite);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--bond);
}

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.875rem;
  color: #A8AEB6;
}

.footer-legal {
  font-size: 0.8rem;
  color: #8A919A;
  max-width: 680px;
  line-height: 1.65;
}

.footer-copy {
  font-size: 0.8rem;
  color: #8A919A;
}

.footer-copy a {
  color: #8A919A;
  text-decoration: underline;
}

.footer-copy a:hover {
  color: var(--bond);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --section-v-desktop: var(--section-v-mobile);
  }

  /* Nav collapses to hamburger */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--graticule);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 24px;
    min-height: 44px;
    border-bottom: 1px solid var(--graticule);
    font-size: 1rem;
    display: flex;
    align-items: center;
  }

  .nav-links .btn-primary {
    margin: 1rem 24px;
    width: calc(100% - 48px);
    text-align: center;
    justify-content: center;
    min-height: 44px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: sticky;
    overflow: visible;
  }

  .nav-inner {
    position: relative;
  }

  /* Hero stacks, figure hides */
  .hero {
    min-height: auto;
    padding: var(--section-v-mobile) 0;
    align-items: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-figure {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-ctas .btn-primary {
    text-align: center;
    justify-content: center;
    min-height: 44px;
  }

  .hero-ctas .btn-text {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  .hero-sub { font-size: 1rem; }

  /* Single-column grids */
  .services-grid,
  .why-grid,
  .approach-grid,
  .process-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .step-num {
    font-size: 1.75rem;
  }

  .calendly-inline-widget {
    height: 900px;
  }

  /* FAQ tap targets */
  .faq-item summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Footer link tap targets */
  .footer-copy a {
    display: inline-block;
    padding: 6px 4px;
  }
}

@media (max-width: 414px) {
  .container { padding: 0 20px; }

  .cfr-line {
    gap: 0.35rem 0.4rem;
  }

  .cfr-line code {
    font-size: 0.7rem;
  }

  .card-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .container { padding: 0 16px; }

  /* Prevent Plex Mono code chips from overflowing */
  code {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* ============================================================
   PRIVACY / TERMS PAGES
   ============================================================ */
.legal-page {
  padding: var(--section-v-desktop) 0;
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  margin-bottom: 2rem;
}

.legal-page p {
  margin-bottom: 1rem;
}
