/* ==========================================================================
   CodeArrive - Layout
   Navbar, hero, section furniture, footer, and page-specific blocks.
   ========================================================================== */

/* ==========================================================================
   Scroll progress
   ========================================================================== */

.scroll-progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: calc(var(--z-nav) + 1);
  background: var(--royal);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.site-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-nav);
  transition: transform var(--d-slow) var(--ease-out);
}

/* Hides on scroll-down, returns on scroll-up: the content gets the full
   viewport while reading, and navigation is one flick away. */
.site-nav.is-hidden { transform: translateY(-100%); }

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--d-base) var(--ease-ui),
    border-color var(--d-base) var(--ease-ui),
    backdrop-filter var(--d-base) var(--ease-ui);
}

/* Transparent over the hero, solid once the page scrolls under it. */
.site-nav.is-stuck .site-nav__inner {
  background: rgb(7 9 14 / 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
}

/* Full-bleed hairline that ignores the wrap's max-width. */
.site-nav.is-stuck { background: transparent; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: none;
  color: var(--paper);
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--royal-hi);
  transition: transform var(--d-slow) var(--ease-out);
}

.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }

.brand__word {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding-inline: 0.85rem;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--silver);
  transition: color var(--d-fast) var(--ease-ui), background-color var(--d-fast) var(--ease-ui);
}

.nav-links a:hover { color: var(--paper); background: rgb(255 255 255 / 0.04); }

.nav-links a[aria-current] { color: var(--paper); }

/* Active-page marker: a short royal rule that grows from the centre. */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--royal-hi);
  transform: translateX(-50%) scaleX(0);
  transition: transform var(--d-base) var(--ease-out);
}

.nav-links a[aria-current]::after { transform: translateX(-50%) scaleX(1); }

.nav-actions { display: none; }
@media (min-width: 1024px) { .nav-actions { display: block; } }

/* --- Mobile trigger ------------------------------------------------------ */

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  border-radius: var(--r-md);
  color: var(--paper);
}

@media (min-width: 1024px) { .nav-toggle { display: none; } }

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 12px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--d-base) var(--ease-in-out), opacity var(--d-fast) var(--ease-ui);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5.25px; }
.nav-toggle__bars span:nth-child(3) { top: 10.5px; }

/* Bars morph into a cross rather than swapping icons. */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5.25px) rotate(-45deg);
}

/* --- Mobile sheet -------------------------------------------------------- */

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 1.5rem) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  background: rgb(7 9 14 / 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--d-base) var(--ease-ui), visibility var(--d-base) var(--ease-ui);
}

.nav-sheet.is-open { opacity: 1; visibility: visible; }

@media (min-width: 1024px) { .nav-sheet { display: none; } }

.nav-sheet a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--paper);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}

.nav-sheet.is-open a { opacity: 1; transform: none; }

.nav-sheet a span { color: var(--steel); font-family: var(--font-mono); font-size: var(--t-micro); }
.nav-sheet a[aria-current] span { color: var(--royal-hi); }

.nav-sheet__foot { margin-top: auto; padding-top: 1.75rem; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 900px);
  padding-block: calc(var(--nav-h) + 4rem) 5rem;
  overflow: hidden;
}

/* The node-network canvas. Sits behind content, ignores pointer events. */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s var(--ease-out);
}
.hero-canvas.is-ready { opacity: 1; }

/* A single soft royal wash, low opacity, positioned off-centre so it reads
   as depth rather than as a decorative blob. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgb(43 95 227 / 0.13), transparent 70%),
    linear-gradient(to bottom, transparent 55%, var(--ink) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero__content { max-width: 54rem; }

.hero h1 { margin-top: 1.5rem; }

/* Two-tone headline: the second clause drops to silver so the first clause
   carries the weight. No gradient text. */
.hero h1 .soft { color: var(--silver); font-weight: 700; }

.hero__lead { margin-top: 1.5rem; max-width: 40rem; }

.hero__actions { margin-top: 2.5rem; }

.hero__meta {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}

.hero__meta div { display: grid; gap: 0.2rem; }
.hero__meta dt { font-size: var(--t-micro); font-family: var(--font-mono);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); }
.hero__meta dd { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-hint svg { width: 16px; height: 16px; animation: hint 2.4s var(--ease-in-out) infinite; }

@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 640px) { .scroll-hint { display: none; } }

/* --- Headline entrance --------------------------------------------------- */
/* Lines rise out from behind a clipping mask - typesetting, not a generic
   fade. Driven by CSS animation rather than a JS-applied class: animations
   start on their own at first paint, so the hero can never be left blank by
   a throttled rAF, a deferred script, or JS being off entirely.
   `both` fill mode holds the start frame through the delay. */

.reveal-line {
  /* The mask has to clear the descenders. Plus Jakarta Sans carries a 1.26em
     content area, so at any display line-height below that the tails of g/y/p
     hang outside the line box - and this overflow:hidden would crop them flat.
     Pad the mask past them, then pull the extra height back out of the flow so
     the leading is exactly what line-height asked for. 0.18em also clears the
     roomier fallbacks (Segoe UI et al) if the webfont never arrives. */
  --descender-room: 0.18em;

  display: block;
  overflow: hidden;
  padding-bottom: var(--descender-room);
  margin-bottom: calc(var(--descender-room) * -1);
}

.reveal-line > span {
  display: block;
  animation: line-rise 820ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 85ms + 80ms);
}

@keyframes line-rise {
  /* Starts below the padded mask edge rather than the line box, or the top of
     the rising line would show through the descender gap before its turn. */
  from { transform: translateY(calc(105% + var(--descender-room))); }
}

.fade-up {
  animation: fade-up 700ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms + 260ms);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-line > span,
  .fade-up { animation: none; }
}

/* ==========================================================================
   Section furniture
   ========================================================================== */

.section-head { max-width: 44rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 1rem; }
.section-head p { margin-top: 1rem; }

/* Numbered section index, top-right - a drafting-sheet convention. */
.section-index {
  position: absolute;
  top: calc(var(--section-y) - 0.5rem);
  right: var(--gutter);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.2em;
  color: var(--line-hi);
}

@media (max-width: 900px) { .section-index { display: none; } }

/* ==========================================================================
   Marquee - technology strip
   ========================================================================== */

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 0;
}

.marquee__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
  min-width: max-content;
  animation: marquee 46s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__track span {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  color: var(--steel);
  white-space: nowrap;
  transition: color var(--d-fast) var(--ease-ui);
}

.marquee__track span:hover { color: var(--silver); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}

/* ==========================================================================
   Terminal
   ========================================================================== */

.terminal {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #060810;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
}

/* Window dots stay monochrome - traffic-light colours would fight the
   palette for no informational gain. */
.terminal__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-hi);
}

.terminal__title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--steel);
}

.terminal__body {
  margin: 0;
  padding: 1.25rem;
  min-height: 260px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--silver);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}

.terminal__body .ok { color: var(--positive); }
.terminal__body .cmd { color: var(--paper); }
.terminal__body .key { color: var(--royal-hi); }

.caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  vertical-align: text-bottom;
  background: var(--royal-hi);
  animation: caret 1.05s step-end infinite;
}

@keyframes caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

/* 1px gaps on a --line background give hairline dividers with no extra
   borders to keep in sync. */
.stats > div {
  background: var(--navy);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  text-align: center;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin-top: 0.5rem;
  font-size: var(--t-micro);
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ==========================================================================
   Process timeline (mentorship)
   ========================================================================== */

.phases { position: relative; display: grid; gap: 1.5rem; }

@media (min-width: 900px) {
  .phases { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  /* Connecting rule threaded behind the phase cards. */
  .phases::before {
    content: "";
    position: absolute;
    top: 3.9rem;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line-hi), transparent);
  }
}

.phase__step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line-hi);
  border-radius: 50%;
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--royal-hi);
}

/* ==========================================================================
   Project catalogue
   ========================================================================== */

.filters { padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem); }

.search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  background: var(--navy-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--d-fast) var(--ease-ui), box-shadow var(--d-fast) var(--ease-ui);
}

.search:focus-within {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px var(--royal-wash);
}

.search svg { width: 17px; height: 17px; flex: none; color: var(--steel); }

.search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  background: none;
  border: 0;
  font-size: var(--t-sm);
}
.search input:focus { outline: none; }

.search__clear {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r-sm);
  color: var(--steel);
}
.search__clear:hover { color: var(--paper); background: var(--navy-hi); }
.search__clear[hidden] { display: none; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.filter-row__label {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-right: 0.25rem;
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: var(--t-sm);
  color: var(--silver);
}

.results-bar strong { color: var(--paper); font-variant-numeric: tabular-nums; }

.project-grid {
  display: grid;
  gap: clamp(1rem, 0.7rem + 1vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

/* Cards animate in on filter change; JS restamps --i to re-stagger them. */
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  animation: card-in 500ms var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card { animation: none; }
}

/* Monogram plate instead of a stock image - honest, and zero bytes. */
.project-card__plate {
  position: relative;
  display: grid;
  place-items: center;
  height: 132px;
  background:
    linear-gradient(135deg, var(--navy-soft), var(--navy)),
    var(--navy);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-card__plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

.project-card__mono {
  position: relative;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--line-hi);
  transition: color var(--d-slow) var(--ease-out);
}

.project-card:hover .project-card__mono { color: var(--royal-hi); }

.project-card__cat {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgb(7 9 14 / 0.8);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--silver);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem;
}

.project-card__title { font-size: 1rem; font-weight: 700; letter-spacing: -0.015em; }

.project-card__desc {
  margin-top: 0.5rem;
  font-size: var(--t-xs);
  color: var(--silver);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__stack { margin-top: 1rem; }

.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.price {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.price span { font-size: var(--t-micro); color: var(--steel); font-weight: 500; }

.empty-state {
  padding: clamp(3rem, 2rem + 5vw, 5rem) 1.5rem;
  text-align: center;
  border: 1px dashed var(--line-hi);
  border-radius: var(--r-lg);
}

.empty-state svg { width: 34px; height: 34px; margin-inline: auto; color: var(--steel); }

/* ==========================================================================
   Wizard
   ========================================================================== */

.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.steps__item { display: grid; gap: 0.5rem; }

.steps__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.steps__bar::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--royal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--d-slow) var(--ease-out);
}

.steps__item.is-done .steps__bar::after,
.steps__item.is-active .steps__bar::after { transform: scaleX(1); }

.steps__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color var(--d-base) var(--ease-ui);
}

.steps__item.is-active .steps__label { color: var(--paper); }

@media (max-width: 520px) { .steps__label { display: none; } }

.wizard__pane { display: none; }
.wizard__pane.is-active {
  display: block;
  animation: pane-in 340ms var(--ease-out);
}

@keyframes pane-in {
  from { opacity: 0; transform: translateX(14px); }
}

/* Going back should feel like going back. */
.wizard__pane.is-active.is-back { animation-name: pane-in-back; }
@keyframes pane-in-back {
  from { opacity: 0; transform: translateX(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .wizard__pane.is-active { animation: none; }
}

.wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.wizard__done {
  display: grid;
  place-items: center;
  gap: 0.9rem;
  padding: 3rem 1rem;
  text-align: center;
}

.wizard__done svg { width: 46px; height: 46px; color: var(--positive); }

/* Spinner for the submit button. */
.spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid rgb(255 255 255 / 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Call to action band
   ========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) var(--gutter);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 120% at 50% 0%, rgb(43 95 227 / 0.13), transparent 65%),
    var(--navy);
}

.cta__inner { position: relative; max-width: 38rem; margin-inline: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-soft);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.5fr; gap: 2rem; }
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1.15rem;
}

.footer-links { display: grid; gap: 0.7rem; }
.footer-links a { font-size: var(--t-sm); color: var(--silver); transition: color var(--d-fast) var(--ease-ui); }
.footer-links a:hover { color: var(--paper); }

.social { display: flex; gap: 0.5rem; margin-top: 1.5rem; }

.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--silver);
  transition: color var(--d-fast) var(--ease-ui), border-color var(--d-fast) var(--ease-ui),
    background-color var(--d-fast) var(--ease-ui);
}

.social a:hover { color: var(--paper); border-color: var(--line-hi); background: var(--navy); }
.social svg { width: 17px; height: 17px; }

.subscribe { display: flex; gap: 0.5rem; margin-top: 1rem; }
.subscribe .input { flex: 1; min-width: 0; }

.subscribe button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  background: var(--royal);
  color: #fff;
  border-radius: var(--r-md);
  transition: background-color var(--d-fast) var(--ease-ui);
}
.subscribe button:hover { background: #3a6cea; }
.subscribe button:disabled { opacity: 0.5; }
.subscribe svg { width: 17px; height: 17px; }

.form-status { margin-top: 0.6rem; font-size: var(--t-micro); min-height: 1rem; }
.form-status.is-ok { color: var(--positive); }
.form-status.is-error { color: var(--negative); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--steel);
}

/* ==========================================================================
   Back to top
   ========================================================================== */

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgb(14 21 36 / 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--silver);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity var(--d-base) var(--ease-ui),
    visibility var(--d-base) var(--ease-ui),
    transform var(--d-base) var(--ease-out),
    color var(--d-fast) var(--ease-ui),
    border-color var(--d-fast) var(--ease-ui);
}

.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--paper); border-color: var(--line-hi); }
.to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */

.page-head {
  position: relative;
  padding-block: calc(var(--nav-h) + clamp(3rem, 2rem + 4vw, 5.5rem)) clamp(2.5rem, 2rem + 2vw, 3.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(55% 70% at 50% 0%, rgb(43 95 227 / 0.11), transparent 70%);
}

.page-head__inner { position: relative; z-index: 1; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--steel);
  margin-bottom: 1.25rem;
}

.breadcrumb a { color: var(--steel); transition: color var(--d-fast) var(--ease-ui); }
.breadcrumb a:hover { color: var(--silver); }
.breadcrumb svg { width: 12px; height: 12px; }

/* ==========================================================================
   404
   ========================================================================== */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 4rem;
  text-align: center;
}

.notfound__code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 2rem + 12vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--line-hi);
}
