/* Rockwill company website: one stylesheet, no JS, no external resources.
   Cool brand palette (owner-approved). Gradient only on the hero H1, logo tile, card bar and
   active-nav underline; legal pages and body text use solid colours.

   WCAG 2.x contrast (relative luminance, 2026-10-27/28). Text >= 4.5:1, UI/graphics >= 3:1.
   Format: foreground on background ratio; "bg" = --bg, "sf" = --surface.
   LIGHT (bg #F6F7FF, sf #FFFFFF)
     text #1B1E33 bg 15.36 sf 16.40 | muted #545A72 bg 6.38 sf 6.81 (also hero phone outline)
     primary #1F5BFF bg 4.92 sf 5.25 (links, focus) | primary-hover #1A4AD6 bg 6.57 sf 7.01
     on-primary #FFFFFF on primary 5.25, on hover 7.01 (buttons, skip link)
     secondary #7C3AED bg 5.34 (H1 gradient end; midpoint #4E4BF6 5.37) | accent-text #0E7490 bg 5.02 sf 5.36
     logo: tile #1F5BFF/#7C3AED vs bg 4.92/5.34; white R on tile 5.25/5.70; wordmark #1B1E33 bg 15.36
     nav: hover text+underline #1A4AD6 bg 6.57; active text #1F5BFF bg 4.92; active gradient ends bg 4.92/5.34
     card+contact hover border #1F5BFF sf 5.25 bg 4.92; card top-bar ends sf 5.25/5.70, bg 4.92/5.34
     TOC active text and bar #1F5BFF sf 5.25
     icon tile (12%, hover 20%) on white card #E4EBFF/#EFE7FD 4.41/4.38 (hover 3.91/3.89);
       on bg card #DCE4FF/#E7E0FD 4.15/4.12 (hover 3.70/3.66); contact icons #1F5BFF bg 4.92
     hero tiles: white icon on gradient #1F5BFF/#7C3AED 5.25/5.70; #1F5BFF icon on sf tile 5.25
   DARK (bg #0D0F1F, sf #161935)
     text #E8EAFB bg 15.92 sf 14.37 | muted #A3A8C6 bg 8.12 sf 7.33 (also hero phone outline)
     primary #7C9BFF bg 7.23 sf 6.52 (links, focus) | primary-hover #A3B8FF bg 9.82 sf 8.87
     on-primary #0D0F1F on primary 7.23, on hover 9.82 (white on #7C9BFF 2.63, rejected)
     secondary #A78BFA bg 6.98 (H1 gradient end; midpoint #9293FD 7.07) | accent-text #5EEAD4 bg 12.84 sf 11.59
     logo (logo-dark.svg): tile vs bg 3.62/3.33; wordmark #E8EAFB bg 15.92
     nav: hover text+underline #A3B8FF bg 9.82; active text #7C9BFF bg 7.23; active gradient ends bg 7.23/6.98
     card+contact hover border #7C9BFF sf 6.52 bg 7.23; card top-bar ends sf 6.52/6.30, bg 7.23/6.98
     TOC active text and bar #7C9BFF sf 6.52
     icon tile (16%, hover 26%) on sf card #262E55/#2D2B55 4.98/5.03 (hover 4.07/4.12);
       on bg card #1F2543/#262342 5.69/5.70 (hover 4.66/4.70); contact icons #7C9BFF bg 7.23
     hero tiles: #0D0F1F icon on gradient #7C9BFF/#A78BFA 7.23/6.98; #7C9BFF icon on sf tile 6.52
   Decorative only (never text, never needed to identify a component): --accent-deco
   (#22B8CF / #5EEAD4), --border, --shadow-lift. */

:root {
  color-scheme: light dark;
  --bg: #F6F7FF;
  --surface: #FFFFFF;
  --text: #1B1E33;
  --muted: #545A72;
  --border: #DDE1F5;
  --primary: #1F5BFF;
  --primary-hover: #1A4AD6;
  --on-primary: #FFFFFF;
  --secondary: #7C3AED;
  --accent-text: #0E7490;
  --accent-deco: #22B8CF;
  --focus: var(--primary);
  --gradient: linear-gradient(135deg, #1F5BFF, #7C3AED);
  --shadow-lift: 0 12px 28px -14px rgba(31, 91, 255, 0.45), 0 6px 14px -10px rgba(124, 58, 237, 0.35);
  --dur: 180ms;
  --dur-fast: 150ms;
  --icon-tile-bg: linear-gradient(135deg, rgb(31 91 255 / 0.12), rgb(124 58 237 / 0.12));
  --icon-tile-bg-strong: linear-gradient(135deg, rgb(31 91 255 / 0.2), rgb(124 58 237 / 0.2));

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.56rem, 1.35rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.25rem, 1.7rem + 3vw, 4rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --section-pad: clamp(3rem, 8vw, 6rem);
  --r: 16px;
  --r-sm: 10px;
  --target: 44px;
  --header-h: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0F1F;
    --surface: #161935;
    --text: #E8EAFB;
    --muted: #A3A8C6;
    --border: #272B4D;
    --primary: #7C9BFF;
    --primary-hover: #A3B8FF;
    --on-primary: #0D0F1F;
    --secondary: #A78BFA;
    --accent-text: #5EEAD4;
    --accent-deco: #5EEAD4;
    --gradient: linear-gradient(135deg, #7C9BFF, #A78BFA);
    --shadow-lift: 0 12px 30px -12px rgba(124, 155, 255, 0.4), 0 6px 16px -10px rgba(167, 139, 250, 0.4);
    --icon-tile-bg: linear-gradient(135deg, rgb(124 155 255 / 0.16), rgb(167 139 250 / 0.16));
    --icon-tile-bg-strong: linear-gradient(135deg, rgb(124 155 255 / 0.26), rgb(167 139 250 / 0.26));
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--step-3);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--step-1);
}

p,
ul,
ol,
address,
table {
  margin: 0 0 var(--s-4);
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: var(--s-2);
}

address {
  font-style: normal;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

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

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

/* Skip link: off-screen until focused */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 20; /* above the sticky header (z-index 10) */
  padding: var(--s-3) var(--s-4);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  border-radius: var(--r-sm);
}

.skip-link:focus {
  top: var(--s-4);
}

/* Header */
/* Sticky: stays visible while scrolling; html scroll-padding keeps anchor targets clear of it */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-6);
  padding-block: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
}

.brand img {
  display: block;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li + li {
  margin-top: 0;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding-inline: var(--s-3);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm);
}

.nav-list a:hover {
  color: var(--primary-hover);
}

/* Narrow screens: compact two-row header, nav on one row that scrolls sideways instead of wrapping */
@media (max-width: 759px) {
  :root {
    --header-h: 6.5rem;
  }

  .site-header .container {
    row-gap: 0;
    padding-block: var(--s-1);
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
  }

  .nav-list {
    flex-wrap: nowrap;
    gap: 0;
  }

  .nav-list a {
    padding-inline: 0.3125rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  /* The scrolling nav clips anything outside it, so draw the focus ring inside the link */
  .nav-list a:focus-visible {
    outline-offset: -3px;
  }
}

/* Small phones (~360px): one step smaller so all five links still fit on one row */
@media (max-width: 380px) {
  .nav-list a {
    font-size: 0.8125rem;
  }
}

/* Short viewports (landscape phones): the header scrolls away instead of covering ~30% of
   the screen, so anchors need no offset. 0px, not 0, because --header-h is used in calc(). */
@media (max-height: 500px) {
  :root {
    --header-h: 0px;
  }

  .site-header {
    position: static;
  }
}

/* Sections */
.section {
  padding-block: var(--section-pad);
}

.section-alt {
  background: var(--surface);
}

.section-intro {
  max-width: 65ch;
  color: var(--muted);
  font-size: var(--step-1);
}

/* Limit line length without narrowing the container (keeps the left edge aligned). */
.prose > * {
  max-width: 65ch;
}

/* Split: heading column + content column on wide screens, stacked on narrow ones */
.split {
  display: grid;
  gap: var(--s-6) var(--s-12);
}

.split > h2,
.split > :first-child > :last-child {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }

  .split .identity {
    max-width: none;
  }
}

/* Hero */
.hero {
  padding-block: clamp(4rem, 12vw, 8rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 3px;
  background: var(--accent-deco);
  border-radius: 2px;
}

.hero h1 {
  max-width: 20ch;
}

/* Hero visual: decorative inline SVG (phone, two orbit rings, six icon tiles, connection lines), themed by tokens */
.hero-grid {
  display: grid;
  gap: var(--s-8);
  align-items: center;
}

.hero-visual {
  width: min(100%, 280px);
  height: auto;
  justify-self: center;
}

.hv-a { stop-color: var(--primary); }
.hv-b { stop-color: var(--secondary); }
.hv-phone { fill: var(--surface); stroke: var(--muted); stroke-width: 3; }
.hv-dim { fill: var(--border); }
.hv-teal { fill: var(--accent-deco); }
.hv-icon { stroke: var(--on-primary); }
.hv-icon-p { stroke: var(--primary); }
.hv-tile-s { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.hv-ring { fill: none; stroke: var(--primary); stroke-opacity: 0.3; stroke-width: 1.5; }
.hv-dash { stroke-dasharray: 2 7; stroke-linecap: round; }
.hv-node-a { fill: var(--primary); }
.hv-node-b { fill: var(--secondary); }

/* Motion (WCAG 2.2.2): one 4.5 s sway on load (inner orbit ends at 4.8 s), then rest at the
   drawn layout; loops only while hovered. Both orbits sway the same way (inner further) about the
   phone's centre so tiles never collide; each tile counter-rotates, so icons stay upright. Dash period 10, offset -40: the flow ends seamlessly. */
.hv-o1,
.hv-o2 { transform-box: view-box; transform-origin: 220px 220px; animation: hv-sway 4.5s ease-in-out; }
.hv-tile { transform-box: fill-box; transform-origin: center; animation: hv-sway 4.5s ease-in-out; }
.hv-o1 { --a: 12deg; }
.hv-o1 .hv-tile { --a: -12deg; }
.hv-o2 { --a: 18deg; }
.hv-o2 .hv-tile { --a: -18deg; }
.hv-o2,
.hv-o2 .hv-tile { animation-delay: 0.3s; }
.hv-line { fill: none; stroke-width: 1.5; stroke-opacity: 0.55; stroke-dasharray: 4 6; animation: hv-flow 4.5s linear; }

@media (hover: hover) {
  .hero-visual:hover :is(.hv-o1, .hv-o2, .hv-tile, .hv-line) { animation-iteration-count: infinite; }
}

@keyframes hv-sway {
  50% { transform: rotate(var(--a)); }
}

@keyframes hv-flow {
  to { stroke-dashoffset: -40; }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); }
  .hero-visual { width: 100%; }
}

@media (max-width: 380px) {
  .hero-visual { width: min(100%, 220px); }
}

/* Gradient text: solid --primary fallback; both gradient ends pass AA on --bg. */
.gradient-text {
  color: var(--primary);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .gradient-text {
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Print: light tokens (paper is white whatever the screen scheme) and solid H1 text,
   because backgrounds, and with them the gradient fill, are not printed by default. */
@media print {
  :root {
    color-scheme: light;
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --text: #1B1E33;
    --muted: #545A72;
    --border: #DDE1F5;
    --primary: #1F5BFF;
    --primary-hover: #1A4AD6;
    --on-primary: #FFFFFF;
    --secondary: #7C3AED;
    --accent-text: #0E7490;
    --accent-deco: #22B8CF;
  }

  .gradient-text {
    background: none;
    color: var(--text);
    -webkit-text-fill-color: var(--text);
  }
}

.lede {
  max-width: 60ch;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: var(--s-2) var(--s-6);
  border: 2px solid var(--primary);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
}

.btn:hover {
  text-decoration: underline;
}

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s-6);
  margin: var(--s-8) 0 0;
  padding: 0;
  list-style: none;
}

.grid > li + li {
  margin-top: 0;
}

.card {
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.card p:last-child {
  margin-bottom: 0;
}

.section-alt .card {
  background: var(--bg);
}

/* Icons: Lucide line icons as inline SVG (stroke = currentColor), decorative (aria-hidden) */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--s-4);
  border-radius: 12px;
  background: var(--icon-tile-bg);
  color: var(--primary);
}

.icon-tile svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

/* Contact lines: 20px icon column, text column; a line without an icon aligns with the text */
.contact-lines p {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: var(--s-3);
  align-items: start;
}

.contact-lines span {
  grid-column: 2;
}

.contact-lines svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25em;
  margin-top: calc((1lh - 1.25rem) / 2); /* centre on the first text line */
  color: var(--primary);
}

/* Contact / identity block (inherits the background of the section it sits in) */
.identity {
  max-width: 40rem;
  padding: var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.identity p {
  margin-bottom: var(--s-2);
}

.identity p:last-child {
  margin-bottom: 0;
}

.legal-name {
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding-block: var(--s-12);
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s-6) var(--s-12);
}

.site-footer address p {
  margin-bottom: var(--s-1);
}

.site-footer .legal-name {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target);
  min-height: var(--target);
}

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

  .footer-links {
    justify-content: flex-end;
  }
}

.copyright {
  margin: var(--s-6) 0 0;
}

/* Simple pages (404) */
.page-narrow {
  padding-block: var(--section-pad);
}

.page-narrow > * {
  max-width: 65ch;
}

/* Legal pages: TOC + article */
.legal {
  display: grid;
  gap: var(--s-8);
  padding-block: var(--s-12) var(--section-pad);
}

.legal-header {
  max-width: 70ch;
}

.legal-header h1 {
  font-size: var(--step-3);
}

.legal-header .legal-updated {
  margin-top: calc(-1 * var(--s-2));
  color: var(--muted);
  font-size: 0.875rem;
}

.toc {
  align-self: start;
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: var(--step--1);
}

.toc summary {
  display: flex;
  align-items: center;
  min-height: var(--target);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

/* Visible open/closed cue; the empty alt text after "/" keeps it out of the accessibility tree
   (the first declaration is the fallback for browsers without content alt text). */
.toc summary::after {
  content: "+";
  content: "+" / "";
  margin-left: auto;
  padding-left: var(--s-3);
  color: var(--primary);
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1;
}

.toc details[open] > summary::after {
  content: "\2212";
  content: "\2212" / "";
}

.toc ol {
  margin: 0 0 var(--s-2);
  padding-left: 1.5rem;
}

.toc li + li {
  margin-top: 0;
}

/* Each TOC link is a full 44px touch target; no extra padding keeps the list compact. */
.toc a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--target);
}

.legal-body {
  max-width: 70ch;
  min-width: 0;
}

.legal-body h2 {
  margin-top: var(--s-12);
  font-size: var(--step-2);
  scroll-margin-top: var(--s-6);
}

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

.legal-body h3 {
  margin-top: var(--s-8);
}

@media (min-width: 900px) {
  .legal {
    grid-template-columns: 16rem minmax(0, 1fr);
    align-items: start;
  }

  /* Title, intro and article share one left edge; the TOC sits beside them */
  .legal-header {
    grid-column: 2;
    grid-row: 1;
  }

  .toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + var(--s-4));
    max-height: calc(100vh - var(--header-h) - 2rem);
    overflow-y: auto;
  }

  .legal-body {
    grid-column: 2;
  }
}

/* Tables (wrapped so a wide table scrolls instead of breaking the layout) */
.table-wrap {
  margin: 0 0 var(--s-6);
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

/* Wrappers are focusable (tabindex="0") so keyboard users can scroll a wide table. */
.table-wrap:focus-visible {
  border-color: var(--focus);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.table-wrap table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
}

thead th {
  border-bottom-width: 2px;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

caption {
  padding: var(--s-3) var(--s-4) 0;
  color: var(--muted);
  text-align: left;
}

/* Callout */
.note {
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-deco);
  border-radius: var(--r-sm);
}

.note p:last-child {
  margin-bottom: 0;
}

/* ---------- Interaction effects (CSS only, no JS) ----------
   Motion uses transform, opacity, box-shadow and border-color only, so nothing shifts layout.
   Hover-only effects sit in @media (hover: hover); focus effects apply on every device;
   prefers-reduced-motion removes every transform and transition (see the end of this file). */

/* Nav underline: grows from the centre on hover/focus. State is passed through custom
   properties so the active list below is written once. */
.nav-list a::after {
  content: "";
  position: absolute;
  inset-inline: var(--s-3);
  bottom: 0.5rem;
  height: var(--underline-h, 2px);
  border-radius: 2px;
  background: var(--underline-bg, currentColor);
  opacity: var(--underline-on, 0);
  transform: scaleX(var(--underline-on, 0));
  transition: transform var(--dur) ease, opacity var(--dur) ease;
}

@media (max-width: 759px) {
  .nav-list a::after {
    inset-inline: 0.3125rem;
  }
}

.nav-list a:focus-visible {
  --underline-on: 1;
}

@media (hover: hover) {
  .nav-list a:hover {
    --underline-on: 1;
  }
}

/* Active item: the current page (static aria-current), or the home section the visitor
   jumped to (:target). The mark stays until another item is chosen (no scroll-spy). */
.nav-list a[aria-current="page"],
body:has(section#about:target) .nav-list a[href="/#about"],
body:has(section#what-we-do:target) .nav-list a[href="/#what-we-do"],
body:has(section#principles:target) .nav-list a[href="/#principles"],
body:has(section#contact:target) .nav-list a[href="/#contact"] {
  color: var(--primary);
  --underline-on: 1;
  --underline-h: 3px;
  --underline-bg: var(--gradient);
}

/* Buttons: smooth colour change and a slight lift */
.btn {
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
    color var(--dur-fast) ease, transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
  }
}

/* Cards and the home contact block: lift, --primary border, soft shadow, gradient top bar */
.card,
#contact .identity {
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease, border-color var(--dur) ease;
}

.card::before,
#contact .identity::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--dur) ease;
}

.card:focus-within,
#contact .identity:focus-within {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lift);
}

.card:focus-within::before,
#contact .identity:focus-within::before {
  opacity: 1;
}

.card:focus-within .icon-tile {
  background: var(--icon-tile-bg-strong);
}

@media (hover: hover) {
  .card:hover,
  #contact .identity:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lift);
  }

  .card:hover::before,
  #contact .identity:hover::before {
    opacity: 1;
  }

  .card:hover .icon-tile {
    background: var(--icon-tile-bg-strong);
  }
}

/* Legal TOC (light treatment): mark the link whose section is the current :target.
   CSS cannot match an id to an href generically, so there is one selector per TOC id
   across privacy-policy, terms, delete-account and support. Tables and prose stay static. */
.toc a::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.625rem;
  bottom: 0.625rem;
  width: 3px;
  border-radius: 2px;
  background: var(--toc-mark, transparent);
}

.legal:has(#who-we-are:target) .toc a[href="#who-we-are"],
.legal:has(#summary:target) .toc a[href="#summary"],
.legal:has(#data:target) .toc a[href="#data"],
.legal:has(#obligatory:target) .toc a[href="#obligatory"],
.legal:has(#purposes-legal-bases:target) .toc a[href="#purposes-legal-bases"],
.legal:has(#ads:target) .toc a[href="#ads"],
.legal:has(#analytics:target) .toc a[href="#analytics"],
.legal:has(#camera-ai:target) .toc a[href="#camera-ai"],
.legal:has(#sharing:target) .toc a[href="#sharing"],
.legal:has(#third-party-providers:target) .toc a[href="#sharing"],
.legal:has(#transfers:target) .toc a[href="#transfers"],
.legal:has(#retention:target) .toc a[href="#retention"],
.legal:has(#security:target) .toc a[href="#security"],
.legal:has(#children:target) .toc a[href="#children"],
.legal:has(#rights:target) .toc a[href="#rights"],
.legal:has(#data-deletion:target) .toc a[href="#data-deletion"],
.legal:has(#cookies:target) .toc a[href="#cookies"],
.legal:has(#third-party-links:target) .toc a[href="#third-party-links"],
.legal:has(#changes:target) .toc a[href="#changes"],
.legal:has(#contact:target) .toc a[href="#contact"],
.legal:has(#about-these-terms:target) .toc a[href="#about-these-terms"],
.legal:has(#app-stores:target) .toc a[href="#app-stores"],
.legal:has(#eligibility:target) .toc a[href="#eligibility"],
.legal:has(#accounts:target) .toc a[href="#accounts"],
.legal:has(#licence:target) .toc a[href="#licence"],
.legal:has(#conduct:target) .toc a[href="#conduct"],
.legal:has(#photos-ai:target) .toc a[href="#photos-ai"],
.legal:has(#purchases:target) .toc a[href="#purchases"],
.legal:has(#subscriptions:target) .toc a[href="#subscriptions"],
.legal:has(#consumer-rights:target) .toc a[href="#consumer-rights"],
.legal:has(#ads-third-parties:target) .toc a[href="#ads-third-parties"],
.legal:has(#intellectual-property:target) .toc a[href="#intellectual-property"],
.legal:has(#termination:target) .toc a[href="#termination"],
.legal:has(#disclaimers:target) .toc a[href="#disclaimers"],
.legal:has(#liability:target) .toc a[href="#liability"],
.legal:has(#governing-law:target) .toc a[href="#governing-law"],
.legal:has(#general:target) .toc a[href="#general"],
.legal:has(#before-you-delete:target) .toc a[href="#before-you-delete"],
.legal:has(#in-the-app:target) .toc a[href="#in-the-app"],
.legal:has(#by-email:target) .toc a[href="#by-email"],
.legal:has(#verification:target) .toc a[href="#verification"],
.legal:has(#deleted-and-kept:target) .toc a[href="#deleted-and-kept"],
.legal:has(#timing:target) .toc a[href="#timing"],
.legal:has(#partial-deletion:target) .toc a[href="#partial-deletion"],
.legal:has(#questions:target) .toc a[href="#questions"],
.legal:has(#contact-us:target) .toc a[href="#contact-us"],
.legal:has(#what-to-include:target) .toc a[href="#what-to-include"],
.legal:has(#purchases-refunds:target) .toc a[href="#purchases-refunds"],
.legal:has(#account-privacy:target) .toc a[href="#account-privacy"] {
  color: var(--primary);
  font-weight: 600;
  --toc-mark: var(--primary);
}

/* Reduced motion: no transforms, no transitions; colour/border/opacity changes stay, instantly */
@media (prefers-reduced-motion: reduce) {
  .hv-o1,
  .hv-o2,
  .hv-tile,
  .hv-line {
    animation: none;
  }

  .nav-list a::after,
  .btn,
  .card,
  .card::before,
  #contact .identity,
  #contact .identity::before {
    transition: none;
  }

  .nav-list a::after,
  .btn:hover,
  .card:hover,
  .card:focus-within,
  #contact .identity:hover,
  #contact .identity:focus-within {
    transform: none;
  }
}
