/* ==========================================================================
   Perigon — shared stylesheet
   Hand-written CSS, no build step, no purge tooling — nothing here can
   silently disappear from a compiled bundle the way the original site's
   Tailwind "hidden" utility did.
   ========================================================================== */

:root {
  --navy: #1e3a5f;
  --navy-dark: #172d49;
  --blue: #357fb6;
  --teal: #0d9488;
  --grey: #424143;
  --grey-light: #6b7280;
  --canvas: #f8f7f5;
  --light-blue: #eef4fb;
  --border: #e2e8f0;
  --white: #ffffff;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 20px;

  --container: 1200px;
  --nav-height: 72px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --shadow-sm: 0 1px 2px rgba(30, 58, 95, 0.06);
  --shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 12px 32px rgba(30, 58, 95, 0.12);

  --transition: 180ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--grey);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.15;
}

h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 1.5vw + 1rem, 1.5rem); }

p { color: var(--grey); }

.lede {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
  color: rgba(255,255,255,0.85);
}

/* Focus visibility everywhere — accessibility + touch-friendly by default */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-2);
}
.eyebrow.on-dark { color: #9dc4e8; }

section { padding-block: var(--space-6); }
@media (min-width: 900px) { section { padding-block: var(--space-7); } }

.section--canvas { background: var(--canvas); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.85); }
.section--light-blue { background: var(--light-blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

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

.section--navy .btn-secondary { color: var(--white); border-color: rgba(255,255,255,0.6); }
.section--navy .btn-secondary:hover { background: var(--white); color: var(--navy); }

.btn-block { width: 100%; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
  flex-shrink: 0;
}
.logo .dot-o {
  position: relative;
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
}
.logo .dot-o span {
  position: absolute;
  width: 0.3em;
  height: 0.3em;
  border-radius: 50%;
  top: 50%; left: 50%;
}
.logo .dot-o span:nth-child(1) { background: var(--navy); transform: translate(-50%,-50%) translate(0, -0.4em); }
.logo .dot-o span:nth-child(2) { background: var(--blue); transform: translate(-50%,-50%) translate(0.38em, -0.12em); }
.logo .dot-o span:nth-child(3) { background: var(--teal); transform: translate(-50%,-50%) translate(0.23em, 0.32em); }
.logo .dot-o span:nth-child(4) { background: var(--teal); transform: translate(-50%,-50%) translate(-0.23em, 0.32em); }
.logo .dot-o span:nth-child(5) { background: var(--blue); transform: translate(-50%,-50%) translate(-0.38em, -0.12em); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--light-blue); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a {
  padding: 0.4rem 0.1rem;
  color: var(--grey);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--navy);
  border-color: var(--blue);
}

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

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  transition: background var(--transition), color var(--transition);
}
.account-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.account-link:hover { background: var(--light-blue); color: var(--blue); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--navy);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.lang-switch:hover { background: var(--light-blue); color: var(--blue); }

/* Mobile / tablet nav (below 1024px): collapse into a toggled panel.
   Real JS-driven toggle — not a CSS utility class that can vanish in a build. */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    overflow-y: auto;
  }
  .primary-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-2);
  }
  .nav-links a {
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links a:hover, .nav-links a[aria-current="page"] {
    border-left-color: var(--blue);
    background: var(--light-blue);
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }
  .nav-actions .btn { width: 100%; }
  .nav-actions .account-link {
    width: 100%;
    justify-content: center;
    border: 1px solid var(--border);
  }
  .nav-actions .lang-switch {
    width: 100%;
    order: 10;
  }
}

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

/* body lock when mobile menu open */
body.nav-open { overflow: hidden; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-block: var(--space-6) var(--space-5);
}
@media (min-width: 900px) { .hero { padding-block: var(--space-7) var(--space-6); } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.role-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  font-weight: 700;
  color: var(--white);
  min-height: 44px;
  transition: background var(--transition), border-color var(--transition);
}
.role-pill:hover, .role-pill.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Grids & Cards
   ========================================================================== */
.grid {
  display: grid;
  gap: var(--space-3);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  text-align: center;
}
.stat-card .stat-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--navy);
}
.stat-card .stat-label { font-size: 0.9rem; color: var(--grey-light); }

.section--navy .stat-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}
.section--navy .stat-card .stat-num { color: var(--white); }
.section--navy .stat-card .stat-label { color: rgba(255,255,255,0.75); }

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding-block: 0.4rem;
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/60% no-repeat;
}

.numbered-steps {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.numbered-step .step-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--blue);
  opacity: 0.5;
}

/* two-column layout that stacks on small screens */
.split {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.split--reverse > :first-child { order: 2; }
}

/* Role tabs (Solutions page) */
.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.role-tab {
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--white);
}
.role-tab.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(53,127,182,0.2);
}
.field-row {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .field-row.two-col { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding-block: var(--space-6) var(--space-4);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.footer-grid ul li { padding-block: 0.35rem; }
.footer-grid a:hover { color: var(--white); }
.footer-logo { color: var(--white); font-size: 1.25rem; margin-bottom: var(--space-2); }
.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer-bottom a:hover { color: var(--white); }

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.max-w-content { max-width: 720px; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(13,148,136,0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.coming-soon {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grey-light);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
}
