/* ==========================================================================
   Riverside Data — main stylesheet
   Layout: riverside postcard — wide river photography, deep-navy "water"
   bands, and white cards that sit on top like stepping stones.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy: #0d2147;
  --navy-deep: #081733;
  --teal: #0f9b9a;
  --teal-bright: #2ec4c0;
  --mist: #eef5f6;

  --bg: #fbfdfd;
  --surface: #ffffff;
  --fg: #0d2147;
  --muted: #4c5d78;
  --line: #d9e5ea;
  --chip: #e6f3f3;

  --on-dark: #eaf3f7;
  --on-dark-muted: #a9bed2;

  --display: "Montserrat", system-ui, "Segoe UI", Arial, sans-serif;
  --body: "Figtree", system-ui, "Segoe UI", Arial, sans-serif;
  --script: "Caveat", "Segoe Script", "Bradley Hand", cursive;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --radius: 14px;
  --header-h: 72px;
}

/* Dark mode follows the visitor's operating-system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08152e;
    --surface: #0f2140;
    --fg: #e8f1f6;
    --muted: #a3b6cb;
    --line: #20375c;
    --chip: #12304a;
    --mist: #0b1b38;
    --teal: #2bb7b3;
    color-scheme: dark;
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

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

img { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, .hero-title, .page-title { font-family: var(--display); line-height: 1.08; margin: 0; text-wrap: balance; }
h1, .hero-title, .page-title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
h3 { font-size: 1.02rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }

.teal { color: var(--teal); }
.page-hero .teal, .section-dark .teal, .cta-band .teal { color: var(--teal-bright); }
.script { font-family: var(--script); font-weight: 600; }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::after { content: ""; width: 64px; height: 2px; background: currentColor; opacity: 0.6; }

.lede { color: var(--muted); font-size: 1.12rem; max-width: 58ch; }
.lede-gap { margin-top: 18px; }

.icon {
  width: 24px; height: 24px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 10px; border: 2px solid transparent;
  font-family: var(--display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.btn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.btn-primary {
  background: linear-gradient(135deg, #0f9b9a, #13837f); color: #fff;
  box-shadow: 0 8px 20px -10px rgba(15, 155, 154, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--teal); }
.btn-ghost-dark { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }
.btn-ghost-dark:hover { border-color: var(--teal-bright); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- 5. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); position: relative; }

.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; border-radius: 6px; }
.brand picture { display: block; }
.brand-logo { display: block; height: 52px; width: auto; max-width: none; }
.brand-footer .brand-logo { height: 68px; }
@media (max-width: 600px) { .brand-logo { height: 44px; } }
@media (max-width: 360px) { .brand-logo { height: 38px; } }

.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--muted); padding: 6px 0; }
.nav-links a:hover { color: var(--teal); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--teal);
}
.nav .btn { padding: 11px 18px; }

.menu-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: none; color: var(--fg);
}

@media (max-width: 1080px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter-r) 16px var(--gutter);
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(13, 33, 71, 0.3);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--teal); }
  .menu-toggle { display: inline-flex; }
  .nav > .btn { display: none; }
}

/* ---------- 6. Home hero ---------- */
.hero { padding-block: 56px 0; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: end; }
.hero-title .teal { display: block; }
h1.eyebrow { line-height: 1.4; text-wrap: wrap; }
.hero .lede { margin-top: 22px; }
.hero-aside { display: grid; gap: 14px; padding-bottom: 6px; }

.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pillar {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-family: var(--display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pillar .icon { color: var(--teal); }

.where { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.95rem; }
.where .icon { color: var(--teal); margin-top: 2px; }
.where strong { display: block; color: var(--fg); }

.photo-band { position: relative; margin-top: 48px; width: 100%; aspect-ratio: 1600 / 495; max-height: 520px; overflow: hidden; }
.photo-band picture { display: block; height: 100%; }
.photo-band img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.photo-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 28%, transparent 70%, rgba(13, 33, 71, 0.55) 100%);
}
.tagline {
  position: absolute; z-index: 1; right: max(24px, 6vw); bottom: clamp(14px, 4vw, 44px);
  color: #fff; font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1;
  transform: rotate(-5deg); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.tagline::after { content: ""; display: block; width: 70%; height: 4px; margin: 10px 0 0 22%; border-radius: 4px; background: var(--teal-bright); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .photo-band { aspect-ratio: 16 / 9; }
}

/* ---------- 7. Inner-page hero ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--on-dark);
}
.page-hero .wrap { position: relative; z-index: 1; padding-block: 72px 76px; }
.page-hero .page-title { font-size: clamp(2.2rem, 5vw, 3.8rem); color: #fff; max-width: 15ch; }
.page-hero .eyebrow { color: var(--teal-bright); }
.page-hero .lede { color: var(--on-dark-muted); margin-top: 20px; }
.page-hero-img {
  position: absolute; inset: 0 0 0 auto; width: 58%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  opacity: 0.85;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy) 35%, rgba(13, 33, 71, 0.25) 100%);
}
.breadcrumb { display: flex; gap: 8px; margin-bottom: 22px; font-size: 0.88rem; color: var(--on-dark-muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

@media (max-width: 760px) {
  .page-hero-img { width: 100%; opacity: 0.35; -webkit-mask-image: none; mask-image: none; }
  .page-hero::after { background: linear-gradient(180deg, rgba(13,33,71,0.6), var(--navy)); }
}

/* ---------- 8. Value strip ---------- */
.values { background: var(--navy); color: var(--on-dark); }
.values .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 26px; }
.value { display: flex; gap: 14px; align-items: center; padding: 6px 20px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.value:first-child { border-left: 0; padding-left: 0; }
.value .icon { width: 30px; height: 30px; color: var(--teal-bright); }
.value b { display: block; font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-bright); }
.value span { font-size: 0.92rem; color: var(--on-dark-muted); }

@media (max-width: 860px) {
  .values .wrap { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .value:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 480px) {
  .values .wrap { grid-template-columns: 1fr; }
  .value { border-left: 0; padding-left: 0; }
}

/* ---------- 9. Sections ---------- */
.section { padding-block: 96px; }
.section-mist { background: var(--mist); }
.section-dark {
  background: radial-gradient(1200px 500px at 85% -10%, #155b77 0%, transparent 60%), var(--navy);
  color: var(--on-dark);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--teal-bright); }
.section-dark .lede { color: var(--on-dark-muted); }

.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 48px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- 10. Service cards ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color 0.2s, transform 0.2s;
}
a.service:hover { border-color: var(--teal); transform: translateY(-3px); }
.service p { color: var(--muted); font-size: 0.98rem; }
.service ul { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
.service li { display: flex; gap: 8px; align-items: baseline; }
.service li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); transform: translateY(-2px); }
.service .more {
  margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal);
}
.service .more .icon { width: 16px; height: 16px; stroke-width: 2.2; }

.badge {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1fb3b0, #0d2147); color: #fff;
}
.badge .icon { width: 26px; height: 26px; }

@media (max-width: 1100px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }

/* Results panel (services page) */
.results {
  display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: center;
  margin-top: 56px; padding: 36px; border-radius: var(--radius);
  background: var(--navy); color: var(--on-dark);
}
.results h3 { color: var(--teal-bright); font-size: 1.2rem; line-height: 1.3; }
.results ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.results li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.results .icon { color: var(--teal-bright); width: 28px; height: 28px; }
@media (max-width: 860px) {
  .results { grid-template-columns: 1fr; }
  .results ul { grid-template-columns: 1fr; }
}

/* ---------- 11. AI page ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); margin: 8px 0 56px; padding: 0; list-style: none; counter-reset: step; }
.flow li { position: relative; padding: 18px 16px 0 0; }
.flow li::before {
  counter-increment: step; content: "0" counter(step);
  display: block; margin-bottom: 10px;
  font-family: var(--display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.14em; color: var(--teal-bright);
}
.flow li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--teal-bright), rgba(46, 196, 192, 0.15)); }
.flow b { display: block; font-family: var(--display); font-size: 1.15rem; color: #fff; }
.flow span { font-size: 0.92rem; color: var(--on-dark-muted); }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr 1fr; gap: 22px 16px; } }

.ai-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius);
}
.ai-item { display: flex; gap: 16px; padding: 28px; background: var(--navy); }
.ai-item .icon { width: 30px; height: 30px; color: var(--teal-bright); }
.ai-item h3 { margin-bottom: 8px; }
.ai-item p { color: var(--on-dark-muted); font-size: 0.95rem; }
@media (max-width: 980px) { .ai-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .ai-grid { grid-template-columns: 1fr; } }

/* Split layout used on several pages */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-top { align-items: start; }
.rounded-photo { border-radius: var(--radius); overflow: hidden; }
.rounded-photo img { display: block; width: 100%; height: auto; object-fit: cover; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.checklist { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--teal); margin-top: 2px; }
.checklist b { display: block; }
.checklist span { color: var(--muted); font-size: 0.95rem; }

/* Machine learning models & lifecycle (AI page) */
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.model-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.model-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.model-top .icon { width: 30px; height: 30px; color: var(--teal); }
.model-q { font-family: var(--script); font-size: 1.45rem; line-height: 1; color: var(--teal); }
.model-card p { color: var(--muted); font-size: 0.98rem; }
.model-tech { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.model-tech::before { content: "Typical techniques: "; font-weight: 400; }
@media (max-width: 980px) { .model-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .model-grid { grid-template-columns: 1fr; } }

.lifecycle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.lifecycle li { position: relative; padding-top: 18px; border-top: 2px solid var(--teal); }
.lifecycle li::before {
  counter-increment: stage; content: counter(stage, decimal-leading-zero);
  display: block; margin-bottom: 8px;
  font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; color: var(--teal);
}
.lifecycle b { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 4px; }
.lifecycle span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .lifecycle { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .lifecycle { grid-template-columns: 1fr; } }

.flow-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .flow-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .flow-4 { grid-template-columns: 1fr; } }
.tech-chips.tech-chips-dark li { background: rgba(255, 255, 255, 0.08); color: var(--teal-bright); }

/* Credential badge (home page) */
.credential {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 26px; padding: 16px 18px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--teal);
}
.credential .icon { width: 28px; height: 28px; color: var(--teal); }
.credential b { display: block; font-family: var(--display); font-size: 0.95rem; }
.credential span { color: var(--muted); font-size: 0.92rem; }

/* ---------- 12. Training ---------- */
.quote { margin-top: 26px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; color: var(--teal); transform: rotate(-2deg); transform-origin: left; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.format { padding: 14px; border-radius: 12px; background: var(--chip); color: var(--muted); font-size: 0.88rem; }
.format b { display: block; margin-bottom: 3px; font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); }

.courses { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.courses li { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.courses b { font-family: var(--display); font-weight: 700; font-size: 0.92rem; }
.courses span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 520px) {
  .courses li { grid-template-columns: 1fr; gap: 2px; }
  .formats { grid-template-columns: 1fr; }
}

/* ---------- 13. Technologies ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button {
  min-height: 44px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font: 600 0.88rem var(--body);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.filters button:hover { border-color: var(--teal); }
.filters button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tool { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tool b { font-family: var(--display); font-weight: 700; font-size: 1.02rem; }
.tool span { font-size: 0.86rem; color: var(--muted); }
.tool i {
  align-self: flex-start; margin-top: 8px; padding: 3px 8px; border-radius: 6px;
  font-style: normal; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); background: var(--chip);
}
@media (max-width: 980px) { .tools { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .tools { grid-template-columns: 1fr 1fr; } }

/* ---------- 14. Why us ---------- */
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 34px; }
.reason { display: flex; gap: 14px; }
.reason .icon { width: 28px; height: 28px; color: var(--teal); }
.reason b { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase; }
.reason span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 520px) { .reasons { grid-template-columns: 1fr; } }

/* ---------- 15. CTA band ---------- */
.cta-band { background: var(--navy); color: var(--on-dark); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; padding-block: 56px; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: var(--on-dark-muted); margin-top: 8px; }
.cta-band .ctas { margin-top: 0; }

/* ---------- 16. Contact ---------- */
.contact-cards { display: grid; gap: 12px; }
.ccard {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.ccard > .icon { width: 26px; height: 26px; color: var(--teal); }
.ccard small { display: block; font-family: var(--display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ccard a, .ccard strong { font-size: 1.1rem; font-weight: 600; text-decoration: none; word-break: break-word; }
.ccard a:hover { color: var(--teal); }
.ccard em { display: block; font-style: normal; font-size: 0.88rem; color: var(--muted); }
.copy-btn {
  min-width: 74px; min-height: 44px; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font: 600 0.78rem var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
}
.copy-btn:hover { border-color: var(--teal); }
@media (max-width: 480px) {
  .ccard { grid-template-columns: auto 1fr; }
  .ccard .copy-btn { grid-column: 2; justify-self: start; }
}

.contact-photo { position: relative; margin-top: 24px; border-radius: var(--radius); overflow: hidden; }
.contact-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.contact-photo blockquote {
  position: absolute; left: 18px; right: 18px; bottom: 18px; margin: 0; padding: 18px 20px;
  border-left: 3px solid var(--teal-bright); border-radius: 12px;
  background: rgba(13, 33, 71, 0.85); backdrop-filter: blur(6px); color: #fff; font-size: 1.1rem; line-height: 1.35;
}

/* Form */
.form-card { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.form-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  font: 400 1rem var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); }
.field .error { min-height: 1.1em; font-size: 0.84rem; color: #d64545; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #d64545; }
.form-note { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--chip); font-size: 0.95rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px; } }

/* ---------- 16b. Fun page & game ---------- */
.game-section { padding-block: 72px 88px; }
.game-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: 28px; }
.game-steps { display: grid; gap: 8px; margin: 0; padding-left: 1.3em; color: var(--on-dark-muted); }
.game-steps b { color: #fff; font-weight: 600; }
.game-steps li::marker { color: var(--teal-bright); font-family: var(--display); font-weight: 700; }
.game-note { color: var(--on-dark-muted); font-size: 0.95rem; }
.game-note a { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--teal-bright); font-weight: 600; text-decoration: none; }
.game-note a:hover { text-decoration: underline; }
.game-note .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.game-frame {
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid rgba(46, 196, 192, 0.35);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(46, 196, 192, 0.06);
  background: #07111d;
}
.tech-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 44px 0 0; padding: 0; list-style: none; }
.tech-chips li { padding: 6px 14px; border-radius: 999px; background: var(--chip); color: var(--teal); font-weight: 600; font-size: 0.85rem; }
@media (max-width: 860px) { .game-intro { grid-template-columns: 1fr; } }

/* Home page teaser */
.game-teaser {
  position: relative; display: grid; place-items: center; gap: 18px; min-height: 320px; padding: 32px;
  border-radius: var(--radius); text-decoration: none; overflow: hidden;
  background: radial-gradient(circle at 20% 0%, rgba(73, 165, 167, 0.35), transparent 60%), #07111d; color: #edf3f8;
  transition: transform 0.25s;
}
.game-teaser:hover { transform: translateY(-4px); }
.game-teaser::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(104, 226, 223, 0.25); border-radius: 10px; pointer-events: none; }
.gt-label { font-family: var(--display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.24em; color: #68e2df; }
.gt-hands { display: flex; gap: 22px; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; }
.gt-hands span { display: inline-block; animation: gt-bob 2.4s ease-in-out infinite; }
.gt-hands span:nth-child(2) { animation-delay: 0.3s; }
.gt-hands span:nth-child(3) { animation-delay: 0.6s; }
.gt-score { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; letter-spacing: 0.14em; color: #8da0b2; }
.gt-score b { color: #c8f56d; font-weight: 500; font-size: 1.1rem; }
@keyframes gt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- 16c. Local SEO pages, FAQ, privacy, 404 ---------- */
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.area-card { display: flex; gap: 16px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.area-card .icon { width: 28px; height: 28px; color: var(--teal); }
.area-card h3 { margin-bottom: 6px; }
.area-card p { color: var(--muted); }
@media (max-width: 700px) { .area-grid { grid-template-columns: 1fr; } }

.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq-item summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer;
  font-weight: 600; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-family: var(--display); font-weight: 700; color: var(--teal); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; color: var(--muted); }
.lede a, .where a, .ccard em a { color: var(--teal); font-weight: 600; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 12px; }
.prose ul { display: grid; gap: 10px; margin: 12px 0 0; padding-left: 1.2em; }
.prose b { color: var(--fg); }
.prose a { color: var(--teal); font-weight: 600; }
.prose code { font-size: 0.9em; padding: 1px 6px; border-radius: 4px; background: var(--chip); }
.prose-note { font-size: 0.9rem; }

.notfound { display: grid; justify-items: start; gap: 16px; padding-block: 40px; }
.notfound-script { font-size: 2rem; color: var(--teal); }

/* Mobile call button in header */
.nav-call { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 8px; border: 1px solid var(--line); color: var(--teal); }
@media (max-width: 1080px) { .nav-call { display: inline-flex; margin-left: auto; } }

.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.footer-bottom a { text-decoration: underline; }

/* Cookie consent banner */
.consent {
  position: fixed; z-index: 90; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-left: auto; padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); color: var(--fg); border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(8, 23, 51, 0.45);
}
.consent h2 { font-size: 1rem; text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.consent p { color: var(--muted); font-size: 0.92rem; }
.consent a { color: var(--teal); font-weight: 600; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.consent .btn { padding: 11px 18px; }

/* Photo captions and credits (Creative Commons attribution) */
figure.rounded-photo { margin: 0; }
.rounded-photo figcaption { padding: 10px 2px 0; color: var(--muted); font-size: 0.82rem; }
.photo-credit {
  position: absolute; z-index: 2; left: max(12px, env(safe-area-inset-left, 0px)); bottom: 8px;
  font-size: 0.75rem; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.photo-credit-hero { left: auto; right: max(12px, env(safe-area-inset-right, 0px)); }
.photo-credit a, .photo-credit-inline a { color: inherit; }
.photo-credit-inline { display: block; margin-top: 2px; font-size: 0.75rem; }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark-muted); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.site-footer p { margin-top: 16px; max-width: 34ch; }
.site-footer h3 { color: #fff; font-size: 0.78rem; letter-spacing: 0.14em; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 20px; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 17b. Touch, tablet and small-screen comfort ---------- */
/* Bigger tap areas for links that sit on their own line (layout unchanged) */
.breadcrumb a, .game-note a, .where a, .footer-bottom a, .footer-bottom .link-button, .ccard a {
  display: inline-block; padding-block: 11px; margin-block: -11px;
}
.site-footer ul a, .site-footer ul li { display: inline-flex; align-items: center; min-height: 44px; }
.brand { min-height: 44px; }
html { -webkit-tap-highlight-color: color-mix(in srgb, var(--teal) 20%, transparent); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, .btn, .filters button, .copy-btn, summary { touch-action: manipulation; }

/* Lift-on-hover effects only where there's a real mouse, so they don't stick after a tap */
@media (hover: none) {
  .btn-primary:hover, a.service:hover, .game-teaser:hover { transform: none; }
}

/* Mobile menu: scrolls if the screen is short, two columns on a sideways phone */
@media (max-width: 1080px) {
  .nav-links { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 1080px) and (max-height: 520px) and (orientation: landscape) {
  .nav-links.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
/* Short screens (phones held sideways): slimmer sticky header */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 58px; }
  .brand-logo { height: 40px; }
  .hero { padding-block: 32px 0; }
  .page-hero .wrap { padding-block: 44px 48px; }
}
/* Very narrow phones (e.g. iPhone SE) */
@media (max-width: 380px) {
  .section { padding-block: 72px; }
  .btn { padding: 14px 18px; }
  .ctas .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- 18. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
