/* =============================================
   IT.ALLY — Design System
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Palette */
  --navy: #0B2572;
  --navy-deep: #071A52;
  --navy-mid: #162941;
  --navy-light: #1B3350;
  --ink: #1A2A40;
  --ink-2: #3D4F63;
  --ink-3: #6B7A8D;
  --ink-muted: #8B98A9;
  --line: #E4E8EE;
  --line-light: #F0F2F5;
  --bg: #FBFAF7;
  --bg-tint: #EEF4FA;
  --surface: #FFFFFF;
  --cta: #F5A31B;
  --cta-hover: #DC8A05;
  --cta-ink: #3A2400;
  --cta-glow: rgba(245, 163, 27, 0.35);
  --blue: #2F6FA8;
  --blue-dk: #245688;
  --blue-lt: #5C93C6;
  --red: #E24A3B;
  --red-dk: #C23A2C;
  --amber: #F2B233;
  --green: #3FA972;
  --green-dk: #2E8A5B;
  --gold: #C79A3E;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Spacing */
  --maxw: 1140px;
  --section-py: clamp(3.5rem, 8vw, 5.5rem);
  --section-py-lg: clamp(4.5rem, 10vw, 7rem);

  /* Radii */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-s: 0 4px 20px rgba(11, 37, 114, 0.06);
  --shadow-m: 0 12px 40px rgba(11, 37, 114, 0.1);
  --shadow-lg: 0 24px 60px rgba(11, 37, 114, 0.14);
  --shadow-cta: 0 8px 24px var(--cta-glow);

  /* Transitions */
  --ease: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Layout --- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

section { padding: var(--section-py) 0; }
section.lg { padding: var(--section-py-lg) 0; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

h2 em, h1 em {
  font-style: italic;
  color: var(--cta-hover);
}

p { color: var(--ink-2); }
p + p { margin-top: 1em; }
strong { font-weight: 600; color: var(--ink); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cta-hover);
  margin-bottom: 0.875rem;
}

.sec-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.sec-head h2 { margin-bottom: 0.875rem; }
.sec-head p { font-size: 1.08rem; }

.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), background 0.2s, border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-cta {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: var(--shadow-cta);
}
.btn-cta:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--cta-glow);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue-dk);
  background: var(--bg-tint);
}

.btn-outline-light {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.14);
  border-color: #fff;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11,37,114,0.35);
}
.btn-navy:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
}

.pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: var(--shadow-cta); }
  50% { box-shadow: var(--shadow-cta), 0 0 0 12px rgba(245,163,27,0.12); }
}

/* --- Top Bar --- */
.topbar {
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

/* --- Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,250,247,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}
.brand .mark img { height: 30px; width: auto; display: block; }
.brand small {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  align-items: center;
}
.nav-links a {
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--blue-dk); }
.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0; right: 0;
  height: 2px;
  background: var(--cta);
  border-radius: 1px;
}

.hd .btn { padding: 0.65rem 1.4rem; font-size: 0.88rem; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* --- Hero --- */
.hero {
  position: relative;
  background: radial-gradient(1100px 550px at 75% 10%, rgba(47,111,168,0.25), transparent 60%),
              linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 50%, var(--navy-mid) 100%);
  color: #fff;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 6rem) 0 clamp(5rem, 12vw, 7rem);
}
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 60px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero .sub {
  font-size: 1.15rem;
  color: #C9D6E5;
  max-width: 54ch;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
}
.badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.75rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #DDE8F3;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
}
.badge svg { width: 14px; height: 14px; color: var(--green); }

/* --- Stat Band --- */
.stats {
  background: var(--navy);
  color: #fff;
  padding: 0;
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-block: 2rem;
}
.stat {
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.stat:last-child { border-right: none; }
.stat .n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--cta);
}
.stat .l {
  font-size: 0.8rem;
  color: #B9C6D6;
  margin-top: 0.5rem;
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease-smooth);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--cta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-smooth);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-m);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(11,37,114,0.06), rgba(11,37,114,0.12));
}
.card-icon svg { width: 24px; height: 24px; color: var(--navy); }
.card-icon.orange { background: linear-gradient(135deg, #FEF0D5, #FCDFA0); }
.card-icon.orange svg { color: var(--cta-hover); }
.card-icon.green { background: linear-gradient(135deg, #E1F1EA, #C7E5D5); }
.card-icon.green svg { color: var(--green-dk); }
.card-icon.red { background: linear-gradient(135deg, #FCE9E6, #F5D0CB); }
.card-icon.red svg { color: var(--red-dk); }

.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; }

/* --- Two Column Grid --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

/* --- Steps / Flow --- */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: all 0.3s var(--ease-smooth);
}
.flow-step:hover {
  background: rgba(255,255,255,0.09);
  transform: translateX(8px);
  border-color: rgba(245,163,27,0.45);
}
.step-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--cta);
  opacity: 0.85;
  min-width: 50px;
  text-align: center;
  flex-shrink: 0;
}
.step-body h3 { color: var(--cta); margin-bottom: 0.35rem; font-size: 1.2rem; }
.step-body p { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin: 0; }
.step-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(245,163,27,0.2);
  color: var(--cta);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  font-weight: 600;
}

/* --- Dark Section --- */
.dark-section {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: #fff;
}
.dark-section h2 { color: #fff; }
.dark-section h2 em { color: var(--cta); }
.dark-section p { color: #B9C6D6; }
.dark-section .eyebrow { color: var(--cta); }

/* --- Tinted Section --- */
.tint-section { background: var(--bg-tint); }

/* --- Gauge Card --- */
.gauge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  box-shadow: var(--shadow-m);
  text-align: center;
}
.gauge-card .kick {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.gauge-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--amber);
  margin-top: 0.25rem;
}
.gauge-num span { font-size: 1.2rem; color: var(--ink-muted); }
.gauge-lab { font-weight: 600; font-size: 1rem; margin-top: 0.4rem; }
.gauge-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-muted);
  margin-top: 0.875rem;
  padding: 0 0.4rem;
}

/* --- CTA Band --- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cta), #F7B84A);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
  box-shadow: 0 20px 50px rgba(245,163,27,0.4);
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
}
.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 {
  color: var(--cta-ink);
  margin-bottom: 0.75rem;
}
.cta-band p {
  color: #5A3D06;
  font-weight: 500;
  max-width: 52ch;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}
.cta-band .note {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #6B4A08;
}

/* --- FAQ Accordion --- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.faq-q svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: transform 0.3s var(--ease-smooth);
}
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-smooth), padding 0.35s;
  padding: 0 0;
}
.faq-item.open .faq-a {
  max-height: 500px;
  padding-bottom: 1.25rem;
}
.faq-a p { font-size: 0.96rem; line-height: 1.7; }

/* --- Footer --- */
footer {
  background: var(--navy-deep);
  color: #fff;
  padding: clamp(3rem, 6vw, 4rem) 0 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand .mark img { height: 30px; width: auto; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.88rem; color: #8A99AC; max-width: 28ch; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6E7E92;
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.9rem;
  color: #B9C6D6;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--cta); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: #6E7E92;
}
.footer-bottom .disc {
  max-width: 100%;
  font-size: 0.72rem;
  color: #5A6A7E;
  line-height: 1.6;
}

/* --- Page Header (internal pages) --- */
.page-hero {
  background: linear-gradient(155deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 50px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.page-hero h1 { color: #fff; margin-bottom: 1rem; }
.page-hero p { color: #C9D6E5; font-size: 1.12rem; max-width: 58ch; margin: 0 auto; }
.page-hero .eyebrow { color: var(--cta); }

/* --- Content Blocks --- */
.content-block { max-width: 720px; margin: 0 auto; }
.content-block h2 { margin-top: 2.5rem; margin-bottom: 0.875rem; }
.content-block h3 { margin-top: 2rem; margin-bottom: 0.625rem; }
.content-block p { margin-bottom: 1rem; }
.content-block ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
  list-style: disc;
}
.content-block ul li {
  font-size: 0.96rem;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

/* --- Check List --- */
.check-list { margin: 1.25rem 0; }
.check-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  font-size: 1rem;
  color: var(--ink-2);
}
.check-list .dot {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.check-list .dot svg { width: 14px; height: 14px; color: #fff; }

/* --- Why Card --- */
.why-card {
  background: linear-gradient(160deg, var(--navy), var(--navy-mid));
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.why-card .mark img { height: 40px; width: auto; display: block; margin: 0 auto; }
.why-card p { color: #C4D1E0; margin-top: 0.75rem; font-size: 0.95rem; }
.why-card .btn { margin-top: 1.25rem; }

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin: 0 0.4rem; }

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

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem clamp(1.25rem, 4vw, 2rem);
    gap: 1rem;
    box-shadow: var(--shadow-m);
  }
  .nav-links.open a.active::after { display: none; }

  .hero { padding: clamp(3rem, 8vw, 4rem) 0 clamp(4rem, 10vw, 5rem); }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat { border-right: none; }
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .flow-step {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .step-num { margin-bottom: 0.25rem; }
}

@media (max-width: 480px) {
  .stats .wrap { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .badges { flex-direction: column; align-items: center; }
}

/* --- Animations --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
