/* =========================================================
   JÄMSÄN LASKENTATOIMI OY — MAIN STYLESHEET
   Theme: Deep navy + Teal/aqua | Syne + Manrope
   Design code: 65373526
   ========================================================= */

/* -- Reset & base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
details summary { cursor: pointer; }

/* -- Variables ------------------------------------------- */
:root {
  --navy-900: #080f1a;
  --navy-800: #0d1b2e;
  --navy-700: #132033;
  --navy-600: #1b2d47;
  --navy-500: #24405e;
  --teal-500: #00bfa5;
  --teal-400: #26d0be;
  --aqua-300: #7fffd4;
  --text-primary: #eef4fb;
  --text-secondary: #8aaabb;
  --text-muted: #5b7a8e;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius-pill: 50px;
  --radius-card: 16px;
  --radius-sm: 8px;
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s ease;
}

/* -- Base ------------------------------------------------ */
body {
  font-family: var(--font-body);
  background-color: var(--navy-800);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }

p { max-width: 68ch; color: var(--text-secondary); }
p a { color: var(--teal-400); text-decoration: underline; }
p a:hover { color: var(--aqua-300); }

/* -- Container ------------------------------------------ */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* -- Dot-grid patterns ---------------------------------- */
.dot-grid-animated,
.dot-grid-static {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 191, 165, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

@keyframes dotDrift {
  from { background-position: 0 0; }
  to { background-position: 56px 56px; }
}

.dot-grid-animated {
  animation: dotDrift 12s linear infinite;
}

/* -- Buttons -------------------------------------------- */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  padding: 0.75rem 2rem;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--teal-500);
  color: #000;
  border: 2px solid var(--teal-500);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--teal-400);
  border-color: var(--teal-400);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--teal-500);
  border: 2px solid var(--teal-500);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--teal-500);
  color: #000;
  transform: translateY(-1px);
}

/* -- Glass cards ---------------------------------------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
}

/* -- Reveal animation ----------------------------------- */
/* Content is visible by default; main.js adds .js-reveal to <html> to enable the fade-in */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal .reveal.visible {
  opacity: 1;
  transform: none;
}

/* -- Header --------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: background-color var(--transition-med), box-shadow var(--transition-med);
  padding: 1.1rem 0;
}

.site-header.scrolled {
  background-color: var(--navy-900);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--teal-500);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.site-name:hover { color: var(--teal-400); }

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#main-nav ul li a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  position: relative;
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
}

#main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  background-color: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

#main-nav ul li a:hover,
#main-nav ul li a.active {
  color: var(--text-primary);
}

#main-nav ul li a:hover::after,
#main-nav ul li a.active::after {
  transform: scaleX(1);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.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);
}

/* -- Hero ----------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--navy-900);
  padding-top: 90px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-500);
  background: rgba(0, 191, 165, 0.1);
  border: 1px solid rgba(0, 191, 165, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 50ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fact-item {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.25rem;
  flex: 1;
  min-width: 100px;
  border-right: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.fact-item:last-child { border-right: none; }

.fact-label {
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.fact-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-500);
}

/* -- Widget --------------------------------------------- */
.widget-card {
  position: relative;
}

.widget-title {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.widget-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: none;
}

.step-question {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-400);
  margin-bottom: 1rem;
  max-width: none;
}

.widget-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.widget-option {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.widget-option:hover,
.widget-option:focus-visible {
  border-color: var(--teal-500);
  color: var(--text-primary);
  background: rgba(0, 191, 165, 0.08);
}

.widget-progress {
  height: 3px;
  background: var(--glass-border);
  border-radius: 3px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.widget-progress span {
  display: block;
  height: 100%;
  background: var(--teal-500);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.result-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal-400);
  margin-bottom: 0.75rem;
  max-width: none;
}

.result-services {
  list-style: none;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.result-services li {
  font-size: 0.9rem;
  color: var(--text-primary);
  padding-left: 1.25rem;
  position: relative;
}

.result-services li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--teal-500);
}

.result-cta {
  font-size: 0.88rem;
  padding: 0.65rem 1.5rem;
  margin-bottom: 0.75rem;
}

.restart-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  display: block;
  transition: color var(--transition-fast);
}

.restart-btn:hover { color: var(--teal-400); }

/* -- Section titles ------------------------------------- */
.section-title {
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

/* -- Services horizontal showcase ---------------------- */
.services-showcase {
  padding: 5rem 0 2rem;
  overflow: hidden;
  background-color: var(--navy-800);
}

.services-showcase .container {
  margin-bottom: 1rem;
}

.h-scroll-track {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-500) transparent;
}

.h-scroll-track::-webkit-scrollbar {
  height: 4px;
}

.h-scroll-track::-webkit-scrollbar-track {
  background: transparent;
}

.h-scroll-track::-webkit-scrollbar-thumb {
  background: var(--navy-500);
  border-radius: 4px;
}

.h-scroll-inner {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem max(1rem, calc((100vw - 1200px) / 2));
  width: max-content;
}

.service-card {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 191, 165, 0.3);
}

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--teal-500);
  flex-shrink: 0;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin: 0;
  font-size: 1rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  max-width: none;
}

.service-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-500);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
}

.service-link:hover { color: var(--teal-400); }

.h-scroll-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  transition: opacity 0.4s ease;
  padding-bottom: 1rem;
}

.h-scroll-hint.hidden { opacity: 0; pointer-events: none; }

/* -- How it works --------------------------------------- */
.how-it-works {
  padding: 5rem 0;
  background-color: var(--navy-700);
}

.how-it-works .section-title {
  text-align: center;
  margin-bottom: 3rem;
}

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

.step-item {
  position: relative;
  padding: 1.5rem;
  border-top: 2px solid var(--glass-border);
}

.step-item:hover {
  border-top-color: var(--teal-500);
}

.step-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  color: rgba(0, 191, 165, 0.15);
  line-height: 1;
  margin-bottom: 1rem;
}

.step-item h3 {
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.step-item p {
  font-size: 0.9rem;
  max-width: none;
}

/* -- Why choose us -------------------------------------- */
.why-us {
  padding: 5rem 0;
  background-color: var(--navy-800);
}

.why-us .section-title {
  margin-bottom: 2.5rem;
}

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

.why-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.why-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 191, 165, 0.3);
}

.why-icon {
  width: 40px;
  height: 40px;
  color: var(--teal-500);
  flex-shrink: 0;
}

.why-icon svg {
  width: 100%;
  height: 100%;
}

.why-item h3 {
  color: var(--text-primary);
}

.why-item p {
  font-size: 0.9rem;
  max-width: none;
}

/* -- FAQ ------------------------------------------------ */
.faq-section {
  padding: 5rem 0;
  background-color: var(--navy-700);
}

.faq-section .section-title {
  margin-bottom: 2.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 800px;
}

.faq-item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: rgba(0, 191, 165, 0.3);
}

.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  user-select: none;
  transition: color var(--transition-fast), background var(--transition-fast);
  background: var(--glass-bg);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--teal-500);
  font-weight: 300;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  color: var(--teal-400);
}

.faq-answer {
  padding: 1rem 1.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.1);
}

.faq-answer p {
  font-size: 0.9rem;
  max-width: none;
}

/* -- Contact sections ----------------------------------- */
.contact-cta-section,
.contact-page-section {
  padding: 5rem 0;
  background-color: var(--navy-800);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-info > p {
  margin-bottom: 1.5rem;
}

.contact-info address p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.contact-info address a {
  color: var(--teal-400);
  transition: color var(--transition-fast);
}

.contact-info address a:hover { color: var(--aqua-300); }

.registry-note,
.contact-meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  max-width: none;
}

.contact-meta {
  margin-top: 1.25rem;
}

.contact-meta p {
  margin-top: 0.3rem;
}

.contact-meta a {
  color: var(--teal-400);
}

.map-link {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  padding: 0.6rem 1.5rem;
}

/* -- Forms ---------------------------------------------- */
.contact-form-wrap h2 {
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.form-row label span { color: var(--teal-500); }

.form-row input,
.form-row textarea {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-muted);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--teal-500);
  background: rgba(0, 191, 165, 0.05);
}

.form-row textarea {
  resize: vertical;
  min-height: 110px;
}

.form-consent .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  font-family: var(--font-body);
  letter-spacing: 0;
}

.form-consent .consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--teal-500);
  cursor: pointer;
  border-radius: 3px;
  padding: 0;
}

.form-consent .consent-label a {
  color: var(--teal-400);
  text-decoration: underline;
}

.privacy-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: none;
}

.privacy-notice a {
  color: var(--teal-400);
  text-decoration: underline;
}

.contact-form .btn-primary {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* -- Page hero (inner pages) ---------------------------- */
.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--navy-900);
  padding-top: 90px;
}

.page-hero.small {
  min-height: 28vh;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.page-hero h1 {
  margin-bottom: 0.75rem;
}

.page-hero-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 55ch;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* -- About page ----------------------------------------- */
.about-details {
  padding: 4rem 0;
  background-color: var(--navy-800);
}

.company-card {
  max-width: 900px;
}

.company-card h2 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

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

.details-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.detail-label {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.detail-value a {
  color: var(--teal-400);
  text-decoration: underline;
}

.who-we-are {
  padding: 4rem 0;
  background-color: var(--navy-700);
}

.who-we-serve {
  padding: 4rem 0;
  background-color: var(--navy-800);
}

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

.serve-item {
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.serve-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 191, 165, 0.3);
}

.serve-item h3 {
  margin-bottom: 0.6rem;
}

.serve-item p {
  font-size: 0.9rem;
  max-width: none;
}

.independence-statement {
  padding: 4rem 0;
  background-color: var(--navy-700);
}

.independence-box {
  max-width: 760px;
}

.independence-box h2 {
  margin-bottom: 1rem;
}

.independence-box p {
  font-size: 0.95rem;
  max-width: none;
}

/* -- Services page -------------------------------------- */
.service-detail {
  padding: 5rem 0;
  background-color: var(--navy-800);
}

.service-detail.alt-bg {
  background-color: var(--navy-700);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.two-col.reverse > :first-child {
  order: 2;
}

.two-col.reverse > :last-child {
  order: 1;
}

.service-detail-icon {
  width: 120px;
  height: 120px;
  color: var(--teal-500);
  justify-self: center;
}

.service-detail-icon svg {
  width: 100%;
  height: 100%;
}

.service-detail h2 {
  margin-bottom: 1rem;
}

.service-detail-list {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-detail-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.service-detail-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--teal-500);
}

.services-cta {
  padding: 4rem 0;
  background-color: var(--navy-900);
  text-align: center;
}

.services-cta h2 { margin-bottom: 0.75rem; }

.services-cta p {
  margin-inline: auto;
  color: var(--text-secondary);
}

.text-center { text-align: center; }

/* -- Cookie banner -------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--navy-900);
  border-top: 1px solid var(--glass-border);
  padding: 1.25rem 0;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.cookie-banner-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: none;
  margin: 0;
}

.cookie-banner-text a {
  color: var(--teal-400);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie-pref,
.btn-cookie-reject,
.btn-cookie-accept {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-cookie-pref {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-cookie-pref:hover {
  border-color: var(--teal-500);
  color: var(--teal-500);
}

.btn-cookie-reject {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-cookie-reject:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-cookie-accept {
  background-color: var(--teal-500);
  border: 1px solid var(--teal-500);
  color: #000;
}

.btn-cookie-accept:hover {
  background-color: var(--teal-400);
  border-color: var(--teal-400);
}

/* -- Cookie prefs panel --------------------------------- */
.cookie-prefs-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 15, 26, 0.85);
  backdrop-filter: blur(4px);
}

.cookie-prefs-panel[hidden] {
  display: none;
}

.cookie-prefs-inner {
  background: var(--navy-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  margin: 1rem;
}

.cookie-prefs-inner h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.cookie-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.cookie-pref-item > div strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.cookie-pref-item > div p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: none;
  margin: 0;
}

.toggle-always-on {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-500);
  white-space: nowrap;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* -- Toggle switch -------------------------------------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--navy-500);
  border-radius: 24px;
  transition: background-color var(--transition-fast);
  border: 1px solid var(--glass-border);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(0, 191, 165, 0.3);
  border-color: var(--teal-500);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--teal-500);
}

.cookie-prefs-actions {
  margin-top: 1.5rem;
}

.btn-save-prefs {
  background-color: var(--teal-500);
  color: #000;
  border: 2px solid var(--teal-500);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.75rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  width: 100%;
}

.btn-save-prefs:hover {
  background-color: var(--teal-400);
  border-color: var(--teal-400);
}

/* -- Cookie settings footer button ---------------------- */
.cookie-settings-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  margin-top: 0.75rem;
  display: inline-block;
  transition: color var(--transition-fast);
  text-decoration: underline;
}

.cookie-settings-btn:hover { color: var(--teal-400); }

/* -- Footer --------------------------------------------- */
.site-footer {
  background-color: var(--navy-900);
  border-top: 1px solid var(--glass-border);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--teal-500);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-links h4,
.footer-legal h4 {
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--teal-400); }

.footer-legal address {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-legal address a {
  color: var(--teal-400);
  transition: color var(--transition-fast);
}

.footer-legal address a:hover { color: var(--aqua-300); }

.footer-legal > p {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  max-width: none;
}

.footer-legal > p a {
  color: var(--teal-400);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding: 1.25rem 0;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: none;
}

/* -- Legal pages ---------------------------------------- */
.legal-content {
  padding: 3rem 0 5rem;
  background-color: var(--navy-800);
}

.legal-container {
  max-width: 760px;
}

.legal-container h2 {
  font-size: 1.25rem;
  color: var(--teal-400);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--glass-border);
}

.legal-container h2:first-child { margin-top: 0; }

.legal-container p {
  font-size: 0.93rem;
  margin-bottom: 0.75rem;
  max-width: none;
  color: var(--text-secondary);
}

.legal-container ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-container ul li {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.legal-container ul li strong {
  color: var(--text-primary);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

.legal-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--navy-700);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

.legal-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}

.legal-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

/* -- Error page ----------------------------------------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--navy-900);
  padding-top: 90px;
}

.error-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 0;
}

.error-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(6rem, 20vw, 12rem);
  color: var(--teal-500);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: -0.5rem;
}

.error-content h1 {
  margin-bottom: 0.75rem;
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-inline: auto;
}

.error-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -- Utility -------------------------------------------- */
.section-pad {
  padding: 5rem 0;
}

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

@media (max-width: 768px) {
  /* Header */
  .nav-toggle {
    display: flex;
  }

  #main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: min(300px, 85vw);
    background: var(--navy-900);
    border-left: 1px solid var(--glass-border);
    padding: 5rem 2rem 2rem;
    transition: right var(--transition-med);
    z-index: 99;
  }

  #main-nav.open {
    right: 0;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #main-nav ul li a {
    font-size: 1.1rem;
    padding: 0.6rem 0;
  }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .hero { min-height: auto; padding-bottom: 3rem; }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Why */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Serve */
  .serve-grid {
    grid-template-columns: 1fr;
  }

  /* Two-col */
  .two-col,
  .two-col.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .two-col.reverse > :first-child,
  .two-col.reverse > :last-child {
    order: unset;
  }

  .service-detail-icon {
    width: 80px;
    height: 80px;
    justify-self: start;
  }

  /* Contact */
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Details grid */
  .details-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand p { max-width: none; }

  /* Cookie */
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Legal table */
  .legal-table {
    font-size: 0.78rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.5rem 0.6rem;
  }

  /* Fact strip */
  .fact-strip {
    flex-wrap: wrap;
  }

  .fact-item {
    flex: 0 1 calc(50% - 0px);
  }

  /* H-scroll inner */
  .h-scroll-inner {
    padding: 0.5rem 1rem;
  }

  /* Page hero */
  .page-hero {
    min-height: 30vh;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .cookie-banner-actions {
    width: 100%;
  }

  .btn-cookie-pref,
  .btn-cookie-reject,
  .btn-cookie-accept {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .service-card {
    width: 260px;
  }
}
