/* ==========================================================================
   The Digital Commons Project — design system
   Blues, purples, triangles.
   ========================================================================== */

:root {
  /* Brand — overridden at runtime from data/content.json → site.theme */
  --accent:        #5B7CFA;
  --accent-2:      #8B5CF6;
  --accent-3:      #38BDF8;

  /* Ink & paper */
  --ink:           #10142B;
  --ink-2:         #39406B;
  --ink-3:         #6B7299;
  --paper:         #FFFFFF;
  --paper-2:       #F5F6FC;
  --paper-3:       #ECEEF9;
  --line:          #E0E3F2;

  /* Dark band */
  --night:         #0B1026;
  --night-2:       #141B3D;
  --night-line:    rgba(255,255,255,.14);
  --night-ink:     #EEF0FF;
  --night-ink-2:   #A8B0DC;

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-body:    "Inter", ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  /* Space scale */
  --s-1: .5rem;  --s-2: .75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;   --s-6: 3rem;   --s-7: 4rem;   --s-8: 6rem;

  --radius:    14px;
  --radius-lg: 22px;
  --shadow:    0 1px 2px rgba(16,20,43,.05), 0 8px 24px -12px rgba(16,20,43,.16);
  --shadow-lg: 0 2px 4px rgba(16,20,43,.05), 0 24px 56px -20px rgba(16,20,43,.28);

  --container: 1200px;
  --header-h: 72px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.45rem + 2.6vw, 3.45rem); }
h2 { font-size: clamp(1.85rem, 1.25rem + 2.3vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); letter-spacing: -.015em; }
p  { text-wrap: pretty; }

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

/* ---------- layout primitives ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
@media (max-width: 640px) { .container { width: min(100% - 2rem, var(--container)); } }

.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); position: relative; }
.section--tint { background: var(--paper-2); }
.section--night { background: var(--night); color: var(--night-ink-2); }
.section--night h2, .section--night h3 { color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- eyebrow / section head ---------- */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-3);
}
/* Inline marker so long eyebrows wrap cleanly with the triangle on line one. */
.eyebrow::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 0; height: 0; margin-right: .55rem; position: relative; top: -1px;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 10px solid currentColor;
}
.section--night .eyebrow { color: var(--accent-3); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section-head p { font-size: 1.125rem; margin-top: var(--s-3); color: var(--ink-3); }
.section--night .section-head p { color: var(--night-ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 700; font-size: .975rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { color: #fff; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent-2) 70%, transparent); }
.btn--ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--paper); }
.btn--on-night { border-color: var(--night-line); background: rgba(255,255,255,.06); color: #fff; }
.btn--on-night:hover { border-color: var(--accent-3); color: #fff; background: rgba(255,255,255,.12); }
.btn--sm { padding: .5rem 1rem; font-size: .875rem; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--night-line);
}
.header__inner {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: 38px; flex: none; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: .92rem; line-height: 1.12; letter-spacing: .01em; text-transform: uppercase;
  max-width: 13ch;
}
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a.nav__cta { display: none; }
@media (max-width: 900px) { .nav a.nav__cta { display: block; } }
.nav a {
  font-family: var(--font-display); font-weight: 600; font-size: .925rem;
  color: var(--night-ink-2); text-decoration: none;
  padding: .5rem .7rem; border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}
.nav a:hover, .nav a.is-active { color: #fff; background: rgba(255,255,255,.09); }
.header .btn { margin-left: .5rem; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--night-line); background: rgba(255,255,255,.06);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); border-bottom: 1px solid var(--night-line);
    padding: var(--s-3) 1.25rem var(--s-4);
    transform: translateY(-120%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: .85rem .5rem; font-size: 1.05rem; border-bottom: 1px solid var(--night-line); border-radius: 0; }
  .nav a.nav__cta {
    border-bottom: 0; margin-top: var(--s-3); text-align: center; border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  }
  .header > .container > .btn { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--night); color: var(--night-ink-2);
  padding-block: clamp(3.5rem, 2rem + 8vw, 7rem) clamp(4rem, 2rem + 8vw, 7.5rem);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__bg img {
  position: absolute; right: -14%; top: -18%;
  width: min(1000px, 78vw); height: auto; opacity: .5;
  -webkit-mask-image: radial-gradient(70% 70% at 62% 38%, #000 18%, transparent 76%);
          mask-image: radial-gradient(70% 70% at 62% 38%, #000 18%, transparent 76%);
}
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 180px; z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--night)); pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; display: grid; gap: clamp(2.5rem, 1rem + 5vw, 4.5rem); align-items: center; }
@media (min-width: 1000px) { .hero__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); } }

.hero h1 { color: #fff; }
.hero h1 .accent {
  display: block;
  background: linear-gradient(105deg, var(--accent-3) 0%, var(--accent) 42%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: .62em; line-height: 1.2; margin-top: .45em; letter-spacing: -.015em;
}
.hero__body { font-size: 1.1rem; margin-top: var(--s-4); max-width: 60ch; color: var(--night-ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 3.5rem);
  padding-top: var(--s-4); border-top: 1px solid var(--night-line);
}
.hero__stat strong {
  display: block; font-family: var(--font-display); font-size: 2.1rem; color: #fff; line-height: 1;
  letter-spacing: -.03em;
}
.hero__stat span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--night-ink-2); }

.hero__art { position: relative; }
.hero__art img {
  width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
}
.hero__art::before {
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius-lg);
  border: 1px solid var(--night-line); pointer-events: none; z-index: 1;
}
@media (max-width: 999px) { .hero__art { display: none; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--s-4); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 1rem + 1vw, 2rem);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card p { color: var(--ink-3); }

/* numbered horizon cards */
.horizon { position: relative; overflow: hidden; }
.horizon__label {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: #fff; padding: .3rem .7rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); align-self: flex-start;
}
.horizon__tri { position: absolute; right: -24px; bottom: -28px; width: 120px; opacity: .1; }

/* issues list */
.issue { display: flex; gap: var(--s-3); align-items: flex-start; }
.issue__tri { flex: none; width: 26px; margin-top: .3rem; }

/* ---------- articles ---------- */
.articles__toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: var(--s-4);
}
.chip {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink-2); cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.articles { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

.article {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* The whole card is clickable (the share control opts out in site.js).
   The title and "Read" stay real links, so keyboard and screen-reader
   users still have a proper, focusable route into the article. */
.article { cursor: pointer; }
.article:hover,
.article:focus-within {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.article:hover h3 a { color: var(--accent); }
.article .share { cursor: auto; }
.article__media { position: relative; aspect-ratio: 16 / 10; background: var(--paper-3); overflow: hidden; }
.article__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.article:hover .article__media img { transform: scale(1.04); }
.article__tag {
  position: absolute; top: .75rem; left: .75rem;
  font-family: var(--font-display); font-weight: 700; font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: rgba(11,16,38,.72); backdrop-filter: blur(6px);
  padding: .3rem .6rem; border-radius: 999px;
}
.article__body { padding: var(--s-4); display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.article__meta {
  font-size: .8rem; letter-spacing: .04em; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.article__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.article h3 { font-size: 1.22rem; }
.article h3 a { color: inherit; text-decoration: none; }
.article h3 a:hover { color: var(--accent); }
.article__excerpt { color: var(--ink-3); font-size: .98rem; flex: 1; }
.article__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding-top: var(--s-2); border-top: 1px solid var(--line); margin-top: .4rem;
}
.link-arrow {
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: .35rem;
}
.link-arrow::after { content: "→"; transition: transform .16s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* share */
.share { position: relative; }
.share__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: .4rem .85rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  transition: all .15s ease;
}
.share__btn:hover { border-color: var(--accent); color: var(--accent); }
.share__btn svg { width: 15px; height: 15px; }
.share__menu {
  position: absolute; right: 0; bottom: calc(100% + .5rem); z-index: 30;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: .35rem; min-width: 190px;
  display: none;
}
.share__menu[data-open="true"] { display: block; }
.share__menu button, .share__menu a {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  background: none; border: 0; text-align: left; cursor: pointer;
  padding: .55rem .7rem; border-radius: 8px; font-size: .9rem; color: var(--ink-2);
  text-decoration: none;
}
.share__menu button:hover, .share__menu a:hover { background: var(--paper-2); color: var(--ink); }
.share__menu svg { width: 16px; height: 16px; flex: none; opacity: .75; }

/* article reader dialog */
.reader {
  /* margin:auto restores native <dialog> centring, which the global
     `* { margin: 0 }` reset above would otherwise cancel. */
  margin: auto;
  border: 0; padding: 0; width: min(760px, 100% - 2rem); max-height: 88dvh;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  background: var(--paper); color: var(--ink-2);
}
.reader::backdrop { background: rgba(11,16,38,.62); backdrop-filter: blur(3px); }
.reader__scroll { overflow-y: auto; max-height: 88dvh; }
.reader__media { aspect-ratio: 21 / 9; background: var(--paper-3); }
.reader__media img { width: 100%; height: 100%; object-fit: cover; }
.reader__body { padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
.reader__body h2 { margin-bottom: .5rem; }
.reader__body p { margin-top: 1rem; font-size: 1.06rem; }
.reader__close {
  position: absolute; top: .85rem; right: .85rem; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); background: rgba(11,16,38,.6); color: #fff;
  font-size: 1.15rem; line-height: 1; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
.reader__close:hover { background: rgba(11,16,38,.85); }
.reader__foot {
  display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: space-between;
  padding: var(--s-3) clamp(1.5rem, 1rem + 2vw, 2.75rem) clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

/* ---------- press ---------- */
.press-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.press-item {
  display: grid; gap: .3rem 1.5rem; padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr; align-items: baseline;
  transition: background-color .15s ease;
}
@media (min-width: 760px) { .press-item { grid-template-columns: 8.5rem 1fr auto; } }
.press-item__year {
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.press-item__title { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.1rem; line-height: 1.3; }
.press-item__title a { color: inherit; text-decoration: none; }
.press-item__title a:hover { color: var(--accent); text-decoration: underline; }
.press-item__meta { font-size: .92rem; color: var(--ink-3); margin-top: .2rem; }
.press-item__ext { font-size: .85rem; white-space: nowrap; }

/* ---------- team ---------- */
.team-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.member { text-align: left; }
.member__avatar {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s-3);
  background: linear-gradient(var(--a, 140deg), var(--c1, #5B7CFA) 0%, var(--c2, #8B5CF6) 100%);
  display: grid; place-items: center; position: relative;
}
.member__avatar img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.member__initials {
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: #fff;
  letter-spacing: -.02em; position: relative; z-index: 1;
}
.member__deco { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .3; }

/* Avatar as a LinkedIn link. The name beside it links to the same place, and
   carries the accessible label — the photo is aria-hidden so screen readers
   hear one link per person, not two. */
a.member__avatar { cursor: pointer; text-decoration: none; }
a.member__avatar:hover img { transform: scale(1.04); }
.member__li {
  position: absolute; right: .6rem; bottom: .6rem; z-index: 2;
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(11,16,38,.66); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .18s ease, transform .18s ease;
}
.member__li svg { width: 15px; height: 15px; }
a.member__avatar:hover .member__li,
.member:focus-within .member__li { background: #0A66C2; transform: translateY(-2px); }

.member h3 a { color: inherit; text-decoration: none; }
.member h3 a:hover { color: var(--accent); }
.member h3 { font-size: 1.08rem; }
.member__role { color: var(--accent); font-weight: 600; font-size: .92rem; margin-top: .15rem; }
.member__creds { font-size: .82rem; color: var(--ink-3); letter-spacing: .04em; margin-top: .15rem; }
.member__bio { font-size: .94rem; color: var(--ink-3); margin-top: .5rem; }

/* ---------- resources ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-3); border: 1px solid var(--night-line);
  background: rgba(255,255,255,.06); padding: .35rem .8rem; border-radius: 999px;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.section--night .card {
  background: rgba(255,255,255,.045); border-color: var(--night-line); color: var(--night-ink-2);
}
.section--night .card:hover { border-color: var(--accent-3); background: rgba(255,255,255,.07); }
.section--night .card p { color: var(--night-ink-2); }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }

.form { display: grid; gap: var(--s-3); }
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  letter-spacing: .03em; color: var(--ink);
}
.field .req { color: var(--accent-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .9rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.field textarea { min-height: 150px; resize: vertical; }
.form__row { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hp { position: absolute; left: -9999px; }

.contact-card {
  background: var(--night); color: var(--night-ink-2); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); position: relative; overflow: hidden;
}
.contact-card h3 { color: #fff; }
.contact-card__tri { position: absolute; right: -40px; bottom: -40px; width: 180px; opacity: .16; }
.contact-card a { color: var(--accent-3); }
.contact-card dl { margin-top: var(--s-4); display: grid; gap: var(--s-3); position: relative; z-index: 1; }
.contact-card dt {
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--night-ink-2); opacity: .75;
}
.contact-card dd { margin: .15rem 0 0; font-size: 1.02rem; color: #fff; word-break: break-word; }

/* ---------- footer ---------- */
.footer { background: var(--night); color: var(--night-ink-2); padding-block: var(--s-6) var(--s-4); }
.footer__top {
  display: grid; gap: var(--s-5); padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--night-line);
}
@media (min-width: 800px) { .footer__top { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.footer .brand__name { max-width: none; }
.footer__blurb { margin-top: var(--s-3); max-width: 46ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-content: start; }
.footer__links a { color: var(--night-ink-2); text-decoration: none; font-size: .95rem; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: space-between;
  padding-top: var(--s-4); font-size: .875rem;
}
.footer__bottom a { color: var(--night-ink-2); }
.footer__bottom a:hover { color: #fff; }

/* ---------- notices ---------- */
.notice {
  border: 1px solid #F5C77E; background: #FFF8EC; color: #7A4B00;
  border-radius: var(--radius); padding: var(--s-4); margin-block: var(--s-4);
  font-size: .95rem;
}
.notice h3 { color: #7A4B00; font-size: 1.05rem; margin-bottom: .4rem; }
.notice code {
  background: rgba(0,0,0,.07); padding: .12rem .4rem; border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
}
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 200%);
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 999px;
  font-size: .92rem; z-index: 200; box-shadow: var(--shadow-lg);
  transition: transform .3s cubic-bezier(.2,.9,.3,1);
}
.toast[data-show="true"] { transform: translate(-50%, 0); }

.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Reveal on scroll.
   Content is visible by default; the hidden state is opt-in via html.anim,
   which JS only adds when IntersectionObserver is available. A safety timer
   in site.js reveals everything regardless, so content can never get stuck. */
.reveal { opacity: 1; transform: none; }
html.anim .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
html.anim .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.anim .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- contact form status ---------- */
.form__status {
  font-size: .95rem; line-height: 1.5; margin-top: .25rem;
  border-radius: 10px; padding: 0; border: 1px solid transparent;
}
.form__status[data-kind] { padding: .7rem .9rem; }
.form__status:empty { display: none; }
.form__status[data-kind="ok"]   { background: #F0FCF5; border-color: #86E3B0; color: #16653C; }
.form__status[data-kind="err"]  { background: #FFF5F5; border-color: #F5A8A8; color: #9B1C1C; }
.form__status[data-kind="note"] { background: #FFF8EC; border-color: #F5C77E; color: #7A4B00; }
.form__status a { color: inherit; font-weight: 600; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
