/* ==========================================================================
   Components: header, glass, cards, timeline, skills, marquee, forms, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   Glass surface
   The ::before carries a hairline that catches light along the top edge.
   Masking rather than border-image keeps the radius crisp.
   -------------------------------------------------------------------------- */

.glass {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass)) saturate(115%);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(115%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.22), rgba(255, 253, 248, 0.02) 38%, transparent 68%);
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              backdrop-filter var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(10, 10, 11, 0.74);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom-color: var(--hairline);
}

.header__inner {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

/* Wordmark ---------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }

/* Line-drawn cube, no tile: the mark sits on the page like a diagram glyph.
   Hidden edges and nodes stay quiet until hover. */
.brand__mark {
  width: 38px; height: 38px;
  flex: none;
  color: var(--text);
}
.brand__mark-hidden { opacity: 0.35; transition: opacity var(--dur) var(--ease-out); }
.brand__mark-nodes { opacity: 0.8; transition: opacity var(--dur) var(--ease-out); }
.brand:hover .brand__mark-hidden { opacity: 0.8; }
.brand:hover .brand__mark-nodes { opacity: 1; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: var(--tracking-display);
}
.brand__role {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Desktop nav ------------------------------------------------------------- */
.nav { display: flex; align-items: center; gap: 0.15rem; }

.nav__link {
  position: relative;
  padding: 0.5rem 0.95rem;
  font-size: var(--step--1);
  font-weight: 450;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--text); }

.nav__link.active { color: var(--text); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 14px; height: 1px;
  translate: -50% 0;
  background: var(--stone);
}

.header__actions { display: flex; align-items: center; gap: var(--space-3); }

/* Scroll progress --------------------------------------------------------- */
.scroll-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: var(--stone);
  opacity: 0.75;
}

/* Mobile ------------------------------------------------------------------ */
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--surface);
  place-items: center;
}
.menu-toggle__bars { position: relative; width: 18px; height: 12px; }
.menu-toggle__bars span {
  position: absolute; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 5px; }
.menu-toggle__bars span:nth-child(3) { top: 10px; }

.menu-toggle.is-open .menu-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: var(--z-overlay);
  padding: var(--space-6) var(--gutter) var(--space-8);
  background: rgba(10, 10, 11, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }

.mobile-nav__link {
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav__link.active { color: var(--text); }
.mobile-nav__link .idx { font-size: 0.75rem; color: var(--text-faint); font-family: var(--font-mono); }

.mobile-nav__footer { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-4); }

@media (max-width: 920px) {
  .nav, .header__actions .btn { display: none; }
  .menu-toggle { display: grid; }
}

/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */

.section-head { margin-bottom: clamp(2rem, 1rem + 3vw, 3.75rem); max-width: 760px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* No pill, no border. A hairline rule and wide tracking do the work. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: var(--space-5);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--hairline-accent);
}
.section-head--center .eyebrow::before { display: none; }

.eyebrow__dot { display: none; }

.section-title { font-size: var(--step-4); margin-bottom: var(--space-4); }
.section-sub { color: var(--text-muted); font-size: var(--step-1); max-width: 62ch; }
.section-head--center .section-sub { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Chips, badges, tags
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}
.chip--accent { border-color: var(--hairline-accent); color: var(--stone); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--stone);
  animation: pulse-ring 2.6s infinite;
  flex: none;
}

/* Filter bar -------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: var(--space-7);
  border-bottom: 1px solid var(--hairline);
}

.filter-btn {
  padding: 0.7rem 1.15rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-size: var(--step--1);
  font-weight: 450;
  color: var(--text-faint);
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.filter-btn:hover { color: var(--text-muted); }
.filter-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--stone);
}
.filter-btn span { font-family: var(--font-mono); font-size: 0.75rem; margin-left: 0.3rem; }

/* --------------------------------------------------------------------------
   Tilt card
   -------------------------------------------------------------------------- */

.tilt {
  transform-style: preserve-3d;
  transition: transform 440ms var(--ease-out), box-shadow var(--dur) var(--ease-out);
  will-change: transform;
}
.tilt__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 253, 248, 0.07), transparent 62%);
  transition: opacity var(--dur) var(--ease-out);
}
.tilt:hover .tilt__glare { opacity: 1; }

/* --------------------------------------------------------------------------
   Project card
   All cards are identical in treatment now. Distinction comes from the
   writing, not from a per-project colour.
   -------------------------------------------------------------------------- */

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: clamp(1.4rem, 1rem + 1.1vw, 2.1rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass)) saturate(115%);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(115%);
  border: 1px solid var(--hairline);
  overflow: hidden;
  isolation: isolate;
  transition: transform 440ms var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}

.project-card:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-hover);
}

.project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

/* Serif monogram in a hairline square. Reads like a plate, not a badge. */
.project-card__mono {
  width: 48px; height: 48px;
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.project-card:hover .project-card__mono { color: var(--text); border-color: var(--hairline-accent); }

.project-card__meta { text-align: right; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.project-card__year { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); letter-spacing: 0.04em; }

.project-card__title {
  font-size: var(--step-2);
  margin-bottom: 0.45rem;
}

.project-card__subtitle {
  font-size: var(--step--1);
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-display);
  margin-bottom: var(--space-4);
}
.project-card__summary { color: var(--text-muted); font-size: var(--step--1); line-height: 1.65; }

/* Wraps rather than crushes: on a narrow card the link drops to its own line
   instead of fighting the stats for the same row. */
.project-card__foot {
  margin-top: auto;
  padding-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.project-card__stats {
  display: flex;
  gap: var(--space-5);
  flex: 1 1 auto;
  min-width: 0;
}
.project-card__stat-val {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.project-card__stat-lbl {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  text-wrap: balance;
}

.project-card__cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: var(--step--1); font-weight: 500; color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
  transition: color var(--dur) var(--ease-out);
}
.project-card__cta svg { width: 0.95em; height: 0.95em; transition: transform var(--dur) var(--ease-out); }
.project-card:hover .project-card__cta { color: var(--text); }
.project-card:hover .project-card__cta svg { transform: translateX(4px); }

.project-card--wide { grid-column: span 2; min-height: 300px; }
@media (max-width: 900px) { .project-card--wide { grid-column: span 1; } }

/* --------------------------------------------------------------------------
   Metric block
   -------------------------------------------------------------------------- */

.metric { padding: clamp(1.2rem, 0.9rem + 0.9vw, 1.9rem); }

.metric__value {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric__label {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text);
}
.metric__caption { margin-top: 0.3rem; font-size: 0.75rem; color: var(--text-faint); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Expertise card
   -------------------------------------------------------------------------- */

.expertise-card {
  padding: clamp(1.4rem, 1rem + 1vw, 2.1rem);
  border-radius: var(--radius-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 440ms var(--ease-out), border-color var(--dur) var(--ease-out);
}
.expertise-card:hover { transform: translateY(-4px); border-color: var(--hairline-strong); }

.expertise-card__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  border: 1px solid var(--hairline);
  color: var(--stone);
}
.expertise-card__icon svg { width: 19px; height: 19px; }

.expertise-card__title { font-size: var(--step-1); margin-bottom: 0.65rem; }
.expertise-card__desc { font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--space-5); }

.expertise-card__points { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin-top: auto; }
.expertise-card__points li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.82rem; color: var(--text-muted);
}
.expertise-card__points li::before {
  content: "";
  width: 10px; height: 1px;
  margin-top: 0.72em;
  flex: none;
  background: var(--hairline-accent);
}

/* --------------------------------------------------------------------------
   Timeline
   The rail fills as it scrolls into view (--fill set by site.js).
   -------------------------------------------------------------------------- */

.timeline { position: relative; padding-left: clamp(1.75rem, 1rem + 3vw, 3rem); }

.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--hairline);
}
.timeline::after {
  content: "";
  position: absolute;
  left: 5px; top: 6px;
  width: 1px;
  height: calc(var(--fill, 0) * 100%);
  max-height: calc(100% - 12px);
  background: var(--stone);
  opacity: 0.8;
  transition: height 220ms linear;
}

.timeline__item { position: relative; padding-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: calc(-1 * clamp(1.75rem, 1rem + 3vw, 3rem) + 1px);
  top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  z-index: 1;
  transition: all var(--dur) var(--ease-out);
}
.timeline__item.is-visible .timeline__dot { border-color: var(--hairline-accent); }
.timeline__item--current .timeline__dot {
  background: var(--stone);
  border-color: var(--stone);
}

.timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; margin-bottom: 0.4rem; }
.timeline__title { font-size: var(--step-2); }
.timeline__org {
  font-size: var(--step-0);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--stone);
}
.timeline__org-note {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.16rem 0.5rem;
}

.timeline__period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.timeline__location { font-size: 0.78rem; color: var(--text-faint); margin-bottom: var(--space-4); }
.timeline__summary { color: var(--text-muted); font-size: var(--step--1); margin-bottom: var(--space-4); max-width: 66ch; }

.timeline__highlights { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: var(--space-4); }
.timeline__highlights li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 68ch;
}
.timeline__highlights li::before {
  content: "";
  position: absolute; left: 0; top: 0.68em;
  width: 12px; height: 1px;
  background: var(--hairline-accent);
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.skill-group { padding: clamp(1.4rem, 1rem + 1vw, 2rem); border-radius: var(--radius-lg); height: 100%; }

.skill-group__head {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--hairline);
}
.skill-group__icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  color: var(--stone);
}
.skill-group__icon svg { width: 15px; height: 15px; }
.skill-group__name { font-size: var(--step-0); font-weight: 400; font-family: var(--font-display); }

.skill { margin-bottom: var(--space-4); }
.skill:last-child { margin-bottom: 0; }

.skill__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.skill__name { font-size: 0.84rem; color: var(--text); }
.skill__level { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.skill__track {
  height: 2px;
  background: rgba(240, 236, 228, 0.07);
  overflow: hidden;
}
.skill__bar {
  height: 100%;
  width: 0;
  background: var(--stone);
  transition: width 1200ms var(--ease-out) var(--bar-delay, 0ms);
}
.is-visible .skill__bar { width: var(--level); }
.no-js .skill__bar { width: var(--level); }

/* --------------------------------------------------------------------------
   Marquee
   Duplicated track + 50% translate = a seamless loop with no JS.
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-4);
  border-block: 1px solid var(--hairline);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  animation: marquee-scroll var(--marquee-duration, 46s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

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

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.marquee__item:hover { color: var(--text-muted); }
.marquee__item::after {
  content: "";
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */

.quote-card { padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.4rem); border-radius: var(--radius-lg); height: 100%; display: flex; flex-direction: column; }
.quote-card__mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.6;
  color: var(--stone);
  opacity: 0.3;
  margin-bottom: var(--space-4);
}
.quote-card__text {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--text);
  line-height: 1.55;
  margin-bottom: var(--space-5);
}
.quote-card__author { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--hairline); }
.quote-card__name { font-weight: 500; font-size: var(--step--1); }
.quote-card__title { font-size: 0.77rem; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field__label .req { color: var(--stone); margin-left: 0.15rem; }

/* Underline inputs rather than boxes. Fewer borders, calmer page. */
.field__input,
.field__textarea {
  width: 100%;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid var(--hairline-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--step-0);
  transition: border-color var(--dur) var(--ease-out);
}
.field__input::placeholder,
.field__textarea::placeholder { color: var(--text-faint); }

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-bottom-color: var(--stone);
}

.field__textarea { min-height: 130px; resize: vertical; line-height: 1.65; }

.field__error { font-size: 0.75rem; color: var(--stone); }
.field.has-error .field__input,
.field.has-error .field__textarea { border-bottom-color: var(--stone); }

/* Honeypot: off-screen, not display:none, since some bots skip hidden fields. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form-grid--full { grid-template-columns: 1fr; }

.form-note {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.form-note--ok   { border-color: var(--hairline-accent); color: var(--text); }
.form-note--warn { border-color: var(--hairline-strong); }
.form-note--err  { border-color: var(--hairline-accent); color: var(--text); }
.form-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--stone); }

.spinner {
  width: 14px; height: 14px;
  border: 1px solid rgba(10, 10, 11, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin-slow 700ms linear infinite;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  margin-top: var(--space-9);
  border-top: 1px solid var(--hairline);
}

.footer__inner {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  padding-block: var(--space-8) var(--space-6);
}
/* Brand block takes its own row until there is room for four columns. The old
   260px floor forced a 460px-wide page on phones and zoomed the whole site out. */
.footer__inner > :first-child { grid-column: 1 / -1; }
@media (min-width: 920px) {
  .footer__inner { grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, 1fr)); }
  .footer__inner > :first-child { grid-column: auto; }
}

.footer__tagline { color: var(--text-muted); font-size: var(--step--1); max-width: 36ch; margin-top: var(--space-4); }

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer__links a { font-size: var(--step--1); color: var(--text-muted); }
@media (pointer: coarse) {
  .footer__links { gap: 0.15rem; }
  .footer__links a { display: inline-block; padding-block: 0.6rem; }
}
.footer__links a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--hairline);
  font-size: 0.76rem;
  color: var(--text-faint);
}

.social-row { display: flex; gap: 0.5rem; }
.social-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  transition: all var(--dur) var(--ease-out);
}
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover {
  color: var(--text);
  border-color: var(--hairline-accent);
  transform: translateY(-2px);
}

/* Back to top ------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 50;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: rgba(15, 15, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--dur) var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--text); border-color: var(--hairline-accent); transform: translateY(-2px); }
.to-top svg { width: 16px; height: 16px; }
