/* Bass Valmonte portfolio — shared stylesheet (dark theme).
   Page-specific layout lives in inline styles carried over from the approved design;
   everything reusable lives here. */

:root {
  --bg: #1B2030;
  --bg-alt: #222838;
  --card: #262D40;
  --tile: #2A3144;
  --deep: #151926;
  --line: #343C52;
  --line-strong: #46506A;
  --field-border: #6B7690;
  --text: #D5DBE5;
  --text-body: #C3CCD8;
  --text-muted: #AEB7C6;
  --heading: #FFFFFF;
  --accent: #8FDCB8;
  --accent-hover: #A9E8C9;
  --accent-soft: #1F3A33;
  --accent-ink: #13171F;
  --error: #FF9C8F;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Elevation: resting surfaces, lifted (hover) surfaces, mint glow for the accent. */
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px -8px rgba(0, 0, 0, .45);
  --shadow-2: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .7);
  --glow: 0 10px 30px -10px rgba(143, 220, 184, .55);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: #BFEBD6; }
section[id], [id].anchor { scroll-margin-top: 88px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* Header + navigation */
.site-header { transition: box-shadow .25s ease; }
.site-header { transition: box-shadow .25s ease, background-color .25s ease, border-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); }
/* Headers set their colour inline, hence !important. Browsers without blur keep the solid header. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background: rgba(27, 32, 48, .72) !important; border-bottom-color: rgba(255, 255, 255, .06) !important; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}
.navlink { position: relative; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 16px; padding: 10px 4px; }
.navlink:hover, .navlink.is-active { color: #FFFFFF; }
.navlink::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.navlink:hover::after, .navlink.is-active::after { transform: scaleX(1); }
.btn.nav-toggle { display: none; }
/* Menu button: a three-line icon that turns into a cross while the menu is open.
   The word "Menu" stays in the markup as the button's accessible name; only its glyphs are hidden. */
.btn.nav-toggle { position: relative; width: 46px; padding: 0; font-size: 0; }
.btn.nav-toggle::before, .btn.nav-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease), box-shadow .2s, opacity .2s; }
.btn.nav-toggle::before { box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
.btn.nav-toggle::after { opacity: 0; }
.btn.nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); box-shadow: none; }
.btn.nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); opacity: 1; }
.mobile-menu[hidden] { display: none !important; }

/* Buttons + links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 16px; font-family: inherit; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn-primary, .btn-light, .btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -10px rgba(143, 220, 184, .6); }
.btn-primary:hover, .btn-light:hover, .btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-2px); box-shadow: var(--glow); }
.btn-outline, .btn-ghost { background: transparent; color: #EEF1F6; border-color: var(--line-strong); }
.btn-outline:hover, .btn-ghost:hover { border-color: var(--accent); color: #FFFFFF; background: rgba(143, 220, 184, .06); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .7; cursor: progress; }
.tlink { font-weight: 700; text-decoration: none; color: var(--accent); background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 calc(100% - 6px); background-size: 0 2px; transition: background-size .25s cubic-bezier(.2, .7, .2, 1); }
.tlink:hover { background-size: 100% 2px; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--accent); padding: 8px 0; min-height: 44px; }
/* Comfortable tap area for small text links without changing how they look. */
.tap-link, footer a { display: inline-flex; align-items: center; min-height: 44px; }
.arrow-link span { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.arrow-link:hover span { transform: translateX(4px); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: #EEF1F6; transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Type helpers */
.label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.sec-num { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.muted { color: var(--text-muted); }

/* Surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); }
.card.card-feature { background: var(--deep); border-color: var(--deep); }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.5; background: var(--card); border: 1px solid #3D465E; color: var(--text); }
.chip-mint { background: var(--accent-soft); border-color: #2E5A4A; color: #BFEBD6; }
.stage { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-1); }
.step { font-weight: 700; font-size: 15px; color: var(--accent); }
.down { display: flex; justify-content: center; color: var(--text-muted); font-weight: 700; line-height: 1; padding: 6px 0; }
.tool { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #FFFFFF; }
.tool img, .tool svg { width: 20px; height: 20px; object-fit: contain; flex: none; display: block; }
.used { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
/* A long value in a label/value row: wraps beside its label on wide screens, sits under it on phones. */
.fact-long { flex: 1 1 260px; text-align: right; }
@media (max-width: 480px) { .fact-long { flex-basis: 100%; text-align: left; } }

/* Homepage components */
.tile { display: flex; flex-direction: column; justify-content: flex-start; gap: 22px; padding: 28px; border-radius: 6px; background: var(--tile); text-decoration: none; color: #EEF1F6; box-shadow: var(--shadow-1); transition: transform .3s var(--ease), background-color .3s, box-shadow .3s var(--ease); }
.tile:hover { transform: translateY(-4px); background: #303850; color: #FFFFFF; box-shadow: var(--shadow-2); }
.tile.is-accent { background: var(--accent); color: var(--accent-ink); }
.tile.is-accent:hover { color: var(--accent-ink); background: var(--accent-hover); box-shadow: var(--shadow-2), var(--glow); }
.tile-sub { font-size: 14px; color: var(--text-muted); }
.tile.is-accent .tile-sub { color: var(--accent-ink); }
.tile svg { color: var(--accent); }
.tile-title, .tile-text, .tile > span > .tile-sub { display: block; }
.tile-title { font-size: 21px; line-height: 1.25; font-weight: 700; color: #FFFFFF; }
.tile-text { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--text-body); }
.tile > span > .tile-sub { margin-top: 14px; }

/* Results: one figure per card, with where it comes from */
.proof-source { margin: 0 0 14px; font-size: 14px; line-height: 1.4; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px; margin: 0; }
.proof { padding: 18px 20px; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--bg); }
.proof dt { font-size: 44px; line-height: 1; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.proof dd { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--text); }

/* How I work: numbered steps */
.step-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); border-top: 2px solid var(--line-strong); }
.step-grid li { padding: 24px 20px 0 0; }
.step-grid li > span { font-size: 15px; font-weight: 700; color: var(--accent); }
.step-grid h3 { margin: 8px 0 0; font-size: 20px; line-height: 1.3; color: #FFFFFF; }
.step-grid p { margin: 8px 0 0; font-size: 16px; color: var(--text-body); }

/* Technologies: logos grouped by purpose */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 40px; }
.tech-group { padding: 22px 0; border-top: 1px solid var(--line); }
.tech-group h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.tech-list { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.proj { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 14px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-decoration: none; color: #EEF1F6; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.proj > div:not(.shot) { padding: 0 8px 8px; }
.proj:hover { color: #FFFFFF; transform: translateY(-4px); box-shadow: var(--shadow-2); }
/* Mint edge light that follows the pointer (position set by site.js on mouse/trackpad devices). */
.proj::before { content: ""; position: absolute; inset: -1px; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(143, 220, 184, .75), transparent 60%); -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); opacity: 0; transition: opacity .3s; }
.proj:hover::before { opacity: 1; }
.proj .shot { overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--accent-ink); }
.proj .shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.proj:hover .shot img { transform: scale(1.05); }
.proj h3 { transition: color .2s; }
.proj:hover h3 { color: var(--accent); }
.row-link { display: grid; grid-template-columns: 120px 1fr 24px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: #EEF1F6; }
.row-link:hover { color: #FFFFFF; }
.row-arrow { color: var(--accent); font-weight: 700; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.row-link:hover .row-arrow { transform: translateX(4px); }

/* Hero ambient light (homepage) */
.hero-ambient { position: relative; isolation: isolate; overflow: hidden; }
.hero-fx, .hero-fx > span { position: absolute; inset: 0; pointer-events: none; }
.hero-fx { z-index: -1; }
.hero-fx .fx-glow { inset: -20%; background: radial-gradient(40% 50% at 18% 38%, rgba(143, 220, 184, .14), transparent 70%), radial-gradient(35% 45% at 82% 72%, rgba(110, 123, 217, .15), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.hero-fx .fx-grid { background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(70% 80% at 55% 40%, #000 25%, transparent 75%); mask-image: radial-gradient(70% 80% at 55% 40%, #000 25%, transparent 75%); }
.hero-fx .fx-spot { background: radial-gradient(320px circle at var(--mx, 70%) var(--my, 40%), rgba(143, 220, 184, .08), transparent 70%); opacity: 0; transition: opacity .4s; }
.hero-ambient.is-pointing .fx-spot { opacity: 1; }
.hero-ambient.is-offscreen .fx-glow { animation-play-state: paused; }
/* Hero stage (homepage): the portrait fills the right of the hero, text sits on the left.
   Phones and small tablets: the image is a block under the text.
   Edges fade into the page through a gradient overlay (::after) rather than a mask. */
.hero-stage { padding: 56px 0 0; }
/* The ambient glow is drawn over the image, not behind it, so the faded edges of the image
   and the page around them carry the same tint and no seam shows. The dot grid is dropped here. */
.hero-stage .hero-fx { z-index: 1; }
.hero-stage .fx-grid { display: none; }
.hero-copy { position: relative; z-index: 2; }
.hero-media { position: relative; margin-top: 32px; }
.hero-media > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 86% 30%; }
.hero-media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, #1B2030, rgba(27, 32, 48, 0) 18%, rgba(27, 32, 48, 0) 82%, #1B2030); }
.hero-orbit { display: none; }
@media (min-width: 901px) {
  .hero-stage { display: flex; align-items: center; min-height: clamp(560px, 46vw, 700px); padding: 72px 0 88px; }
  .hero-stage > .wrap { width: 100%; }
  .hero-copy { max-width: min(560px, 47%); }
  /* Sized by width so the tool cards, positioned in %, stay locked to the portrait at every screen size.
     Centred vertically: on tablets the text column is taller than the image, and a bottom-anchored
     image left the head sitting below the text. */
  .hero-media { position: absolute; z-index: 0; top: 50%; transform: translateY(-50%); right: max(0px, calc((100% - 1560px) / 2)); width: clamp(760px, 82vw, 1240px); margin: 0; }
  .hero-media > img { aspect-ratio: 2000 / 1116; object-position: center; }
  .hero-media::after { background:
    linear-gradient(to right, #1B2030 4%, rgba(27, 32, 48, .9) 14%, rgba(27, 32, 48, .62) 28%, rgba(27, 32, 48, 0) 48%, rgba(27, 32, 48, 0) 84%, rgba(27, 32, 48, .55) 93%, #1B2030 99%),
    linear-gradient(to bottom, #1B2030, rgba(27, 32, 48, 0) 14%, rgba(27, 32, 48, 0) 80%, #1B2030); }
}
/* Floating tool cards and service chips around the portrait (decorative, wide screens only). */
@media (min-width: 1100px) {
  .hero-orbit { display: block; position: absolute; inset: 0; z-index: 2; }
  .hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .hero-lines path { fill: none; stroke: rgba(143, 220, 184, .5); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4 6; }
  .hero-tile { position: absolute; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 16px; background: rgba(255, 255, 255, .94); border: 1px solid rgba(143, 220, 184, .6); box-shadow: 0 0 0 5px rgba(143, 220, 184, .1), 0 14px 30px -12px rgba(0, 0, 0, .8), 0 0 28px -4px rgba(143, 220, 184, .45); }
  .hero-tile img { display: block; width: 30px; height: 30px; object-fit: contain; }
  .hero-chips { display: none; }
}
@media (min-width: 1360px) {
  .hero-chips { position: absolute; right: .5%; top: 19%; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .hero-chips li { padding: 9px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.3; font-weight: 700; color: #EEF1F6; white-space: nowrap; background: rgba(27, 32, 48, .72); border: 1px solid rgba(143, 220, 184, .4); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .hero-chips li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 1px rgba(143, 220, 184, .7); vertical-align: middle; }
}
@keyframes drift { from { transform: translate3d(-3%, -2%, 0); } to { transform: translate3d(3%, 3%, 0); } }

/* Four-up grids stay balanced: 4 across on wide screens, 2 x 2 on tablets (tiles: 1 column on phones). */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1100px) { .stat-grid, .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Homepage services preview: a compact two-column list of links to the Services page. */
.svc-preview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.svc-preview a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; color: #EEF1F6; text-decoration: none; transition: color .2s; }
.svc-preview a:hover { color: var(--accent); }
.svc-preview svg { flex: none; color: var(--accent); }
@media (max-width: 599px) { .tile-grid { grid-template-columns: 1fr; } }

/* Homepage lead cost strip: one-line teaser that links to the case study */
.cost-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 48px; padding: 28px 32px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--card); }
.cost-strip > div { flex: 1 1 420px; min-width: 0; }
@media (max-width: 599px) { .cost-strip { padding: 24px 20px; } }

/* Results strip: on small phones each number sits above its label */
.stat dd { min-width: 0; }

/* Automation flow graphic (homepage) */
.flow-card { margin-top: 56px; padding: 28px clamp(16px, 3vw, 32px) 32px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 20px; }
.flow-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.flow-title { margin: 0; font-weight: 700; color: #FFFFFF; }
.flow-cap { align-items: center; }
.flow-cap .arrow-link { font-size: 15px; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.flow-node { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; min-width: 104px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-align: center; }
.flow-node b { font-size: 12px; letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums; }
.flow-node span { font-size: 15px; font-weight: 700; color: #FFFFFF; white-space: nowrap; }
.flow-link { position: relative; flex: 1 1 24px; min-width: 16px; height: 2px; background: var(--line-strong); }
.flow-link i { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px 2px rgba(143, 220, 184, .6); opacity: 0; }
.flow.is-running .flow-link i { animation: travel 4.6s linear infinite; animation-delay: calc(var(--step) * .55s); }
.flow.is-running .flow-node { animation: ping 4.6s linear infinite; animation-delay: calc(var(--step) * .55s); }
@keyframes travel { 0% { left: 0; opacity: 0; } 2% { opacity: 1; } 12% { left: 100%; opacity: 1; } 14%, 100% { left: 100%; opacity: 0; } }
@keyframes travel-down { 0% { top: 0; opacity: 0; } 2% { opacity: 1; } 12% { top: 100%; opacity: 1; } 14%, 100% { top: 100%; opacity: 0; } }
@keyframes ping { 0%, 100% { border-color: var(--line); } 3% { border-color: var(--accent); box-shadow: var(--shadow-1), 0 0 0 4px rgba(143, 220, 184, .14); } 10% { border-color: var(--line); box-shadow: var(--shadow-1); } }

/* Experience timelines: a mint line draws down over the grey one */
.exp-timeline { position: relative; padding-left: 30px; }
.exp-timeline::before, .exp-timeline::after { content: ""; position: absolute; left: 7px; top: 30px; bottom: 30px; width: 2px; }
.exp-timeline::before { background: var(--line); }
.exp-timeline::after, #experience .wrap > ol::before { background: linear-gradient(var(--accent), rgba(143, 220, 184, .25)); transform-origin: top center; transition: transform 1.4s var(--ease); }
.exp-timeline .row-link { position: relative; }
.exp-timeline .row-link::before { content: ""; position: absolute; left: -29px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--bg-alt); transition: background-color .2s; }
.exp-timeline .row-link:hover::before { background: var(--accent); }
#experience .wrap > ol { position: relative; }
#experience .wrap > ol::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 2px; }
.will-draw::after, #experience .wrap > ol.will-draw::before { transform: scaleY(0); }
.will-draw.is-in::after, #experience .wrap > ol.will-draw.is-in::before { transform: scaleY(1); }

/* Services page */
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-head > p:last-child:not(.kicker) { margin: 16px 0 0; color: var(--text-body); }
.svc-hero { padding: 72px 0 88px; }
.svc-hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px; }
.svc-hero-grid .intro { flex: 1 1 440px; min-width: 0; }
/* Hero visual: two real workflow screenshots, framed as overlapping windows. */
.shot-stack { position: relative; flex: 1 1 420px; min-width: 0; max-width: 600px; margin: 0 auto; }
/* The frame reserves room below the back window for the part of the front window that hangs lower. */
.shot-frame { position: relative; padding-bottom: 13%; }
.shot-stack::before { content: ""; position: absolute; inset: 8% 6% 14%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(143, 220, 184, .22), transparent); filter: blur(30px); }
.shot-win { overflow: hidden; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--deep); box-shadow: var(--shadow-2); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.shot-win img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1E2435; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.shot-bar span { margin-left: 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-back { width: 86%; }
.shot-front { position: absolute; right: 0; bottom: 0; width: 62%; }
.shot-stack:hover .shot-back { transform: translate(-6px, -6px); }
.shot-stack:hover .shot-front { transform: translate(6px, 4px); box-shadow: var(--shadow-2), var(--glow); }
.shot-stack figcaption { margin-top: 18px; font-size: 14px; color: var(--text-muted); }
/* Cards lift on hover (services, engagements). */
.svc-card, .eng-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.svc-card:hover, .eng-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: #4E6B63; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 24px; }
.svc-card { padding: 32px; }
.svc-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #2E5A4A; color: var(--accent); transition: background-color .3s, color .3s; }
.svc-card:hover .svc-icon { background: var(--accent); color: var(--accent-ink); }
.svc-card h3 { margin: 20px 0 0; font-size: 22px; line-height: 1.25; color: #FFFFFF; }
.svc-summary { margin: 10px 0 0; color: var(--text-body); }
.svc-tools { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-muted); }
.eng-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.eng-card { padding: 28px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--accent); }
.eng-card h3 { margin: 0; font-size: 22px; line-height: 1.25; color: #FFFFFF; }
.eng-card p { margin: 0; color: var(--text-body); }
.eng-card .eng-get { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-muted); }
/* How a project runs: eight connected steps. One column with a vertical rail on phones,
   two then four columns with a horizontal rail on wider screens. ::before is the grey rail,
   ::after the accent line drawn over it. */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.journey > li { position: relative; padding: 0 0 30px 52px; }
.journey > li::before, .journey > li::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line-strong); }
.journey > li::after { background: var(--accent); opacity: .6; transform-origin: 0 0; transition: transform .38s linear; }
.journey > li:last-child { padding-bottom: 0; }
.journey > li:last-child::before, .journey > li:last-child::after { display: none; }
.journey-node { position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color .25s, border-color .25s, color .25s, box-shadow .25s; }
.journey > li:hover .journey-node { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 6px rgba(143, 220, 184, .16); }
.journey h3 { margin: 0; font-size: 19px; line-height: 1.3; color: #FFFFFF; }
.journey p { margin: 6px 0 0; font-size: 16px; color: var(--text-body); }
.journey .journey-phase { margin: 0 0 2px; padding-top: 5px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.journey .journey-out { margin-top: 10px; font-size: 15px; color: var(--text-muted); }
.journey h3, .journey p { transition: opacity .5s var(--ease), transform .5s var(--ease); }
/* Animated run: site.js adds .will-run to steps below the fold, then .is-in one step at a time,
   and .is-live on the list once every step is lit. Without JavaScript or with reduced motion,
   the finished state is shown from the start. */
.journey > li.will-run:not(.is-in) .journey-node { background: var(--bg); border-color: var(--line-strong); color: var(--text-muted); }
.journey > li.will-run:not(.is-in) h3, .journey > li.will-run:not(.is-in) p { opacity: 0; transform: translateY(10px); }
.journey > li.will-run:not(.is-in)::after { transform: scale(0); }
.journey > li.is-in .journey-node { animation: journey-pop .7s var(--ease); }
.journey.is-live > li .journey-node { animation: journey-ping 9.6s linear infinite; animation-delay: calc(var(--step, 0) * 1.2s); }
.journey.is-live.is-offscreen > li .journey-node { animation-play-state: paused; }
@keyframes journey-pop { 0% { transform: scale(.7); box-shadow: 0 0 0 0 rgba(143, 220, 184, .55); } 55% { transform: scale(1.14); } 100% { transform: none; box-shadow: 0 0 0 14px rgba(143, 220, 184, 0); } }
@keyframes journey-ping { 0%, 12%, 100% { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 0 rgba(143, 220, 184, 0); } 3% { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 7px rgba(143, 220, 184, .18); } }
@media (min-width: 640px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .journey > li { padding: 48px 0 0; }
  .journey > li::before, .journey > li::after { left: 40px; right: -32px; top: 15px; bottom: auto; width: auto; height: 2px; }
  .journey > li:last-child::before, .journey > li:last-child::after { display: block; }
  .journey > li:nth-child(2n)::before, .journey > li:nth-child(2n)::after { display: none; }
}
@media (min-width: 1040px) {
  .journey { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .journey > li:nth-child(2n)::before, .journey > li:nth-child(2n)::after { display: block; }
  .journey > li:nth-child(4n)::before, .journey > li:nth-child(4n)::after { display: none; }
}
/* Recruiter note and closing call to action. */
.hire-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 32px; padding: 24px 28px; border-radius: 14px; border: 1px dashed var(--line-strong); background: rgba(27, 32, 48, .55); }
.hire-note > div:first-child { flex: 1 1 380px; min-width: 0; }
.hire-note h3 { margin: 8px 0 0; font-size: 20px; line-height: 1.3; color: #FFFFFF; }
.hire-note p:not(.label) { margin: 6px 0 0; font-size: 16px; color: var(--text-body); }
.hire-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.next-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(28px, 4vw, 44px); border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--card) 55%); box-shadow: var(--shadow-1); }
#faq details > summary { transition: color .2s; }
#faq details > summary:hover { color: var(--accent) !important; }
@media (prefers-reduced-motion: no-preference) {
  .hero .shot-stack { animation: rise .8s var(--ease) .18s both; }
}

/* FAQ */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details .chev { transition: transform .2s; }
details[open] .chev { transform: rotate(180deg); }

/* Forms */
.field label { display: block; font-weight: 700; font-size: 15px; color: #EEF1F6; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font-family: inherit; font-size: 16px; color: #EEF1F6; background: var(--bg); border: 1.5px solid var(--field-border); border-radius: 8px; padding: 12px 14px; min-height: 48px; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
/* Inline display styles would otherwise override the hidden attribute (e.g. the form after sending). */
[hidden] { display: none !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Responsive */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .nav-links, .nav-cv, .hide-sm { display: none !important; }
  .btn.nav-toggle { display: inline-flex; }
  .row-link { grid-template-columns: 1fr 24px; }
  .row-date { grid-column: 1 / -1; }
}
.btn { white-space: nowrap; }
@media (max-width: 980px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-node { flex-direction: row; align-items: baseline; gap: 12px; min-width: 0; text-align: left; }
  .flow-link { flex: none; width: 2px; height: 20px; min-width: 0; margin-left: 30px; }
  .flow-link i { left: 50%; top: 0; }
  .flow.is-running .flow-link i { animation-name: travel-down; }
}
@media (max-width: 480px) {
  .stat { flex-direction: column; align-items: flex-start !important; gap: 6px !important; }
  .stat dt { font-size: 44px !important; }
  /* Keep the logo link's accessible name but hide the wordmark text visually on small phones. */
  .site-header nav > a:first-child > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* Motion (respects reduced-motion) */
:nth-child(1) { --i: 0; } :nth-child(2) { --i: 1; } :nth-child(3) { --i: 2; } :nth-child(4) { --i: 3; } :nth-child(n + 5) { --i: 4; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
details[open] > summary ~ * { animation: fade-down .25s ease-out; }
@media (prefers-reduced-motion: no-preference) {
  .hero-col, .hero .intro > *, main > section:first-child .wrap > * { animation: rise .75s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-col:nth-child(2), .hero .intro > *:nth-child(2), main > section:first-child .wrap > *:nth-child(2) { animation-delay: .08s; }
  .hero-col:nth-child(3), .hero .intro > *:nth-child(3), main > section:first-child .wrap > *:nth-child(3) { animation-delay: .16s; }
  .hero .intro > *:nth-child(4) { animation-delay: .24s; }
  .hero .intro > *:nth-child(5) { animation-delay: .32s; }
  .hero .portrait { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .2s both; }
}
/* Scroll reveals: site.js adds .will-reveal only to items below the fold, then .is-in as they enter.
   Without JavaScript (or with reduced motion) nothing is ever hidden. */
/* Readability: cap line length, keep supporting text at 16px on phones (most sizes are set inline),
   and make the header logo link a full-size tap target. */
main p { max-width: 38em; }
.site-header nav > a:first-child { min-height: 44px; }
@media (max-width: 599px) {
  main [style*="font-size: 15px"], main [style*="font-size: 14px"], .proof dd, .tile-sub, .svc-tools, .eng-card .eng-get, .journey .journey-out, .used { font-size: 16px !important; }
}
.will-reveal { opacity: 0; transform: translateY(18px); }
.will-reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Homepage v3: section rhythm, light sections and content cards ----
   .sec is a full-width band. .sec-light flips the colour tokens, so shared components
   (cards, kickers, links, muted text) recolour themselves without extra rules. */
.sec { padding: clamp(72px, 9vw, 120px) 0; }
.sec-alt { background: var(--bg-alt); }
.sec-light {
  background: #F3F5F8; color: #2B3345;
  --text: #2B3345; --text-body: #3D465A; --text-muted: #56607A; --heading: #141926;
  --line: #DCE1EA; --line-strong: #C3CAD8; --card: #FFFFFF; --tile: #FFFFFF;
  --accent: #0B6B4A; --accent-soft: #E2F4EC;
  --shadow-1: 0 1px 2px rgba(20, 25, 38, .06), 0 12px 28px -18px rgba(20, 25, 38, .28);
  --shadow-2: 0 2px 4px rgba(20, 25, 38, .08), 0 22px 44px -20px rgba(20, 25, 38, .38);
}
.sec-light a:hover { color: #084F37; }
.sec-light .btn-accent { background: #141926; color: #FFFFFF; box-shadow: none; }
.sec-light .btn-accent:hover { background: #2A3144; color: #FFFFFF; box-shadow: var(--shadow-2); }
.sec-light .btn-ghost { color: #141926; }
.sec-light .btn-ghost:hover { color: #141926; background: rgba(11, 107, 74, .07); }
.sec-light .svc-icon { border-color: #BFE3D2; }
.sec-light .svc-card:hover, .sec-light .eng-card:hover { border-color: #9CCDB7; }
.sec-light .proof { background: #FFFFFF; box-shadow: var(--shadow-1); }
.h2 { margin: 16px 0 0; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; color: var(--heading); }
.h3 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 700; color: var(--heading); }
.lede { margin: 18px 0 0; font-size: 19px; line-height: 1.55; color: var(--text-body); }
.sec-head.is-wide { max-width: 820px; }
.strong { color: var(--heading); font-weight: 700; }

/* Results: six figures, three across */
.proof-grid.is-six { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.proof-grid.is-six .proof { padding: 24px 26px; border-radius: 0 12px 12px 0; }
.proof-grid.is-six .proof dt { font-size: 52px; }
.proof-grid.is-six .proof dd { font-size: 16px; }
.worked { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px; }
.worked ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.worked li { font-weight: 700; font-size: 17px; color: var(--heading); }
.worked li span { font-weight: 500; font-size: 15px; color: var(--text-muted); }

/* Generic card grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.pad { padding: clamp(24px, 3vw, 34px); }
.card.pad > p { margin: 10px 0 0; color: var(--text-body); }
.sec-light .eng-card h3 { color: var(--heading); }
.card .card-num { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.card.is-top { border-top: 3px solid var(--accent); }

/* Service categories */
.cat-card { display: flex; flex-direction: column; }
.cat-card .h3 { font-size: 24px; }
.cat-card ul { margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; font-size: 16px; color: var(--text); }
.cat-card li { position: relative; padding-left: 22px; }
.cat-card li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cat-card .arrow-link { margin-top: auto; padding-top: 18px; }

/* HubSpot capabilities: the problem, then what I do about it */
.cap-card { padding: 26px; }
.cap-card .h3 { font-size: 19px; }
.cap-card dl { margin: 14px 0 0; display: grid; gap: 12px; }
.cap-card dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.cap-card dd { margin: 3px 0 0; font-size: 16px; line-height: 1.5; color: var(--text-body); }
.cap-card dd.is-fix { color: var(--text); }
.cap-card dt.is-fix { color: var(--accent); }

/* Case studies: problem, what I did, result */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(16px, 2.4vw, 28px); }
.case + .case { margin-top: 24px; }
.case .shot { overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--accent-ink); aspect-ratio: 4 / 3; }
.case .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.case-meta { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.case .h3 { margin-top: 8px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.case dl { margin: 16px 0 0; display: grid; gap: 12px; }
.case dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.case dd { margin: 3px 0 0; font-size: 16px; line-height: 1.5; color: var(--text-body); }
.case-results { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-results li { padding: 6px 12px; border-radius: 8px; background: var(--accent-soft); border: 1px solid #2E5A4A; font-size: 15px; font-weight: 700; color: #DDF5E9; }
.case-links { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 10px; }
@media (max-width: 820px) { .case { grid-template-columns: 1fr; } }
.sub-head { margin: 72px 0 28px; max-width: 720px; }
.sub-head p { margin: 10px 0 0; color: var(--text-muted); }
.proj p.proj-why { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-body); }

/* Testimonials */
.quote { margin: 0; display: flex; flex-direction: column; border-left: 4px solid var(--accent); }
.quote blockquote { margin: 0; font-size: 20px; line-height: 1.5; font-weight: 600; color: var(--heading); }
.quote figcaption { margin-top: auto; padding-top: 18px; font-size: 15px; color: var(--text-muted); }
.quote figcaption strong { display: block; font-size: 16px; color: var(--heading); }

/* Story */
.story { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px 72px; align-items: start; }
.story-text p { margin: 18px 0 0; font-size: 18px; line-height: 1.65; color: var(--text-body); }
.story-who { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.story-who img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.story-who p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-muted); }
.story-who strong { display: block; font-size: 17px; color: #FFFFFF; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } }
.cert-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; color: var(--text-muted); }
.cert-row strong { color: #EEF1F6; }

/* Engagements */
.eng-size { display: inline-flex; align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 14px; font-weight: 700; color: var(--accent); }
.eng-card.is-featured { background: #141926; border-color: #141926; --heading: #FFFFFF; --text-body: #C3CCD8; --text-muted: #AEB7C6; --line: #343C52; --accent: #8FDCB8; --accent-soft: #1F3A33; }
.price-note { margin-top: 28px; padding: 22px 26px; border-radius: 14px; border: 1px dashed var(--line-strong); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.price-note p { margin: 0; flex: 1 1 420px; color: var(--text-body); }

/* Direct contact options */
.reach { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.reach a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: #EEF1F6; transition: border-color .2s, transform .2s var(--ease); }
.reach a:hover { border-color: var(--accent); color: #FFFFFF; transform: translateX(3px); }
.reach svg { flex: none; color: var(--accent); }
.reach strong { display: block; font-size: 16px; }
.reach span span { display: block; font-size: 14px; color: var(--text-muted); }
/* Five nav links: keep each on one line, and drop the header CV button on narrow desktops (it stays in the footer). */
.navlink, .site-header nav > a:first-child > span { white-space: nowrap; }
@media (max-width: 1099px) { .nav-cv { display: none !important; } }
/* Phones: long button labels (e.g. "Next: <case study title>") wrap instead of running off the screen. */
@media (max-width: 599px) { .btn { white-space: normal; max-width: 100%; padding-top: 10px; padding-bottom: 10px; text-align: center; } }
