/* ═══════════════════════════════════════════════
   CODESPADE — CSS  v2
   Two themes: [data-theme="dark"]  = Precision Dark (A)
               [data-theme="light"] = Human Tech (B)
═══════════════════════════════════════════════ */

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: #080808;
  color: #c8f135;
  font-size: 0.85rem;
  border: 1px solid #c8f135;
  border-radius: 4px;
  z-index: 9999;
  transition: top 0.15s;
  font-family: monospace;
}
.skip-link:focus { top: 1rem; }

/* ── Global focus-visible ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Remove outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) { outline: none; }

/* ── THEME: Precision Dark ── */
[data-theme="dark"] {
  --bg:           #080808;
  --surface:      #0f0f0f;
  --surface2:     #161616;
  --border:       #1e1e1e;
  --border-hi:    #2a2a2a;
  --accent:       #c8f135;
  --accent-dim:   rgba(200,241,53,0.08);
  --accent2:      #ffffff;
  --text:         #ebebeb;
  --text-hi:      #ffffff;
  --muted:        #666666;
  --muted2:       #444444;
  --hero-bg:      #080808;
  --hero-text:    #ebebeb;
  --glow:         rgba(200,241,53,0.05);
  --card-radius:  6px;
  --font-head:    'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --btn-text:     #080808;
  --error:        #e85a47;
  --shadow:       none;
}

/* ── THEME: Human Tech ── */
[data-theme="light"] {
  --bg:           #f5f2ec;
  --surface:      #ffffff;
  --surface2:     #ede9e1;
  --border:       #e0dbd0;
  --border-hi:    #c8c2b5;
  --accent:       #2d5a3d;
  --accent-dim:   rgba(45,90,61,0.07);
  --accent2:      #e8935a;
  --text:         #1a1a1a;
  --text-hi:      #000000;
  --muted:        #7a736a;
  --muted2:       #b0aa9f;
  --hero-bg:      #1a3328;
  --hero-text:    #f5f2ec;
  --glow:         rgba(45,90,61,0.12);
  --card-radius:  12px;
  --font-head:    'Cormorant Garamond', serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'Outfit', sans-serif;
  --error:        #e85a47;
  --btn-text:     #f5f2ec;
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

/* ── Font loading: ensure swap even if Google Fonts is slow ── */
@font-face {
  font-family: 'Syne';
  src: local('Syne');
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: local('DM Sans');
  font-display: swap;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  transition: background 0.35s, color 0.35s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.container {
  width: 88%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
[data-theme="dark"] h1  { font-weight: 800; color: var(--text-hi); }
[data-theme="dark"] h2  { font-weight: 700; }
[data-theme="dark"] h3  { font-weight: 700; }
[data-theme="light"] h1 { font-weight: 700; }
[data-theme="light"] h2 { font-weight: 600; }
[data-theme="light"] h3 { font-weight: 600; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--card-radius);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-text);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-hi);
}
.btn-secondary:hover { color: var(--text-hi); border-color: var(--accent); }

.btn-full { width: 100%; }

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.nav-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="light"] .nav-header {
  background: rgba(245,242,236,0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.95rem 6%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
[data-theme="light"] .nav-logo { font-weight: 700; }

.nav-links {
  display: flex;
  gap: 2rem;
  margin-right: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Language toggle — cycles PL → EN → NO */
.lang-toggle {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  letter-spacing: 0.06em;
  transition: all 0.15s;
  font-family: var(--font-mono);
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent); }

/* Theme toggle */
.theme-toggle {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

[data-theme="dark"] .theme-label-light { display: none; }
[data-theme="light"] .theme-label-dark { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  background: var(--hero-bg);
  color: var(--hero-text);
  display: flex;
  align-items: center;
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 65% at 70% 30%, var(--glow), transparent 70%);
  pointer-events: none;
}

/* Subtle grid overlay — dark only */
[data-theme="dark"] .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.25;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero-headline {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--hero-text);
  margin-bottom: 1.75rem;
}
[data-theme="dark"] .hero-headline { font-weight: 800; }
[data-theme="light"] .hero-headline { font-style: italic; letter-spacing: -0.01em; }

.hero-sub {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--hero-text);
  opacity: 0.6;
  max-width: 520px;
  margin-bottom: 2.75rem;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 0.875rem; flex-wrap: wrap; }

[data-theme="light"] .hero .btn-secondary {
  border-color: rgba(245,242,236,0.45);
  color: rgba(245,242,236,0.9); /* ≥4.5:1 on dark hero bg */
}
[data-theme="light"] .hero .btn-secondary:hover {
  color: var(--hero-text);
  border-color: var(--hero-text);
  background: rgba(245,242,236,0.1);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 6%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--hero-text);
  opacity: 0.2;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.hero-scroll-hint::after {
  content: '';
  width: 1px; height: 40px;
  background: currentColor;
  display: block;
  animation: scrollLine 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(0.5); }
}

/* ═══════════════════════════════════════════
   SECTIONS — shared
═══════════════════════════════════════════ */
/* scroll-margin-top compensates for fixed nav on anchor jumps */
section[id], .section[id] { scroll-margin-top: 60px; }

.section { padding: 110px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  margin-bottom: 3.5rem;
}

.section-number {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-family: var(--font-mono);
  opacity: 0.7;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text-hi);
}

/* ═══════════════════════════════════════════
   STATS STRIP
═══════════════════════════════════════════ */
.stats-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  flex: 1;
  gap: 0.35rem;
}

.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
[data-theme="light"] .stat-num { font-weight: 700; }

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 160px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-hi);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .stats-grid { flex-wrap: wrap; }
  .stat-item { flex-basis: 50%; padding: 1.5rem 1rem; }
  .stat-divider { display: none; }
  .stat-item:nth-child(1), .stat-item:nth-child(3) {
    border-right: 1px solid var(--border);
  }
  .stat-item:nth-child(1), .stat-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }
}

/* ═══════════════════════════════════════════
   PROBLEM
═══════════════════════════════════════════ */
.problem-section {
  background: var(--surface);
  padding: 90px 0;
}

.problem-quotes {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: 3rem;
}

.problem-quote {
  background: var(--surface);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
  padding: 1.75rem 2rem;
  font-style: normal;
  line-height: 1.55;
  position: relative;
  transition: background 0.2s;
}
[data-theme="light"] .problem-quote { font-style: italic; font-family: var(--font-head); font-size: clamp(1.1rem, 2vw, 1.3rem); }
.problem-quote:hover { background: var(--surface2); }
.problem-quote::before {
  content: '"';
  position: absolute;
  top: 1.5rem; left: 1.75rem;
  font-size: 2.5rem;
  font-family: var(--font-head);
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  pointer-events: none;
}

.problem-answer {
  font-size: 1.05rem;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.01em;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}
[data-theme="dark"] .problem-answer { font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); }
[data-theme="light"] .problem-answer { font-style: italic; font-size: 1.1rem; }

/* ═══════════════════════════════════════════
   SOLUTIONS
═══════════════════════════════════════════ */
.solutions-section { background: var(--bg); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.card {
  background: var(--surface);
  padding: 2.25rem 2rem;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { background: var(--surface2); }
[data-theme="light"] .card { box-shadow: none; }

.card-icon {
  width: 44px; height: 44px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex; align-items: center;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.65rem;
  color: var(--text-hi);
}

.card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.75rem;
}

.card-link {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s;
}
.card:hover .card-link { gap: 0.55rem; }

/* ═══════════════════════════════════════════
   SERVICES CATALOG
═══════════════════════════════════════════ */
.services-catalog {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.services-group {
  border-bottom: 1px solid var(--border);
}
.services-group:last-child { border-bottom: none; }

.services-group-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}
.services-group-label svg { color: var(--accent); flex-shrink: 0; }

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem 1.25rem 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.service-item:last-child { border-bottom: none; }
.service-item:hover, .service-item:focus-visible {
  background: var(--surface2);
  border-left-color: var(--accent);
  outline: none;
}
[data-theme="dark"] .service-item:hover .si-name,
[data-theme="dark"] .service-item:focus-visible .si-name { color: var(--accent); }

.si-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.si-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.si-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.si-hints {
  font-size: 0.72rem;
  color: var(--muted2);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.22s ease-out, opacity 0.2s ease-out, margin-top 0.22s ease-out;
  margin-top: 0;
  pointer-events: none;
}
.service-item:hover .si-hints,
.service-item:focus-visible .si-hints {
  max-height: 2rem;
  opacity: 1;
  margin-top: 0.35rem;
}
[data-theme="light"] .si-hints { color: var(--muted); }

.si-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--muted);
  padding: 0.18rem 0.55rem;
  background: var(--surface2);
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.si-tag.si-price {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  opacity: 0.75;
}

/* ═══════════════════════════════════════════
   STEPS
═══════════════════════════════════════════ */
.steps-section {
  background: var(--surface);
  padding: 110px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 48px 1fr 48px 1fr;
  gap: 0;
  align-items: center;
}

.step {
  padding: 2.25rem 1.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.step-title { font-size: 1rem; margin-bottom: 0.5rem; color: var(--text-hi); }
.step-desc  { color: var(--muted); font-size: 0.87rem; line-height: 1.6; }

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   FORM
═══════════════════════════════════════════ */
.form-section { background: var(--bg); }

.form-wrapper { max-width: 600px; }

.form-group {
  margin-bottom: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Required field: red asterisk on the label */
label[data-required]::after {
  content: ' *';
  color: var(--error);
  font-size: 0.8em;
}

.form-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.char-counter {
  font-size: 0.72rem;
  color: var(--muted2);
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: color 0.2s;
}
.char-counter.warn { color: var(--accent); }

label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.optional { opacity: 0.55; }

textarea, input[type="text"], input[type="email"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: var(--card-radius);
  padding: 0.8rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}
textarea { min-height: 130px; }
textarea:focus, input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field-error { font-size: 0.77rem; color: var(--error); display: none; }
.field-error.visible { display: block; }

.form-microcopy {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}
.form-rodo { margin-top: 0.35rem; font-size: 0.76rem; color: var(--muted2); }

.form-success, .form-error-msg {
  padding: 2rem 1.5rem;
  border-radius: var(--card-radius);
  text-align: center;
}
.form-success { background: var(--surface); border: 1px solid var(--accent); }
.success-icon { font-size: 1.75rem; color: var(--accent); margin-bottom: 0.75rem; }
.form-error-msg { background: var(--surface); border: 1px solid var(--error); color: var(--muted); }
.form-error-msg a { color: var(--accent); }

/* ═══════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════ */
.about-section { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 5rem;
  align-items: center;
}

.about-photo img {
  width: 100%;
  max-width: 340px;
  border-radius: var(--card-radius);
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  object-position: top center;
}
[data-theme="dark"] .about-photo img {
  filter: grayscale(6%);
  border: 1px solid var(--border-hi);
}
[data-theme="light"] .about-photo img {
  box-shadow: 0 12px 48px rgba(0,0,0,0.12);
}

.about-text { display: flex; flex-direction: column; gap: 0.875rem; }
.about-text p { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.about-text p:first-child { color: var(--text); font-size: 1.15rem; }

.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}
.cred {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
[data-theme="dark"] .cred { background: var(--surface2); }
[data-theme="light"] .cred { color: var(--accent); border-color: rgba(45,90,61,0.3); background: rgba(45,90,61,0.05); }

.btn-modal { margin-top: 0.75rem; align-self: flex-start; }

/* ═══════════════════════════════════════════
   TESTIMONIALS
═══════════════════════════════════════════ */
.testimonials-section { background: var(--bg); }
[data-theme="light"] .testimonials-section { background: var(--surface2); }

.testimonials-source {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.testimonial {
  background: var(--surface);
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: background 0.18s;
  position: relative;
}
.testimonial:hover { background: var(--surface2); }

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: 1.1rem;
  left: 1.5rem;
  font-family: var(--font-head);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--muted2); /* reduced: decorative, not a CTA */
  opacity: 0.6;
  pointer-events: none;
}

.testimonial p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  padding-top: 1rem;
}
[data-theme="light"] .testimonial p {
  font-style: italic;
  font-family: var(--font-head);
  font-size: 1rem;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.testimonial-stars {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.testimonial-tag {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.testimonial-extra {
  display: none;
}
.testimonials-grid.expanded .testimonial-extra {
  display: flex;
}

.testimonials-more-wrap {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}
.testimonials-more-btn {
  font-size: 0.85rem;
  padding: 0.7rem 1.6rem;
}
.testimonials-more-btn.hidden { display: none; }

/* 2 columns on tablet, 1 on mobile */
@media (max-width: 860px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   CTA FINAL
═══════════════════════════════════════════ */
.cta-final {
  background: var(--hero-bg);
  color: var(--hero-text);
  text-align: center;
  padding: 130px 0;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 50%, var(--glow), transparent 70%);
  pointer-events: none;
}
.cta-final .container { position: relative; z-index: 1; }

.cta-headline {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--hero-text);
  letter-spacing: -0.025em;
}
[data-theme="light"] .cta-headline { font-style: italic; }

.cta-sub {
  color: var(--hero-text);
  opacity: 0.55;
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.cta-buttons { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }

[data-theme="light"] .cta-final .btn-secondary {
  border-color: rgba(245,242,236,0.25);
  color: rgba(245,242,236,0.65);
}
[data-theme="light"] .cta-final .btn-secondary:hover {
  color: var(--hero-text);
  border-color: rgba(245,242,236,0.55);
  background: rgba(245,242,236,0.08);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { font-family: var(--font-head); font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.footer-copy { font-size: 0.77rem; color: var(--muted2); }
.footer-tagline { font-size: 0.77rem; color: var(--muted); }

/* ═══════════════════════════════════════════
   MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay.visible { opacity: 1; }
.modal-overlay[hidden] { display: none; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: calc(var(--card-radius) * 2);
  padding: 2.25rem 2.5rem;
  max-width: 660px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.22s ease;
}
.modal-overlay.visible .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); border-color: var(--text); }

.modal-title { font-size: 1.35rem; margin-bottom: 1.5rem; padding-right: 3rem; }

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.55rem 1.1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--accent-dim); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-dim);
}

.tab-content[hidden] { display: none; }

.modal-list { display: flex; flex-direction: column; gap: 0.6rem; }
.modal-list li {
  padding: 0.8rem 1rem;
  background: var(--surface2);
  border-radius: 4px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.modal-list .date { color: var(--muted); font-size: 0.78rem; margin-left: 0.4rem; font-family: var(--font-mono); }

.tech-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.tech-group h4 { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.55rem; font-family: var(--font-mono); }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tech-tags span {
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  color: var(--muted);
}
[data-theme="light"] .tech-tags span { color: var(--accent); border-color: rgba(45,90,61,0.2); background: rgba(45,90,61,0.06); }

/* ═══════════════════════════════════════════
   REVEAL ANIMATIONS
═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 860px) {
  .cards-grid { grid-template-columns: 1fr; gap: 1px; }
  .steps-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .step-arrow { display: none; } /* also hidden above via 920px rule */
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { display: flex; justify-content: center; }
  .about-photo img { max-width: 260px; aspect-ratio: 1; }
}

/* Hide step arrows before grid collapses to avoid orphaned arrows */
@media (max-width: 920px) {
  .step-arrow { display: none; }
  .steps-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 53px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 6%;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; }
  .cta-buttons { flex-direction: column; align-items: center; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: var(--card-radius) var(--card-radius) 0 0; max-height: 92dvh; padding: 1.75rem 1.5rem; }

  .section { padding: 70px 0; }
  .footer-inner { justify-content: center; text-align: center; flex-direction: column; gap: 0.25rem; }
}

@media (max-width: 400px) {
  .modal-tabs { gap: 0; }
  .tab-btn { font-size: 0.75rem; padding: 0.45rem 0.75rem; }
}
