/* Uncle Bob's VOIP — design system */

:root {
  --navy: #041f2b;
  --navy-raised: #0a2e3d;
  --teal: #0b6573;
  --seaglass: #66c6c0;
  --coral: #ee765d;
  --sand: #ead9bb;
  --text: #f4f1ea;
  --text-muted: #b9c9cc;
  --border: rgba(244, 241, 234, 0.14);
  --radius: 1rem;
  --max-width: 72rem;
  --focus-ring: 3px solid var(--sand);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 400 1rem/1.65 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--seaglass); }
a:hover { color: var(--sand); }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 5vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw + 1rem, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

.wrap {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sand);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 0.5rem 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 31, 43, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  min-height: 48px;
}

.brand-link img { width: 34px; height: 34px; }

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

.nav-toggle svg { width: 22px; height: 22px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
}
.main-nav a:hover { color: var(--seaglass); }

.nav-cta {
  background: var(--coral);
  color: var(--navy) !important;
  padding: 0.6rem 1.1rem;
  border-radius: 0.6rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.nav-cta:hover { background: var(--sand); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    gap: 0.25rem;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .nav-cta { justify-content: center; margin-top: 0.5rem; }
}

@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4,31,43,0.97) 0%, rgba(4,31,43,0.82) 38%, rgba(4,31,43,0.25) 68%, rgba(4,31,43,0.05) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 5rem 4.5rem;
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  color: var(--sand);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 34rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary { background: var(--coral); color: var(--navy); }
.btn-primary:hover { background: var(--sand); color: var(--navy); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--seaglass); color: var(--seaglass); }

@media (max-width: 700px) {
  .hero-inner { padding-block: 3.25rem 3rem; max-width: 100%; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(4,31,43,0.9) 0%, rgba(4,31,43,0.88) 55%, rgba(4,31,43,0.55) 100%);
  }
}

/* Sections */
section { padding-block: 4rem; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head p { font-size: 1.05rem; }

.alt-bg { background: var(--navy-raised); }

/* Trust strip */
.trust-strip {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
}
.trust-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--navy-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card h3 { color: var(--sand); margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; }

/* Why section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.why-item {
  border-left: 3px solid var(--seaglass);
  padding-left: 1.25rem;
}
.why-item h3 { color: var(--text); }

/* Process */
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  counter-reset: step;
  margin-top: 2rem;
}
.process-step { position: relative; padding-top: 3.25rem; }
.process-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
}

/* Pavilion metaphor */
.pavilion {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-raised) 100%);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.pavilion .wrap-inner { max-width: 44rem; }

/* FAQ */
.faq-list { display: grid; gap: 1rem; margin-top: 2rem; }
.faq-item {
  background: var(--navy-raised);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.25rem 1.5rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  padding: 1.1rem 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--coral);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 1.25rem; }

/* Form */
.form-card {
  background: var(--navy-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.form-note {
  background: rgba(102, 198, 192, 0.12);
  border: 1px solid rgba(102, 198, 192, 0.35);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field.full { grid-column: 1 / -1; }
label { font-weight: 600; color: var(--text); font-size: 0.95rem; }
input, textarea, select {
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  min-height: 48px;
}
textarea { min-height: 7rem; resize: vertical; }
.form-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.form-status { color: var(--seaglass); font-size: 0.95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  background: var(--navy-raised);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand { font-weight: 800; color: var(--text); }
.footer-meta { color: var(--text-muted); font-size: 0.92rem; line-height: 1.8; }
.footer-credit {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-credit a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--sand);
}

@media (max-width: 640px) {
  .footer-credit { text-align: left; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
