/* ============================================================
   Components — Header, Footer, Buttons, Cards, Forms
   ============================================================ */

/* ---------- Site Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-navy-900);
}
.nav-brand img { height: 42px; width: auto; }
.nav-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-brand .brand-name {
  font-weight: 800;
  font-size: var(--fs-base);
  color: var(--c-navy-900);
}
.nav-brand .brand-sub {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;             /* tighter — was 4px / 2px before */
  list-style: none;
}
.nav-menu a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;  /* tighter horizontal padding */
  border-radius: var(--r-md);
  color: var(--c-text);
  font-weight: 500;
  font-size: var(--fs-sm);
  position: relative;
  transition: all var(--t-fast) var(--ease);
}
.nav-menu a:hover { background: var(--c-blue-50); color: var(--c-navy-800); }
.nav-menu a.active {
  color: var(--c-navy-800);
  background: var(--c-blue-50);
}
.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -3px;
  inset-inline: 14px;
  height: 2.5px;
  background: var(--c-orange-500);
  border-radius: 3px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Bold, prominent signup CTA in header */
.nav-cta .btn-signup {
  position: relative;
  background: linear-gradient(135deg, var(--c-orange-500) 0%, #ff7a18 100%);
  color: white;
  font-weight: 800;
  font-size: var(--fs-sm);
  padding: 9px 20px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 18px -4px rgba(245, 134, 52, 0.55),
    0 2px 4px rgba(245, 134, 52, 0.2);
  letter-spacing: 0.01em;
  transition: all var(--t-fast) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta .btn-signup::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 50%);
  pointer-events: none;
}
.nav-cta .btn-signup:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 12px 24px -4px rgba(245, 134, 52, 0.7),
    0 3px 6px rgba(245, 134, 52, 0.25);
  color: white;
}
.nav-cta .btn-signup:active { transform: translateY(0); }
.nav-cta .btn-signup svg { stroke: white; width: 14px; height: 14px; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--c-navy-800); }

@media (max-width: 960px) {
  .nav-menu { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Mobile reorder:
     hamburger on the right · logo centered · signup on the left */
  .nav {
    position: relative;
    justify-content: center;
  }
  /* Unwrap nav-cta on mobile so its children can be absolutely positioned individually */
  .nav-cta { display: contents; }

  .nav-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }
  .nav .btn-signup {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    font-size: var(--fs-xs);
  }
  .nav-brand { margin: 0 auto; }
  .nav-brand .brand-text { display: none; }

  .nav-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    inset-inline: 12px;
    top: calc(var(--nav-h) - 4px);
    background: white;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    padding: var(--space-3);
    gap: 2px;
  }
  .nav-menu.is-open a {
    padding: 10px 14px;
    width: 100%;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn--primary {
  background: var(--c-navy-800);
  color: white;
  box-shadow: var(--sh-brand);
}
.btn--primary:hover {
  background: var(--c-navy-700);
  color: white;
  transform: translateY(-1px);
}
.btn--accent {
  background: var(--c-orange-500);
  color: white;
}
.btn--accent:hover { background: #e6741f; color: white; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-navy-800);
}
.btn--ghost:hover { background: var(--c-blue-50); border-color: var(--c-blue-500); }
.btn--white {
  background: white;
  color: var(--c-navy-800);
}
.btn--white:hover { background: var(--c-blue-50); color: var(--c-navy-800); }
.btn--lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn--sm { padding: 8px 14px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--space-6);
  transition: all var(--t-base) var(--ease);
}
.card:hover {
  border-color: var(--c-blue-100);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-blue-50);
  color: var(--c-navy-800);
  margin-bottom: var(--space-4);
}
.card-icon svg { width: 26px; height: 26px; stroke: currentColor; }
.card-icon.accent { background: var(--c-orange-50); color: var(--c-orange-500); }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--c-text-muted); }

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
}
.field .req { color: var(--c-orange-500); margin-inline-start: 2px; }
.field input,
.field select,
.field textarea {
  background: white;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: var(--fs-base);
  width: 100%;
  transition: border var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  font-family: var(--ff-sans);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-blue-500);
  box-shadow: 0 0 0 3px rgba(21, 101, 216, 0.15);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint {
  font-size: var(--fs-xs);
  color: var(--c-text-soft);
}
.field input[type="checkbox"], .field input[type="radio"] { width: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-navy-900);
  color: rgba(255,255,255,0.78);
  padding-block: var(--space-9) var(--space-6);
  margin-top: var(--space-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: white;
  font-size: var(--fs-base);
  margin-bottom: var(--space-4);
}
.site-footer a {
  color: rgba(255,255,255,0.78);
  display: inline-block;
  padding: 4px 0;
}
.site-footer a:hover { color: var(--c-orange-400); }
.site-footer .brand-block img {
  height: 56px;
  background: white;
  padding: 8px 14px;
  border-radius: var(--r-md);
  margin-bottom: var(--space-4);
}
.site-footer .brand-block p {
  font-size: var(--fs-sm);
  line-height: 1.8;
}
.footer-list { display: flex; flex-direction: column; gap: 2px; }
.footer-contact { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-contact .item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
}
.footer-contact svg {
  width: 18px; height: 18px;
  stroke: var(--c-orange-400);
  flex-shrink: 0;
  margin-top: 3px;
}
.social-row {
  display: flex;
  gap: 10px;
  margin-top: var(--space-4);
}
.social-row a {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease);
}
.social-row a:hover { background: var(--c-orange-500); }
.social-row svg { width: 20px; height: 20px; fill: white; }
.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.55);
}

/* ---------- Page banner (sub-pages) ---------- */
.page-banner {
  position: relative;
  background: linear-gradient(135deg, var(--c-navy-900) 0%, var(--c-navy-700) 100%);
  color: white;
  padding-block: var(--space-9) var(--space-9);
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(245, 134, 52, 0.18), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(21, 101, 216, 0.5), transparent 50%);
  pointer-events: none;
}
.page-banner > * { position: relative; z-index: 1; }
.page-banner h1 { color: white; margin-bottom: var(--space-3); }
.page-banner p { color: rgba(255,255,255,0.85); max-width: 60ch; }
.breadcrumbs {
  display: flex;
  gap: 6px;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-4);
}
.breadcrumbs a { color: rgba(255,255,255,0.7); }
.breadcrumbs a:hover { color: white; }
.breadcrumbs .sep { opacity: 0.4; }

/* ---------- Badge / pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--c-blue-50);
  color: var(--c-navy-800);
}
.pill.accent { background: var(--c-orange-50); color: var(--c-orange-500); }
.pill.success { background: #e7f7ef; color: #047857; }
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- CTA strip ---------- */
.cta-strip {
  background: linear-gradient(120deg, var(--c-navy-900), var(--c-navy-700));
  color: white;
  border-radius: var(--r-xl);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(245,134,52,0.25), transparent 70%);
  top: -100px; left: -80px;
  pointer-events: none;
}
.cta-strip h2 { color: white; margin-bottom: 8px; font-size: var(--fs-2xl); }
.cta-strip p { color: rgba(255,255,255,0.85); max-width: 50ch; }
.cta-strip .actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
