/* ============================================================
   Marsters Digital — Site Stylesheet
   Design tokens per Technical Specification §2
   ============================================================ */

:root {
  --bg: #0B0F14;
  --surface: #121820;
  --surface-2: #16202B;
  --border: rgba(56, 189, 248, 0.15);
  --border-strong: rgba(56, 189, 248, 0.3);
  --accent-1: #14B8A6;
  --accent-2: #38BDF8;
  --gradient-accent: linear-gradient(135deg, #14B8A6 0%, #38BDF8 100%);
  --blue-1: #2563EB;
  --blue-2: #3B82F6;
  --gradient-blue: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  --heading: #F8FAFC;
  --body: #94A3B8;
  --muted: #64748B;
  --success: #34D399;
  --error: #F87171;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glow + grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(20, 184, 166, 0.10), transparent 65%),
    radial-gradient(700px 500px at 90% 10%, rgba(56, 189, 248, 0.10), transparent 65%),
    radial-gradient(700px 600px at 50% 110%, rgba(37, 99, 235, 0.10), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

/* Floating brand watermark — bottom right of every page */
.brand-watermark {
  position: fixed;
  right: 24px;
  bottom: 20px;
  width: 96px;
  z-index: 50;
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
button { font-family: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.section { padding: 96px 0; position: relative; }
.section--tight { padding: 72px 0; }

.container { width: min(1160px, 92%); margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { font-size: 1.15rem; max-width: 640px; }

.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after {
  content: "";
  width: 24px; height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #06121a;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--border-strong);
  color: var(--accent-2);
}
.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.btn-blue {
  background: var(--gradient-blue);
  color: #fff;
}
.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand img { height: 63px; width: auto; }
.brand-name {
  font-weight: 700;
  color: #3c85b5;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-header .brand-name { text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  color: var(--body);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gradient-accent);
  transition: width 0.25s ease;
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--heading); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta { margin-left: 0.75rem; padding: 0.6rem 1.3rem; font-size: 0.9rem; }

/* Ensure the nav CTA text stays dark on the gradient
   (override .nav-links a's gray color) */
.nav-links .btn-primary,
.nav-links .btn-primary:hover { color: #06121a; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  color: var(--heading);
  cursor: pointer;
  font-size: 1.2rem;
}

/* ---------- Hero ---------- */
.hero { padding: 110px 0 90px; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 { margin: 0.5rem 0 1.5rem; }
.hero p { max-width: 540px; margin-bottom: 2rem; }

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}
.chip svg { color: var(--accent-2); flex-shrink: 0; }

/* Hero visual — glass card mockup */
.hero-visual { position: relative; }

.glass-card {
  background: rgba(18, 24, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.browser-frame { padding: 0; overflow: hidden; }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.browser-url {
  margin-left: 0.5rem;
  flex: 1;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.07);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
}
.browser-body { padding: 1.1rem; display: grid; gap: 0.8rem; }
.mock-line { height: 8px; border-radius: 4px; background: rgba(148, 163, 184, 0.12); }
.mock-line.short { width: 45%; }
.mock-line.accent { background: var(--gradient-accent); width: 70%; }
.mock-block { height: 90px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.mock-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem; background: var(--surface); }
.mock-card .mock-line { margin-bottom: 0.4rem; }
.mock-card .mock-line:last-child { margin-bottom: 0; }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(18, 24, 32, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--heading);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}
.float-chip small { display: block; font-weight: 400; color: var(--body); font-size: 0.72rem; }
.float-chip svg { color: var(--accent-2); }
.float-chip.top-left { top: -22px; left: -30px; }
.float-chip.bottom-right { bottom: -20px; right: -16px; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Trust / values banner ---------- */
.trust-banner {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 24, 32, 0.4);
  padding: 1.75rem 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.trust-item { display: flex; align-items: center; gap: 1rem; }
.trust-icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-2);
}
.trust-item strong { display: block; color: var(--heading); font-size: 0.95rem; margin-bottom: 0.15rem; }
.trust-item span { font-size: 0.85rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gradient-accent);
  color: #06121a;
  margin-bottom: 1.25rem;
}
.card-icon.blue { background: var(--gradient-blue); color: #fff; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-2);
  transition: gap 0.2s ease;
}
.card-link:hover { gap: 0.7rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.feature-list { display: grid; gap: 1.4rem; margin-top: 1rem; }
.feature { display: flex; gap: 1rem; }
.feature-check {
  width: 30px; height: 30px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}
.feature strong { color: var(--heading); display: block; margin-bottom: 0.2rem; font-size: 1rem; }
.feature p { font-size: 0.92rem; }

.stat-card { text-align: center; padding: 2rem 1.5rem; }
.stat-card .stat { font-size: 2.4rem; font-weight: 800; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card p { font-size: 0.9rem; margin-top: 0.35rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4rem 2.5rem;
  text-align: center;
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(56, 189, 248, 0.14), transparent 70%),
    var(--surface);
}
.cta-band h2 { margin-bottom: 0.75rem; }
.cta-band p { max-width: 560px; margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Services page ---------- */
.service-hero { padding: 96px 0 48px; }
.service-item { padding: 2.25rem; }
.service-item ul { list-style: none; margin-top: 1.1rem; display: grid; gap: 0.55rem; }
.service-item li { display: flex; gap: 0.55rem; font-size: 0.92rem; align-items: flex-start; }
.service-item li svg { color: var(--accent-2); flex-shrink: 0; margin-top: 0.2rem; }

.process { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.process-step { counter-increment: step; position: relative; }
.process-step::before {
  content: "0" counter(step);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  display: inline-block;
  margin-bottom: 1rem;
  background: rgba(56, 189, 248, 0.06);
}
.process-step h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.process-step p { font-size: 0.9rem; }

/* ---------- About ---------- */
.about-hero { padding: 96px 0 56px; }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.value-item { display: flex; gap: 1.1rem; }
.value-item .card-icon { margin-bottom: 0; flex-shrink: 0; }

/* ---------- Contact page (§4) ---------- */
.contact-hero { padding: 72px 0 48px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: start; padding-bottom: 96px; }

.contact-left .contact-details { display: grid; gap: 0.9rem; margin-top: 2rem; }.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  transition: border-color 0.2s ease;
}
.contact-detail:hover { border-color: var(--border-strong); }
.contact-detail svg { color: var(--accent-2); flex-shrink: 0; }
.contact-detail strong { display: block; color: var(--heading); font-size: 0.88rem; }
.contact-detail span { font-size: 0.82rem; color: var(--muted); }

/* Form card (§5) */
.form-card { padding: 2.5rem; }
.form-card h2 { margin-bottom: 0.5rem; }
.form-card > p { font-size: 0.95rem; margin-bottom: 2rem; }

.field { margin-bottom: 1.4rem; }
.field label { display: block; color: var(--heading); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.45rem; }
.field label .req { color: var(--accent-2); }
.field-hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--heading);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1.1rem; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--body);
  border-bottom: 2px solid var(--body);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
textarea { resize: vertical; min-height: 130px; }

input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 0 24px rgba(56, 189, 248, 0.15);
}

.field-error input, .field-error select, .field-error textarea { border-color: var(--error); }
.error-msg { display: none; color: var(--error); font-size: 0.78rem; margin-top: 0.4rem; }
.field-error .error-msg { display: block; }

/* Chips multi-select */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip-select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.chip-select:hover { border-color: var(--border-strong); color: var(--heading); }
.chip-select.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Form feedback */
.form-status { display: none; margin-top: 1.25rem; }
.form-status.success {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.92rem;
}
.form-status.error {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.92rem;
}
.form-status svg { flex-shrink: 0; margin-top: 0.1rem; }

.btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(6, 18, 26, 0.3);
  border-top-color: #06121a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; background: rgba(18, 24, 32, 0.35); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-grid .brand { margin-bottom: 1rem; }
.footer-grid p { font-size: 0.88rem; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--heading); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-col a { color: var(--body); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 88px 0 56px; }
.page-hero h1 { margin: 0.5rem 0 1.25rem; }
.breadcrumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--body); }
.breadcrumbs a:hover { color: var(--accent-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .why-grid, .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .float-chip.top-left { left: -8px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }

  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: fixed;
    inset: 96px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    background: rgba(11, 15, 20, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 4%;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: 0.75rem 0; font-size: 1.05rem; }
  .nav-links .nav-cta { margin: 0.75rem 0 0; width: 100%; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 1rem; }
  .values-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .float-chip.top-left { top: -14px; left: -4px; }
  .float-chip.bottom-right { bottom: -14px; right: -4px; }

  /* Contact mobile: trust snippet + form stacked */
  .contact-layout { display: flex; flex-direction: column; }
  .contact-info { display: contents; }
  .trust-block { order: 1; }
  .form-card { order: 2; }
  .contact-details { order: 3; }
}
