/* =============================================
   KEEPER — Main Stylesheet
   Design decisions documented in Obsidian:
   Zettelkasten/Keeper Website Design Decisions.md
   ============================================= */

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

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #1B2A3B;
  background: #ffffff;
  line-height: 1.6;
}

/* Georgia for display headings — connects to logo wordmark, gives brand voice */
h1, h2 {
  font-family: Georgia, 'Times New Roman', serif;
}

/* ---------- Spacing / Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: #F5F6F7;
}

.section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: #5A6472;
  font-size: 1.1rem;
  margin-bottom: 48px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  border: 2px solid transparent;
}

/* Primary: amber bg, navy text — 5.9:1 contrast, passes WCAG AA */
.btn-primary {
  background: #D4820A;
  color: #1B2A3B;
  border-color: #D4820A;
}

.btn-primary:hover {
  background: #b86e08;
  color: #1B2A3B;
  border-color: #b86e08;
}

.btn-secondary {
  background: transparent;
  color: #1B2A3B;
  border-color: #1B2A3B;
}

.btn-secondary:hover {
  background: #1B2A3B;
  color: #ffffff;
}

/* Subdued outline for Foundation/Structure cards */
.btn-outline {
  background: transparent;
  color: #1B2A3B;
  border-color: #C5CAD0;
}

.btn-outline:hover {
  background: #1B2A3B;
  color: #ffffff;
  border-color: #1B2A3B;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* ---------- Navigation ---------- */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1B2A3B;
  box-shadow: 0 1px 8px rgba(0,0,0,0.15);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.nav-logo-img {
  display: block;
  height: 72px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: #E2E5E9;
  text-decoration: none;
  font-weight: 500;
  transition: color 200ms ease;
}

.nav-links a:not(.btn):hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(212,130,10,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.03) 0%, transparent 50%),
    linear-gradient(135deg, #1B2A3B 0%, #22334a 60%, #1e3048 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 80px
    );
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: #B0BEC9;
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .btn-secondary {
  color: #E2E5E9;
  border-color: #4A6278;
}

.hero .btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}

/* Hero job-cost card */
.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  backdrop-filter: blur(2px);
}

.hero-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #D4820A;
  margin-bottom: 8px;
}

.hero-card-job {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-card-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 20px;
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #B0BEC9;
}

.hero-card-profit {
  color: #ffffff;
  font-weight: 700;
  padding-top: 12px;
  margin-top: 1px;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.hero-card-margin {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(212,130,10,0.14);
  border-radius: 6px;
  padding: 12px 16px;
}

.hero-card-pct {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #D4820A;
  line-height: 1;
}

.hero-card-pct-label {
  font-size: 0.75rem;
  color: #B0BEC9;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.hero-card-disclaimer {
  margin-top: 12px;
  font-size: 0.7rem;
  color: rgba(176, 190, 201, 0.5);
  font-style: italic;
}

/* ---------- Service Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.card {
  background: #ffffff;
  border: 1px solid #E2E5E9;
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 200ms ease;
}

.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.11);
}

/* Blueprint: navy inverted card — visually distinct from Foundation/Structure */
.card-featured {
  background: #1B2A3B;
  border-color: #1B2A3B;
  color: #ffffff;
}

.card-featured:hover {
  box-shadow: 0 6px 32px rgba(27,42,59,0.35);
}

.card-badge {
  position: absolute;
  top: -13px;
  left: 32px;
  background: #D4820A;
  color: #1B2A3B;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 20px;
}

.card-tier {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8A5100;
}

/* Amber on navy passes at 5.9:1 */
.card-featured .card-tier {
  color: #D4820A;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.card-featured h3 {
  color: #ffffff;
}

.card-intro {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #8FA5B8;
  margin-top: -4px;
}

.card ul {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card ul li {
  padding-left: 20px;
  position: relative;
  color: #5A6472;
  font-size: 0.95rem;
}

.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D4820A;
  opacity: 0.55;
}

.card-featured ul li {
  color: #8FA5B8;
}

.card-featured ul li::before {
  background: #D4820A;
  opacity: 0.8;
}

/* Pricing anchor below cards */
.pricing-note {
  margin-top: 32px;
  color: #5A6472;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.6;
}

.pricing-note strong {
  color: #1B2A3B;
}

.pricing-note a {
  color: #8A5100;
  text-underline-offset: 2px;
}

.pricing-note a:hover {
  color: #1B2A3B;
}

/* ---------- Pillars (Why Keeper) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.pillar p {
  color: #5A6472;
  line-height: 1.7;
}

/* ---------- Social Proof ---------- */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.testimonial {
  background: #ffffff;
  border: 1px solid #E2E5E9;
  border-radius: 8px;
  padding: 28px 32px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.testimonial-featured {
  padding: 36px 40px;
  border-color: rgba(212,130,10,0.4);
}

.testimonial-quote {
  font-size: 1rem;
  color: #1B2A3B;
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-featured .testimonial-quote {
  font-size: 1.15rem;
}

.testimonial-footer {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1B2A3B;
  font-style: normal;
}

.testimonial-company {
  font-size: 0.78rem;
  color: #5A6472;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Steps (How It Works) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: #E2E5E9;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #8A5100;
  background: #ffffff;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #E2E5E9;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.step p {
  color: #5A6472;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- Contact ---------- */
.contact-fit {
  background: #ffffff;
  border: 1px solid #E2E5E9;
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 40px;
  font-size: 0.95rem;
  color: #3A4B5C;
  line-height: 1.7;
}

.contact-fit strong {
  color: #1B2A3B;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.calendly-inline-widget {
  min-width: 320px;
  height: 700px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  margin-bottom: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1B2A3B;
}

.optional {
  font-weight: 400;
  color: #5A6472;
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid #E2E5E9;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: #1B2A3B;
  background: #ffffff;
  transition: border-color 200ms ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8A5100;
}

.form-status {
  margin-top: 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  padding: 10px 14px;
}
.form-status--success {
  background: #e6f4ea;
  color: #1e6b35;
}
.form-status--error {
  background: #fdecea;
  color: #b71c1c;
}

/* ---------- Footer ---------- */
.footer {
  background: #1B2A3B;
  color: #B0BEC9;
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo-img {
  display: block;
  height: 32px;
  width: auto;
}

.footer-location {
  font-size: 0.85rem;
}

.footer-email {
  color: #B0BEC9;
  text-decoration: none;
  margin-left: auto;
  transition: color 200ms ease;
  font-size: 0.9rem;
}

.footer-email:hover {
  color: #ffffff;
}

.footer-link {
  color: #B0BEC9;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 200ms ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-copy {
  font-size: 0.85rem;
  color: #5A6472;
}

/* ---------- Legal Pages ---------- */
.legal-hero {
  padding: 72px 0 56px;
  background: linear-gradient(135deg, #1B2A3B 0%, #22334a 60%, #1e3048 100%);
  color: #ffffff;
}

.legal-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-hero p {
  color: #B0BEC9;
  font-size: 1rem;
}

.legal-body {
  padding: 64px 0 96px;
}

.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E5E9;
  color: #1B2A3B;
}

.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #1B2A3B;
}

.legal-content p {
  color: #3A4B5C;
  line-height: 1.75;
  margin-bottom: 14px;
}

.legal-content ul {
  margin: 12px 0 16px 20px;
  color: #3A4B5C;
  line-height: 1.75;
}

.legal-content ul li {
  margin-bottom: 6px;
}

.legal-content a {
  color: #8A5100;
  text-decoration: underline;
}

.legal-content a:hover {
  color: #1B2A3B;
}

.legal-content .notice {
  background: #FFF8F0;
  border: 1px solid rgba(212,130,10,0.3);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 0.95rem;
  color: #3A4B5C;
}

.legal-content .effective-date {
  display: inline-block;
  background: #F5F6F7;
  border: 1px solid #E2E5E9;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #5A6472;
  margin-bottom: 32px;
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card,
  .nav-toggle span,
  .nav-links a,
  .footer-email,
  .footer-link,
  .form-group input,
  .form-group textarea {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

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

  .steps::before {
    display: none;
  }

  /* Blueprint spans full width on tablet */
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .card-featured {
    grid-column: span 2;
    /* Wide featured card: reflow as horizontal on tablet */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
  }

  .card-featured .card-badge {
    grid-column: 1;
  }

  .card-featured .card-tier {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .card-featured h3 {
    grid-column: 1;
    grid-row: 2;
  }

  .card-featured .card-intro {
    grid-column: 1;
    grid-row: 3;
  }

  .card-featured ul {
    grid-column: 2;
    grid-row: 1 / span 3;
    padding-top: 8px;
  }

  .card-featured .btn {
    grid-column: 1 / span 2;
    justify-self: start;
    grid-row: 4;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .card-featured {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

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

@media (max-width: 640px) {
  .section { padding: 48px 0; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: #1B2A3B;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }

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

  .nav-inner { position: relative; }

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

  .hero-sub { max-width: none; }

  .pillars {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .testimonial-featured {
    padding: 28px 24px;
  }

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

  .calendly-inline-widget {
    min-width: unset;
    height: 540px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-email { margin-left: 0; }
}
