/* =========================================================
   FutureStack.dev — Design Tokens
   Base: navy/blue (from logo) · Accent: Rose Magenta (pattern-interrupt)
   Type: Space Grotesk (display) / DM Sans (body)
   ========================================================= */
:root {
  --color-primary: #0F172A;        /* deep navy — headers, footer, hero bg */
  --color-primary-2: #1E3A5F;      /* secondary navy */
  --color-blue: #2E6FA7;           /* logo blue */
  --color-blue-light: #6FA8D8;     /* logo light blue */
  --color-accent: #9E1A59;         /* Rose Magenta — sparing use only */
  --color-accent-light: #C23A78;

  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-muted-bg: #EEF2F7;
  --color-border: #E2E8F0;

  --color-fg: #0F172A;
  --color-fg-muted: #55637A;
  --color-on-dark: #F1F5F9;
  --color-on-dark-muted: #AEC0D6;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --space-1: 8px;  --space-2: 16px; --space-3: 24px;
  --space-4: 32px; --space-5: 48px; --space-6: 64px; --space-7: 96px;

  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px;
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 10px 30px rgba(15, 23, 42, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Reset & Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-2); }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-3); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary);
  color: #fff; padding: 12px 20px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--color-blue-light); outline-offset: 2px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: var(--font-display); font-weight: 600;
  font-size: 16px; padding: 14px 28px; border-radius: var(--radius-sm);
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-accent); color: #fff; box-shadow: 0 6px 18px rgba(158, 26, 89, 0.35); }
.btn-primary:hover { background: var(--color-accent-light); box-shadow: 0 10px 24px rgba(158, 26, 89, 0.4); }

.btn-ghost { background: transparent; color: var(--color-blue-light); border: 1.5px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--color-accent-light); color: var(--color-muted-bg); }

.btn-light { background: #fff; color: var(--color-accent); }
.btn-light:hover { background: var(--color-on-dark); }

.btn-small { padding: 10px 20px; font-size: 14px; min-height: 40px; }
.btn-full { width: 100%; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0);
  transition: box-shadow 220ms var(--ease), background 220ms var(--ease);
}
.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.header-inner { display: flex; align-items: center; gap: var(--space-3); height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { border-radius: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--color-primary); }
.brand-dot { color: var(--color-accent); }

.main-nav { display: none; gap: var(--space-4); font-weight: 500; }
.main-nav a { text-decoration: none; color: var(--color-fg-muted); transition: color 150ms var(--ease); }
.main-nav a:hover { color: var(--color-primary); }

.header-cta { display: none; }

.nav-toggle {
  background: none; border: none; width: 44px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-primary); transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.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); }

@media (min-width: 860px) {
  .main-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile nav panel */
@media (max-width: 859px) {
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--color-surface);
    flex-direction: column; padding: var(--space-3); gap: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; display: flex; }
  .main-nav a { padding: 10px 0; font-size: 17px; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 100% at 50% 0%, #16233d 0%, var(--color-primary) 55%, #0B1220 100%);
  color: var(--color-on-dark);
  padding: var(--space-7) 0 var(--space-6);
}

/* Faint layered grid — reads as "stack" depth, not decoration for its own sake */
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(111, 168, 216, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 168, 216, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 70% at 50% 20%, #000 0%, transparent 75%);
}

.hero-canvas {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.75; mix-blend-mode: screen;
}

.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 900px; height: 900px; max-width: 180vw;
  background: radial-gradient(circle, rgba(111, 168, 216, 0.35) 0%, rgba(111, 168, 216, 0) 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 780px; }
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 13px; font-weight: 600; color: var(--color-blue-light); margin-bottom: var(--space-2);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); color: #fff; margin-bottom: var(--space-3); }
.hero-sub { font-size: 18px; color: var(--color-on-dark-muted); max-width: 620px; margin: 0 auto var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-bottom: var(--space-5); }

.trust-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-4);
  font-size: 14px; color: var(--color-on-dark-muted); font-family: var(--font-display); font-weight: 500;
}
.trust-bar li { position: relative; padding-left: 18px; }
.trust-bar li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent);
}

/* =========================================================
   Accent Bands (Rose Magenta pattern-interrupt)
   ========================================================= */
.band-accent {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #7E1345 0%, var(--color-accent) 55%, #B23C6E 100%);
  color: #fff; padding: var(--space-6) 0;
}
.band-accent::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(120deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 64px);
}
.band-inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; }
.band-inner h2 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.band-inner p { color: rgba(255,255,255,0.9); font-size: 17px; }
.band-cta { padding: var(--space-6) 0; }
.band-cta .btn { margin-top: var(--space-2); }

/* =========================================================
   Inner Page Hero (service pages)
   ========================================================= */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 100% at 50% 0%, #16233d 0%, var(--color-primary) 55%, #0B1220 100%);
  color: var(--color-on-dark);
  padding: var(--space-6) 0 var(--space-5);
}
.page-hero-inner { position: relative; z-index: 2; text-align: center; max-width: 760px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); color: #fff; margin-bottom: var(--space-3); }

.breadcrumb {
  display: flex; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--color-on-dark-muted); margin-bottom: var(--space-3);
}
.breadcrumb a { text-decoration: none; color: var(--color-blue-light); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }
.breadcrumb .current { color: var(--color-on-dark-muted); }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: var(--space-7) 0; position: relative; }
.section-muted {
  background: var(--color-muted-bg);
  background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.center { text-align: center; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); max-width: 640px; }
.section-title.center { margin-left: auto; margin-right: auto; }
.section-sub { color: var(--color-fg-muted); max-width: 560px; font-size: 17px; }
.section-sub.center { margin-left: auto; margin-right: auto; }
.eyebrow.center { text-align: center; color: var(--color-blue); }
#digital-health .eyebrow, #services .eyebrow, #approach .eyebrow { color: var(--color-blue); }

/* Bento grid (Digital Health) */
.bento-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-5);
}
@media (min-width: 640px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento-grid.bento-grid-wide { grid-template-columns: repeat(3, 1fr); } }

.bento-card {
  position: relative; overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.bento-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--color-blue), var(--color-blue-light));
  transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease);
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.bento-card:hover::before { transform: scaleX(1); }
.bento-card h3 { font-size: 19px; }
.bento-card p { color: var(--color-fg-muted); margin-bottom: 0; font-size: 15px; }

.bento-card-accent { border-color: rgba(158, 26, 89, 0.25); background: linear-gradient(160deg, #FFFFFF 60%, #FCE9F1 100%); }
.bento-card-accent::before { background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light)); }
.bento-card-accent .card-icon { color: var(--color-accent); background: linear-gradient(160deg, rgba(158, 26, 89, 0.14), rgba(158, 26, 89, 0.05)); box-shadow: inset 0 0 0 1px rgba(158, 26, 89, 0.15); }

.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(46, 111, 167, 0.16), rgba(46, 111, 167, 0.05));
  color: var(--color-blue);
  box-shadow: inset 0 0 0 1px rgba(46, 111, 167, 0.15);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2);
  transition: transform 220ms var(--ease);
}
.bento-card:hover .card-icon { transform: scale(1.06); }
.card-icon svg { width: 24px; height: 24px; }

/* Services grid */
.services-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-5); }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3);
  border-top: 3px solid var(--color-blue);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.service-card h3 { font-size: 17px; display: flex; align-items: center; gap: 6px; }
.service-card p { color: var(--color-fg-muted); font-size: 14.5px; margin-bottom: 0; }
.service-card-link .card-arrow {
  display: inline-block; color: var(--color-blue); transition: transform 200ms var(--ease);
}
.service-card-link:hover .card-arrow { transform: translateX(3px); }
.service-card-link:hover { border-color: var(--color-blue); }

/* Process steps (service pages) */
.process-steps { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-5); }
@media (min-width: 640px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process-steps { grid-template-columns: repeat(4, 1fr); } }
.process-step { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); }
.process-step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-bottom: var(--space-2);
}
.process-step h3 { font-size: 16px; }
.process-step p { color: var(--color-fg-muted); font-size: 14px; margin-bottom: 0; }

/* Check list (service pages) */
.check-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin: var(--space-3) auto 0; max-width: 560px; text-align: left; }
@media (min-width: 640px) { .check-list { grid-template-columns: 1fr 1fr; } }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--color-fg-muted); font-size: 15px; }
.check-list svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--color-blue); margin-top: 2px; }

/* Synergy */
.synergy-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-3); align-items: stretch;
  margin-top: var(--space-5); max-width: 900px; margin-left: auto; margin-right: auto;
}
.synergy-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-card);
}
.synergy-tag {
  display: inline-block; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent);
  background: rgba(158, 26, 89, 0.08); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--space-2);
}
.synergy-card p { color: var(--color-fg-muted); margin-bottom: 0; }
.synergy-plus {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin: 0 auto;
  border-radius: 50%; background: var(--color-surface); border: 1.5px solid var(--color-border);
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--color-blue); box-shadow: var(--shadow-card);
}
.synergy-result {
  margin-top: var(--space-4); font-family: var(--font-display); font-weight: 600;
  font-size: 20px; color: var(--color-primary);
}

@media (min-width: 760px) {
  .synergy-grid { grid-template-columns: 1fr auto 1fr; }
}

/* =========================================================
   Contact Form
   ========================================================= */
.contact-wrap { max-width: 720px; }
.contact-intro { text-align: center; margin-bottom: var(--space-5); }
.contact-intro .section-title, .contact-intro .section-sub { margin-left: auto; margin-right: auto; }

.contact-form {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-card);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--color-primary); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 16px; background: #fff; color: var(--color-fg);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(46, 111, 167, 0.15); outline: none;
}
.form-field textarea { resize: vertical; min-height: 90px; }

.field-error { display: block; min-height: 18px; font-size: 13px; color: #B91C1C; margin-top: 4px; }

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: #B91C1C; }

.form-status { text-align: center; margin-top: var(--space-2); font-weight: 600; font-size: 14px; min-height: 20px; }
.form-status.success { color: #15803D; }
.form-status.error { color: #B91C1C; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--color-primary); color: var(--color-on-dark-muted); padding: var(--space-5) 0 var(--space-4); }
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 17px; }
.footer-tagline { font-size: 14px; color: var(--color-blue-light); margin-bottom: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: 14px; }
.footer-links a { text-decoration: none; color: var(--color-on-dark-muted); }
.footer-links a:hover { color: #fff; }
.footer-meta { font-size: 12.5px; color: #7C8CA6; margin-top: var(--space-2); margin-bottom: 0; }

/* =========================================================
   Scroll Reveal
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
