/* ==========================================================================
   Thomas John / Rejola - portfolio v2
   Mobile-first. Colour code taken from the Rejola logo and used with meaning:
   red = the problem (input), blue = the work (process), green = the result (output).
   ========================================================================== */

:root {
  --ink-950: #050914;
  --ink-900: #0a1128;
  --ink-800: #101a3a;
  --ink-700: #18244d;
  --line: rgba(150, 175, 255, .16);
  --line-strong: rgba(150, 175, 255, .32);
  --mist: #edf1ff;
  --mist-2: #aab7db;
  --mist-3: #8190bb;
  --red: #ff5468;
  --blue: #6b97ff;
  --green: #3ee08c;
  --plate: #f6f8ff;

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --hdr: 60px;
  --bar: 76px;
  --gutter: 1.25rem;
  --r-s: 10px;
  --r-m: 18px;
  --r-l: 30px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 8px); }
body {
  margin: 0;
  background: var(--ink-950);
  color: var(--mist);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--mist); color: var(--ink-950); padding: .6rem 1rem; border-radius: var(--r-s); transition: top .2s; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - var(--gutter) * 2, 72rem); margin-inline: auto; }

/* ---------- Backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ink-950); }
.backdrop__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 70%);
}
.glow { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; opacity: .2; will-change: transform; }
.glow--red { background: radial-gradient(circle, var(--red) 0%, transparent 62%); left: -45vmax; top: -30vmax; animation: drift-a 38s ease-in-out infinite alternate; }
.glow--blue { background: radial-gradient(circle, var(--blue) 0%, transparent 62%); right: -50vmax; top: 10vmax; animation: drift-b 46s ease-in-out infinite alternate; opacity: .26; }
.glow--green { background: radial-gradient(circle, var(--green) 0%, transparent 62%); left: -10vmax; bottom: -60vmax; animation: drift-c 52s ease-in-out infinite alternate; opacity: .15; }
@keyframes drift-a { to { transform: translate3d(22vmax, 18vmax, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-26vmax, 14vmax, 0) scale(.9); } }
@keyframes drift-c { to { transform: translate3d(24vmax, -16vmax, 0) scale(1.1); } }
.spot { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(107, 151, 255, .13), transparent 70%); }
@media (hover: hover) and (pointer: fine) { .spot { opacity: 1; } }

.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--red), var(--blue) 50%, var(--green)); }

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; height: var(--hdr); z-index: 58; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.hdr.is-solid { background: rgba(5, 9, 20, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line); }
.hdr__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hdr__brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; min-width: 0; }
.hdr__name { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.hdr__sep { display: none; width: 1px; height: 22px; background: var(--line-strong); }
.hdr__brand img { display: none; height: 26px; width: auto; }
@media (min-width: 380px) { .hdr__sep, .hdr__brand img { display: block; } }
.nav { display: none; }
.hdr__tools { display: flex; align-items: center; gap: .5rem; }
.menu-btn { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-strong); border-radius: 12px; }
.menu-btn .icon { width: 22px; height: 22px; }

.sheet { position: fixed; inset: 0; z-index: 55; background: var(--ink-950); display: flex; flex-direction: column; padding: calc(var(--hdr) + 1rem) var(--gutter) 2rem; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .3s, transform .3s var(--ease), visibility .3s; overflow-y: auto; }
.sheet.is-open { opacity: 1; visibility: visible; transform: none; }
.sheet a.sheet__link { font-family: var(--f-display); font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; text-decoration: none; padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.sheet a.sheet__link .icon { color: var(--mist-3); }
.sheet a.sheet__link { font-size: clamp(1.35rem, 5.6vw, 1.9rem); padding: .5rem 0; }
.sheet a.sheet__link .e { font-family: var(--f-body); font-weight: 500; font-size: .92rem; letter-spacing: 0; color: var(--mist-3); }
.sheet a.sheet__link--go { color: var(--green); }
.sheet__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: .75rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px; padding: .75rem 1.5rem; border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 600; font-size: 1rem; line-height: 1.2; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn--go { background: var(--green); color: #031a0d; box-shadow: 0 0 0 0 rgba(62, 224, 140, .5); }
.btn--go:hover { box-shadow: 0 8px 30px -6px rgba(62, 224, 140, .55); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-strong); background: rgba(16, 26, 58, .5); }
.btn--ghost:hover { border-color: var(--mist-2); background: rgba(24, 36, 77, .7); }
.btn--wa .icon { color: var(--green); }
.btn--sm { min-height: 44px; padding: .5rem 1.1rem; font-size: .95rem; }
.btn-row { display: grid; gap: .75rem; }

/* ---------- Typography ---------- */
.h2 { font-family: var(--f-display); font-size: clamp(2rem, 7.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 700; max-width: 16ch; text-wrap: balance; }
.lede { color: var(--mist-2); font-size: clamp(1.05rem, 2.6vw, 1.25rem); line-height: 1.55; max-width: 56ch; text-wrap: pretty; }
.sec { padding-block: clamp(4.5rem, 13vw, 8.5rem); position: relative; }
.sec__head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 6vw, 3.5rem); }
.sec--tint { background: linear-gradient(180deg, transparent, rgba(16, 26, 58, .55) 12%, rgba(16, 26, 58, .55) 88%, transparent); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding-top: calc(var(--hdr) + 1.75rem); padding-bottom: 3rem; display: flex; align-items: center; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; width: min(100% - var(--gutter) * 2, 72rem); }
.hero__copy, .hero__console { min-width: 0; }
.who { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.4rem; }
.who__pic { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--ink-950); box-shadow: 0 0 0 2px var(--blue); }
.who__name { font-weight: 600; line-height: 1.2; }
.who__role { color: var(--mist-2); font-size: .95rem; line-height: 1.3; }
.h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.35rem, 10.4vw, 5rem); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.h1 .w > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes rise { to { transform: none; } }
.hero__sub { margin-top: 1.4rem; opacity: 0; animation: fade .8s ease forwards 1s; }
.hero__cta { margin-top: 1.75rem; opacity: 0; animation: fade .8s ease forwards 1.15s; }
.hero__console { opacity: 0; animation: fade 1s ease forwards 1.3s; }
.hero__tour { justify-self: center; font-size: .97rem; }
@media (min-width: 640px) { .hero__tour { justify-self: start; } }
@keyframes fade { to { opacity: 1; } }

/* The console */
.console { background: linear-gradient(180deg, rgba(16, 26, 58, .92), rgba(8, 14, 35, .92)); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: 1rem; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06); position: relative; overflow: hidden; }
.console__title { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; margin-bottom: .8rem; }
.console__hint { color: var(--mist-3); font-size: .9rem; font-weight: 400; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem 1rem .6rem 0; margin-inline: -1rem; padding-left: 1rem; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; min-height: 44px; padding: .45rem .95rem; border-radius: 999px; background: transparent; border: 1px solid var(--line-strong); color: var(--mist-2); font-size: .93rem; white-space: nowrap; transition: all .25s var(--ease); }
.chip:hover { color: var(--mist); border-color: var(--red); }
.chip[aria-pressed="true"] { background: rgba(255, 84, 104, .14); border-color: var(--red); color: #ffd6db; }
.code { margin-top: .75rem; background: #04070f; border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem; font-family: var(--f-mono); font-size: .86rem; line-height: 1.55; min-height: 15.5rem; position: relative; }
.code__ln { display: grid; grid-template-columns: 2.1ch 1fr; gap: 1ch; margin-bottom: .7rem; }
.code__ln:last-of-type { margin-bottom: 0; }
.code__n { color: var(--mist-3); user-select: none; }
.code__t { white-space: pre-wrap; overflow-wrap: anywhere; }
.code__ln--in .code__t { color: var(--red); }
.code__ln--run .code__t { color: var(--blue); }
.code__ln--out .code__t { color: var(--green); }
.code__caret { display: inline-block; width: .6ch; height: 1.05em; vertical-align: -.15em; background: currentColor; animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.flow { height: 4px; border-radius: 4px; margin: .9rem 0 .2rem; background: linear-gradient(90deg, var(--red), var(--blue), var(--green)); opacity: .35; position: relative; overflow: hidden; }
.flow::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: pulse 2.2s linear infinite; }
@keyframes pulse { from { left: -25%; } to { left: 105%; } }
.console__act { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.console__note { color: var(--mist-3); font-size: .88rem; }

/* Stats + platforms */
.proof { padding-block: 1rem 2rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.stat { padding: 1.5rem .5rem; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__n { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 9vw, 4.2rem); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { margin-top: .4rem; color: var(--mist-2); font-size: .95rem; }
.plats { margin-top: 2rem; display: grid; gap: 1rem; }
.plats__t { color: var(--mist-2); max-width: 40ch; }
.plats__row { display: flex; flex-wrap: wrap; gap: .75rem; }
.plate { background: var(--plate); border-radius: var(--r-s); padding: .5rem .9rem; height: 56px; width: 8rem; }
.plate img { height: 100%; width: 100%; object-fit: contain; }

/* ---------- Clients ---------- */
.plats__t { margin-top: 2rem; margin-bottom: 1rem; color: var(--mist-2); }
.client { flex: none; width: 9rem; height: 4.5rem; background: #fff; border-radius: 12px; padding: .55rem .8rem; }
.client img { width: 100%; height: 100%; object-fit: contain; }
.client[hidden] { display: none; }
@media (min-width: 640px) { .client { width: 10.5rem; height: 5rem; } }

/* ---------- Services ---------- */
.svc { border-top: 1px solid var(--line); }
.svc__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); position: relative; transition: background .3s, padding .3s var(--ease); }
.svc__row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); transform: scaleY(0); transform-origin: 50% 0; transition: transform .35s var(--ease); }
.svc__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 5.6vw, 2.4rem); letter-spacing: -.025em; line-height: 1.08; }
.svc__txt { color: var(--mist-2); max-width: 52ch; }
.svc__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.tag { padding: .2rem .7rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .85rem; color: var(--mist-2); }
.svc__ask { justify-self: start; margin-top: .4rem; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--green); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; }
.svc__ask .icon { transition: transform .25s var(--ease); }
.svc__ask:hover .icon { transform: translateX(5px); }
@media (hover: hover) { .svc__row:hover { background: linear-gradient(90deg, rgba(107, 151, 255, .08), transparent 70%); padding-left: 1rem; } .svc__row:hover::before { transform: scaleY(1); } }

/* AI lead card */
.ai { position: relative; border-radius: var(--r-l); padding: 1.4rem; display: grid; gap: 1.1rem; background: linear-gradient(160deg, rgba(24, 36, 77, .92), rgba(8, 14, 35, .96)); isolation: isolate; box-shadow: 0 40px 90px -40px rgba(107, 151, 255, .45); }
.ai::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(135deg, var(--red), var(--blue) 50%, var(--green)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; z-index: -1; }
.ai__top { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.ai__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 7vw, 3rem); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; max-width: 18ch; }
.ai__txt { color: var(--mist-2); max-width: 52ch; }
.ai__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag--ai { padding: .35rem .85rem; font-size: .95rem; color: var(--mist); border-color: var(--line-strong); background: rgba(107, 151, 255, .08); }
.ai .btn { justify-self: start; width: 100%; }
@media (min-width: 640px) { .ai { padding: 2.2rem; } .ai .btn { width: auto; } }

/* the other five D's */
.groups { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.grp { border-bottom: 1px solid var(--line); }
.grp summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; padding: 1.1rem 0; min-height: 64px; }
.grp summary::-webkit-details-marker { display: none; }
.grp__name { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 5.4vw, 2.1rem); letter-spacing: -.025em; line-height: 1.1; }
.grp__promise { grid-column: 1; color: var(--mist-2); font-size: .98rem; margin-top: .15rem; }
.grp__plus { grid-column: 2; grid-row: 1 / span 2; color: var(--blue); transition: transform .3s var(--ease); }
.grp[open] .grp__plus { transform: rotate(45deg); }
.grp__body { padding-bottom: 1.4rem; display: grid; gap: .5rem; }
.grp__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (min-width: 960px) {
  .grp summary { pointer-events: none; cursor: default; padding-bottom: .5rem; }
  .grp__plus { display: none; }
  .grp__body { grid-template-columns: 1fr auto; align-items: start; gap: 2rem; }
  .grp__name, .grp__promise { }
  .grp { display: grid; grid-template-columns: 18rem 1fr; column-gap: 2rem; padding: 1.25rem 0; align-items: start; }
  .grp summary { padding: 0; }
  .grp__body { padding: 0; }
}

/* ---------- Story ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.portrait { position: relative; width: min(78%, 22rem); aspect-ratio: 1; justify-self: center; }
.portrait::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(from 0deg, var(--red), var(--blue), var(--green), var(--red)); animation: spin 14s linear infinite; }
.portrait::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--ink-950); }
.portrait img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; object-fit: cover; object-position: center 18%; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.quote { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.45rem, 5.6vw, 2.3rem); line-height: 1.18; letter-spacing: -.02em; border-left: 3px solid var(--green); padding-left: 1.1rem; text-wrap: balance; }
.story__txt { display: grid; gap: 1.25rem; align-content: start; }
.story__txt p { color: var(--mist-2); max-width: 58ch; }
.more { margin-top: .25rem; }
.more summary { cursor: pointer; font-weight: 600; color: var(--blue); min-height: 44px; display: inline-flex; align-items: center; gap: .5rem; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary .icon { transition: transform .3s var(--ease); }
.more[open] summary .icon { transform: rotate(45deg); }
.more__body { display: grid; gap: 1rem; margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-m); background: rgba(16, 26, 58, .5); }
.more__body p { color: var(--mist-2); }
.more__body .hl { color: var(--mist); font-weight: 600; }

/* ---------- Timeline ---------- */
.tl { position: relative; padding-left: 2.2rem; }
.tl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.tl__rail { position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl__fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(180deg, var(--red), var(--blue) 55%, var(--green)); transform-origin: 50% 0; transform: scaleY(0); border-radius: 2px; }
.tl__item { position: relative; }
.tl__item::before { content: ""; position: absolute; left: -2.2rem; top: .45rem; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-950); border: 2px solid var(--line-strong); transition: border-color .4s, box-shadow .4s, background .4s; }
.tl__item.is-on::before { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 5px rgba(107, 151, 255, .18); }
.tl__item--study.is-on::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px rgba(62, 224, 140, .16); }
.tl__item--now.is-on::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 6px rgba(255, 84, 104, .2); }
.tl__when { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--mist); }
.tl__kind { margin-left: .5rem; font-size: .8rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--mist-2); font-weight: 500; font-family: var(--f-body); vertical-align: 2px; }
.tl__role { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.2; margin-top: .15rem; }
.tl__org { color: var(--blue); font-weight: 500; }
.tl__txt { color: var(--mist-2); margin-top: .35rem; max-width: 58ch; }
.tl__item--now .tl__role { font-size: 1.6rem; }

/* ---------- Ethos ---------- */
.ethos { position: relative; overflow-x: clip; }
.ethos__track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem; scrollbar-width: none; padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); -webkit-overflow-scrolling: touch; }
.ethos__track::-webkit-scrollbar { display: none; }
.verse { flex: 0 0 min(88%, 40rem); scroll-snap-align: center; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-l); background: linear-gradient(160deg, rgba(24, 36, 77, .7), rgba(10, 17, 40, .7)); display: grid; gap: 1rem; align-content: start; min-height: 22rem; }
.verse__ref { color: var(--blue); font-weight: 600; }
.verse__text { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 5.4vw, 2.1rem); line-height: 1.2; letter-spacing: -.02em; }
.verse__text b { font-weight: 800; color: #fff; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.verse__note { color: var(--mist-2); font-size: 1rem; }
.ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; gap: 1rem; }
.dots { display: flex; gap: .15rem; flex-wrap: wrap; }
.dot { width: 28px; height: 28px; background: none; border: 0; display: grid; place-items: center; padding: 0; }
.dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: all .3s var(--ease); }
.dot[aria-current="true"]::after { width: 22px; border-radius: 6px; background: var(--green); }
.arrows { display: flex; gap: .5rem; }
.arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-strong); }
.arrow:hover { border-color: var(--mist-2); }

/* ---------- Marquee ---------- */
.marq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marq__track { display: flex; gap: 1rem; width: max-content; animation: marq var(--dur, 45s) linear infinite; padding-block: .3rem; }
.marq--rev .marq__track { animation-direction: reverse; }
.marq:hover .marq__track, .marq:focus-within .marq__track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
.eco { background: var(--plate); border-radius: var(--r-m); padding: .75rem 1.1rem; width: 15rem; height: 6.5rem; flex: none; }
.eco img { height: 100%; width: 100%; object-fit: contain; }
.cert { flex: none; padding: 0; border: 1px solid var(--line-strong); background: var(--plate); border-radius: 12px; overflow: hidden; width: 14rem; aspect-ratio: 4 / 3; transition: transform .3s var(--ease), border-color .3s; }
.cert img { width: 100%; height: 100%; object-fit: cover; }
.cert:hover { transform: translateY(-4px) rotate(-.6deg); border-color: var(--blue); }
.stack { display: grid; gap: 1rem; }
.fine { color: var(--mist-3); font-size: .92rem; }

/* ---------- Community notes ---------- */
.notes { display: grid; gap: .5rem; margin-top: 2rem; }
.note { border-top: 1px solid var(--line); padding: 1rem 0; display: grid; gap: .4rem; }
.note__n { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.note__t { color: var(--mist-2); max-width: 64ch; font-size: 1rem; }

/* ---------- Empower ---------- */
.tiles { display: flex; overflow-x: auto; gap: 1rem; scroll-snap-type: x mandatory; padding: .25rem var(--gutter) 1rem; margin-inline: calc(var(--gutter) * -1); scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 min(80%, 19rem); scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; background: rgba(16, 26, 58, .6); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem; }
.tile:nth-child(3n+2) { border-top-left-radius: var(--r-l); border-bottom-right-radius: var(--r-l); }
.tile__logo { background: var(--plate); border-radius: var(--r-s); height: 5.5rem; padding: .6rem; }
.tile__logo img { height: 100%; width: 100%; object-fit: contain; }
.tile__name { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.015em; margin-bottom: .5rem; }
.tile ul { display: grid; gap: .5rem; }
.tile li { color: var(--mist-2); font-size: .97rem; padding-left: 1.1rem; position: relative; line-height: 1.45; }
.tile li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.tile__link { color: var(--green); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.tile__link:hover { text-decoration: underline; }

/* ---------- Life ---------- */
.life { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.life__it { position: relative; border-radius: var(--r-m); overflow: hidden; min-height: 11rem; background: var(--ink-800); }
.life__it:first-child { grid-column: 1 / -1; min-height: 14rem; }
.life__it img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.life__it::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 10%, rgba(5, 9, 20, .9) 72%); }
.life__cap { text-shadow: 0 1px 8px rgba(0, 0, 0, .7); position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: .9rem; }
.life__h { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.life__p { color: var(--mist-2); font-size: .88rem; line-height: 1.4; margin-top: .15rem; }
@media (hover: hover) { .life__it:hover img { transform: scale(1.06); } }

/* ---------- Books ---------- */
.books { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.book { display: grid; gap: 1.25rem; align-content: start; }
.book__cover { justify-self: start; width: min(48%, 11rem); perspective: 800px; }
.book__cover img { width: 100%; height: auto; border-radius: 4px 10px 10px 4px; box-shadow: -8px 12px 30px rgba(0, 0, 0, .55); transition: transform .5s var(--ease); transform: rotateY(-14deg); transform-origin: 0 50%; }
@media (hover: hover) { .book:hover .book__cover img { transform: rotateY(-3deg) translateY(-4px); } }
.book__title { font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.1; }
.book__desc { color: var(--mist-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; max-width: 58ch; }
.book__desc.is-open { display: block; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; min-height: 44px; justify-self: start; }

/* ---------- Enquiry ---------- */
.enq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.enq__side { display: grid; gap: 1.25rem; align-content: start; }
.direct { display: grid; gap: .6rem; }
.direct a { display: flex; align-items: center; gap: .8rem; min-height: 48px; text-decoration: none; color: var(--mist-2); }
.direct a:hover { color: var(--mist); }
.direct .icon { color: var(--blue); }
.form { min-width: 0; background: linear-gradient(180deg, rgba(24, 36, 77, .75), rgba(10, 17, 40, .85)); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: 1.25rem; display: grid; gap: 1.1rem; position: relative; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.field { display: grid; gap: .4rem; }
.field label, .field legend { font-weight: 600; font-size: .95rem; }
.field .opt { color: var(--mist-3); font-weight: 400; }
.input { width: 100%; min-height: 52px; padding: .75rem 1rem; border-radius: 14px; background: rgba(5, 9, 20, .7); border: 1px solid var(--line-strong); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--mist-3); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(107, 151, 255, .2); }
.input[aria-invalid="true"] { border-color: var(--red); }
.err { color: #ff9aa6; font-size: .9rem; min-height: 0; }
.two { display: grid; gap: 1.1rem; }
.pick { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; min-width: 0; }
.pick__row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.pick span { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--mist-2); font-size: .95rem; font-weight: 400; transition: all .2s; }
.pick input:checked + span { background: rgba(62, 224, 140, .14); border-color: var(--green); color: #d5fbe6; }
.pick input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__act { display: grid; gap: .75rem; }
.form__msg { min-height: 1.4em; font-size: .95rem; color: var(--mist-2); }
.form__msg.is-err { color: #ff9aa6; }
.done { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, #0c1a2e, #07101f); display: grid; place-content: center; justify-items: center; text-align: center; gap: 1rem; padding: 2rem; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.form.is-sent .done { opacity: 1; visibility: visible; }
.done__tick { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--green); display: grid; place-items: center; color: var(--green); }
.done__tick svg { width: 44px; height: 44px; stroke-dasharray: 40; stroke-dashoffset: 40; }
.form.is-sent .done__tick svg { animation: draw .7s .3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h3 { font-family: var(--f-display); font-size: 1.8rem; letter-spacing: -.02em; }
.done p { color: var(--mist-2); max-width: 32ch; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 3rem 2rem; }
.foot__in { display: grid; gap: 2rem; }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.soc { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--mist-2); transition: all .25s var(--ease); }
.soc:hover { color: var(--mist); border-color: var(--blue); transform: translateY(-3px); }
.foot__fine { color: var(--mist-3); font-size: .9rem; }

/* ---------- Action bar + floating UI ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto auto auto; gap: .5rem; background: rgba(5, 9, 20, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); transition: transform .4s var(--ease); }
.bar.is-away { transform: translateY(110%); }
.bar .btn { min-height: 52px; padding-inline: 1.1rem; }
.bar__ic { width: 48px; min-height: 48px; padding: 0; }
.bar .btn--go { min-height: 48px; padding-inline: .9rem; }
.bar__short { display: inline; }
.bar__long { display: none; }
.bar__li .icon { color: var(--blue); }
@media (min-width: 410px) { .bar__short { display: none; } .bar__long { display: inline; } }
.hdr__li { display: none; }
.hdr__li .icon { color: var(--blue); }

.tour-hud, .nudge { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--bar) + .75rem + env(safe-area-inset-bottom)); z-index: 46; background: rgba(10, 17, 40, .96); border: 1px solid var(--line-strong); border-radius: 20px; padding: .8rem .9rem; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); display: none; max-width: 30rem; margin-inline: auto; }
.tour-hud.is-on, .nudge.is-on { display: block; animation: pop .4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.hud__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hud__lbl { font-weight: 600; font-size: .98rem; line-height: 1.25; min-width: 0; }
.hud__lbl small { display: block; color: var(--mist-3); font-weight: 400; font-size: .82rem; }
.hud__btns { display: flex; gap: .35rem; flex: none; }
.hud__btn { width: 44px; height: 44px; border-radius: 50%; background: transparent; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.hud__btn:hover { border-color: var(--mist-2); }
.hud__bar { height: 3px; border-radius: 3px; background: var(--line); margin-top: .7rem; overflow: hidden; }
.hud__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--blue), var(--green)); }
.nudge__row { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.nudge__t { font-weight: 600; line-height: 1.3; }
.nudge__t small { display: block; color: var(--mist-3); font-weight: 400; }
.nudge__bar { height: 3px; border-radius: 3px; background: var(--line); margin-top: .7rem; overflow: hidden; }
.nudge__bar i { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: 0 50%; }

/* ---------- Lightbox ---------- */
.lb { border: 0; padding: 0; background: transparent; color: var(--mist); max-width: 100vw; max-height: 100dvh; width: 100%; height: 100%; }
.lb::backdrop { background: rgba(3, 6, 14, .94); }
.lb__in { height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 1rem; gap: 1rem; }
.lb__img { min-height: 0; display: grid; place-items: center; }
.lb__img img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: env(safe-area-inset-bottom); }
.lb__cap { color: var(--mist-2); font-size: .95rem; }
.lb__close { position: absolute; top: .75rem; right: .75rem; z-index: 2; background: rgba(10, 17, 40, .9); }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 2rem; }
  .btn-row { display: flex; flex-wrap: wrap; }
  .two { grid-template-columns: 1fr 1fr; }
  .life { grid-template-columns: repeat(6, 1fr); }
  .life__it { grid-column: span 2; min-height: 15rem; }
  .life__it:first-child { grid-column: span 3; }
  .life__it:nth-child(2) { grid-column: span 3; }
  .books { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .eco { width: 17rem; height: 7rem; }
  .cert { width: 17rem; }
  .form { padding: 2rem; }
  .bar { grid-template-columns: auto auto auto auto; justify-content: center; }
  .bar .btn--go { min-width: 14rem; }
}
@media (min-width: 960px) {
  :root { --hdr: 72px; }
  body { padding-bottom: 0; }
  .nav { display: flex; gap: .25rem; }
  .nav a { padding: .55rem .9rem; border-radius: 999px; text-decoration: none; color: var(--mist-2); font-size: .97rem; transition: color .2s, background .2s; }
  .nav a:hover { color: var(--mist); }
  .nav a[aria-current="true"] { color: var(--mist); background: rgba(107, 151, 255, .14); }
  /* The menu button stays on desktop: it opens the full list (all nine sections, tour, save contact) */
  .sheet { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; align-content: start; padding-inline: max(var(--gutter), calc((100vw - 72rem) / 2)); padding-top: calc(var(--hdr) + 3rem); }
  .sheet__foot { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; margin-top: 2.5rem; padding-top: 0; }
  .sheet a.sheet__link { font-size: clamp(1.5rem, 2.2vw, 2rem); padding: .75rem 0; }
  .hero__grid { grid-template-columns: 1.08fr .92fr; gap: 4rem; align-items: center; }
  .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0 0 .6rem; -webkit-mask-image: none; mask-image: none; }
  .hero__console { max-width: 30rem; justify-self: end; width: 100%; }
  .btn-row--hero .btn { min-height: 56px; padding-inline: 1.9rem; }
  .story { grid-template-columns: 22rem 1fr; gap: 5rem; align-items: center; }
  .portrait { width: 100%; }
  .svc__row { grid-template-columns: 1.1fr 1.4fr auto; gap: 2rem; align-items: start; padding: 2rem 0; }
  .svc__txt { margin-top: .5rem; }
  .svc__tags { margin-top: .6rem; grid-column: 2; }
  .svc__ask { grid-column: 3; grid-row: 1; margin-top: .6rem; }
  .tl { max-width: 52rem; padding-left: 3rem; }
  .tl__list { gap: 2.2rem; }
  .tl__rail { left: 9px; }
  .tl__item::before { left: -3rem; width: 20px; height: 20px; }
  .verse { flex-basis: 38rem; padding: 2.2rem; min-height: 24rem; }
  .tiles { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; padding-inline: 0; margin-inline: 0; }
  .tile { flex: initial; }
  .enq { grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
  .bar { display: none; }
  .hdr__li { display: inline-flex; padding-inline: .75rem; }
  .hdr__li span { display: none; }
  .tour-hud, .nudge { left: auto; right: 1.5rem; bottom: 1.5rem; width: 24rem; margin: 0; }
  .life__it:hover .life__p { max-height: 6rem; }
  .foot__in { grid-template-columns: 1fr auto; align-items: end; }
}
@media (min-width: 1100px) {
  .hdr__li span { display: inline; }
}
@media (min-width: 1200px) {
  .eco { width: 18rem; }
  .cert { width: 19rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .h1 .w > span { transform: none; }
  .hero__sub, .hero__cta, .hero__console { opacity: 1; }
  .glow { animation: none; }
  .marq { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marq__track { animation: none; }
}
