/* ==========================================================================
   Global Styles
   Base resets, shared components, and responsive breakpoints.
   Loaded on every page alongside variables.css.
   ========================================================================== */

/* --- Reset & Base --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(circle at 14% -8%, rgba(226, 200, 126, 0.08), transparent 45%),
    radial-gradient(circle at 86% 8%, rgba(122, 138, 90, 0.1), transparent 32%),
    var(--color-bg);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.16em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- Layout --- */

.container {
  width: min(100% - (var(--space-lg) * 2), var(--container));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - (var(--space-lg) * 2), var(--container-wide));
}

/* --- Accessibility --- */

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  color: #111;
  background: var(--color-focus);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-line);
  background: rgba(31, 40, 27, 0.9);
  backdrop-filter: blur(8px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-height);
  padding-block: var(--space-sm);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-tools-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(236, 212, 154, 0.44);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease;
}

.header-tools-btn:hover,
.header-tools-btn:focus-visible {
  background: rgba(236, 212, 154, 0.1);
  border-color: rgba(236, 212, 154, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  max-width: min(22rem, 72vw);
  aspect-ratio: 2812.23 / 654.1;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--grid-gap-md);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-nav a[aria-current="true"] {
  color: var(--color-accent);
  background: rgba(236, 212, 154, 0.16);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

/* Hidden on desktop; shown inside the hamburger menu on mobile. */
.site-nav__mobile-only {
  display: none;
}

.menu-toggle {
  display: none;
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 2.75rem;
  height: 2.5rem;
  padding: var(--space-xs);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.menu-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
}

/* --- Sections --- */

.section {
  position: relative;
  overflow: clip;
  padding-block: var(--section-space-desktop);
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

.section + .section {
  border-top: 1px solid rgba(247, 243, 234, 0.08);
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    125deg,
    rgba(247, 243, 234, 0.04) 0 1px,
    transparent 1px 6px
  );
  opacity: 0.2;
}

.section--hero {
  background:
    linear-gradient(
      110deg,
      rgba(19, 25, 16, 0.76) 0%,
      rgba(21, 29, 18, 0.5) 48%,
      rgba(18, 24, 15, 0.72) 100%
    ),
    radial-gradient(circle at 16% 16%, rgba(226, 200, 126, 0.28), transparent 40%),
    url("../assets/images/hero-mancha-landscape.jpg");
  background-size: cover;
  background-position: center 58%;
}

.section--hero::before {
  opacity: 0.14;
}

.section--olive {
  background: linear-gradient(135deg, var(--color-olive), var(--color-olive-dark));
}

.section--surface {
  background: linear-gradient(180deg, #2d3823 0%, #283220 100%);
}

.section--surface-alt {
  background: linear-gradient(180deg, #35402a 0%, #2f3a25 100%);
}

.section--olive-deep {
  background: linear-gradient(135deg, var(--color-olive-deep), var(--color-olive-deep-dark));
}

/* --- Hero --- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--grid-gap-lg);
  align-items: center;
}

.hero-copy h1 {
  max-width: none;
  margin-bottom: var(--space-md);
  font-size: clamp(2.4rem, 5vw, 4rem);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
  color: var(--color-text-muted);
  max-width: 56ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero-brand {
  margin: 0;
  justify-self: end;
  width: min(100%, 34rem);
  aspect-ratio: 1577.67 / 1290;
}

.hero-brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* --- Flow Utilities --- */

.stack > * + * {
  margin-top: var(--flow-space);
}

.stack h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}

.stack h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
}

/* --- Buttons --- */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid rgba(247, 243, 234, 0.25);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button-link:hover,
.button-link:focus-visible {
  transform: translateY(-1px);
}

.button-link--accent {
  border-color: rgba(226, 200, 126, 0.86);
  background: linear-gradient(135deg, #e8d18f 0%, #d4b76b 100%);
  color: #22270f;
}

.button-link--accent:hover,
.button-link--accent:focus-visible {
  background: linear-gradient(135deg, #efdcaa 0%, #debf73 100%);
  color: #1f250d;
}

.button-link--ghost {
  border-color: rgba(226, 200, 126, 0.55);
  background: rgba(247, 243, 234, 0.03);
  color: var(--color-accent);
}

.button-link--ghost:hover,
.button-link--ghost:focus-visible {
  border-color: rgba(226, 200, 126, 0.86);
  background: rgba(236, 212, 154, 0.12);
}

/* --- Blog Section --- */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr minmax(20rem, 30rem);
  gap: var(--grid-gap-lg);
  align-items: center;
}

.blog-copy h2 {
  margin-bottom: var(--space-md);
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
}

.blog-copy p {
  color: var(--color-text);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  max-width: 38ch;
}

.blog-widget {
  display: grid;
  gap: var(--flow-space);
  justify-items: start;
}

.blog-logo {
  width: min(100%, 25rem);
  height: auto;
  justify-self: center;
  aspect-ratio: 1955.93 / 573.8;
}

.blog-logo > img,
.blog-logo > svg {
  display: block;
  width: 100%;
  height: auto;
}

.substack-shell {
  width: 100%;
  max-width: 31rem;
  justify-self: center;
  padding: 0.75rem;
  border: 1px solid rgba(247, 243, 234, 0.45);
  background: linear-gradient(
    180deg,
    rgba(232, 234, 223, 0.96) 0%,
    rgba(219, 224, 209, 0.96) 100%
  );
  box-shadow: var(--shadow-sm);
}

.blog-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 150px;
  border: 0;
  background: transparent;
}

.blog-fallback-link {
  justify-self: center;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  transition: color 160ms ease;
}

.blog-fallback-link:hover,
.blog-fallback-link:focus-visible {
  color: var(--color-accent);
}

/* --- About Section --- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-md);
}

.about-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(15rem, 28vw, 21rem) minmax(0, 1fr);
  margin: 0;
  overflow: clip;
  border: 1px solid rgba(247, 243, 234, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.16)),
    rgba(0, 0, 0, 0.14);
  box-shadow: var(--shadow-lg);
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(226, 200, 126, 0.12), transparent 42%);
}

.about-card__media {
  min-height: 100%;
  height: 100%;
  background: #202818;
  overflow: clip;
}

.about-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.about-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
}

.about-card--studio .about-card__media img {
  object-position: center 44%;
}

.about-card--founder .about-card__media img {
  object-position: 60% 24%;
}

.about-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: var(--space-sm);
  padding: clamp(0.95rem, 2vw, 1.25rem);
}

.about-card__body > * {
  margin: 0;
}

.about-card__body h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(236, 212, 154, 0.2);
}

.about-card__eyebrow {
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-card__statement {
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--color-accent);
  background: rgba(0, 0, 0, 0.18);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.35;
}

/* --- Card Grid & Project Cards --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap-md);
}

.card-grid--volumes {
  margin-top: var(--space-xs);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid--secondary {
  position: relative;
  margin-top: clamp(1rem, 2.5vw, 2rem);
}

.project-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  border: 1px solid rgba(236, 212, 154, 0.42);
  background: rgba(236, 212, 154, 0.08);
  order: 0;
}

/* --- Featured Project (CAMINO) --- */

.featured-project {
  position: relative;
  display: grid;
  gap: clamp(0.9rem, 1.8vw, 1.3rem);
  isolation: isolate;
  overflow: clip;
  padding: clamp(1.2rem, 2vw, 1.8rem);
  border: 1px solid rgba(236, 212, 154, 0.34);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 200, 126, 0.18), transparent 34%),
    radial-gradient(circle at 0% 0%, rgba(226, 200, 126, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.24)),
    rgba(0, 0, 0, 0.16);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.featured-project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(236, 212, 154, 0.08), transparent 38%);
}

.featured-project::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.featured-project > h3 {
  margin: 0;
  font-size: clamp(2.15rem, 3.8vw, 3rem);
  letter-spacing: 0.015em;
}

.featured-project .button-row {
  margin-top: 0;
}

.featured-project__lead {
  margin-top: clamp(0.4rem, 0.8vw, 0.6rem);
  color: var(--color-text-muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
}

.featured-project__accent {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.15em;
}

.featured-project__eyebrow {
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: clamp(0.75rem, 1.5vw, 1rem);
  border-top: 1px solid rgba(236, 212, 154, 0.2);
}

.featured-project .card {
  grid-template-rows: auto auto auto;
  border-color: rgba(236, 212, 154, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16)),
    rgba(0, 0, 0, 0.16);
}

.featured-project .card > img {
  --_pad: clamp(1.1rem, 2vw, 1.6rem);
  order: 0;
  width: calc(100% + var(--_pad) * 2);
  margin-top: calc(-1 * var(--_pad));
  margin-inline: calc(-1 * var(--_pad));
  margin-bottom: 0;
  max-height: 9rem;
  aspect-ratio: unset;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  filter: saturate(0.82) contrast(0.9) brightness(0.82);
  opacity: 1;
}

.card-grid--secondary .card {
  position: relative;
  opacity: 1;
  grid-template-rows: auto auto auto;
  border-color: rgba(236, 212, 154, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 200, 126, 0.06), transparent 40%),
    linear-gradient(178deg, rgba(14, 18, 11, 0.26), rgba(0, 0, 0, 0.1));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.card-grid--secondary .card > .project-status {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  background: rgba(37, 46, 28, 0.85);
  backdrop-filter: blur(4px);
}

.card-grid--secondary .card > img {
  --_pad: clamp(1.1rem, 2vw, 1.6rem);
  order: 0;
  width: calc(100% + var(--_pad) * 2);
  margin-top: calc(-1 * var(--_pad));
  margin-inline: calc(-1 * var(--_pad));
  margin-bottom: 0;
  max-height: 18rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 1;
  filter: saturate(0.82) contrast(0.9) brightness(0.82);
}

.card-grid--secondary .card h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
}

.card-grid--secondary .card p {
  font-size: clamp(1rem, 1.15vw, 1.1rem);
}

/* --- Tools Promo Section --- */

.section--tools-promo {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, #283220 0%, #35402a 100%);
}

.tools-promo {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: clamp(1rem, 2vw, 1.4rem) clamp(1.2rem, 2.5vw, 1.8rem);
  border: 1px solid rgba(236, 212, 154, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, rgba(236, 212, 154, 0.07), rgba(236, 212, 154, 0.02));
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tools-promo:hover,
.tools-promo:focus-visible {
  border-color: rgba(236, 212, 154, 0.52);
  background: linear-gradient(165deg, rgba(236, 212, 154, 0.12), rgba(236, 212, 154, 0.05));
  box-shadow: var(--shadow-lg);
}

.tools-promo__label {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  color: var(--color-text);
  white-space: nowrap;
}

.tools-promo__desc {
  flex: 1;
  color: var(--color-text-muted);
  font-size: clamp(0.92rem, 1.1vw, 1.04rem);
  line-height: 1.55;
}

.tools-promo__cta {
  font-weight: 700;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  color: var(--color-accent);
  white-space: nowrap;
}

@media (max-width: 680px) {
  .tools-promo {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

/* --- Generic Card --- */

.card {
  display: grid;
  grid-template-rows: auto minmax(6.25rem, auto) auto;
  align-content: start;
  gap: clamp(0.6rem, 1vw, 0.95rem);
  padding: clamp(1.1rem, 2vw, 1.6rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: linear-gradient(178deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.12));
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card > img {
  order: 3;
  margin-top: clamp(0.5rem, 1vw, 0.8rem);
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 9;
  max-height: 14rem;
  object-fit: cover;
  object-position: top;
  filter: saturate(0.74) contrast(0.94) brightness(0.9);
  opacity: 0.86;
}

.card h3 {
  order: 1;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: 0.012em;
  color: var(--color-text);
}

.card p {
  order: 2;
  max-width: none;
  min-height: 0;
  color: var(--color-text);
  font-size: clamp(1rem, 1.05vw, 1.08rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.card p .sentence-primary,
.card p .sentence-secondary,
.about-card__body .sentence-primary,
.about-card__body .sentence-secondary {
  display: block;
}

.card p .sentence-primary,
.about-card__body .sentence-primary {
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.42;
}

.card p .sentence-secondary,
.about-card__body .sentence-secondary {
  margin-top: 0.4rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

a.card:hover,
a.card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(236, 212, 154, 0.74);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--color-line);
  background: #1f2918;
}

.site-footer .container {
  display: grid;
  justify-items: center;
  gap: var(--flow-space);
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.footer-brand {
  display: inline-flex;
  text-decoration: none;
}

.footer-logo {
  width: min(10rem, 40vw);
  height: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 160ms ease;
}

.footer-brand:hover .footer-logo,
.footer-brand:focus-visible .footer-logo {
  opacity: 1;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-lg);
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--color-accent);
}

.site-footer p {
  margin: 0;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Community / Contact Cards --- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--grid-gap-md);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid rgba(247, 243, 234, 0.34);
  border-radius: var(--radius-md);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.15);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.contact-card img {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.contact-logo--substack {
  width: 2.4rem !important;
  height: 2.4rem !important;
  filter: brightness(0) invert(1);
}

.contact-card__info {
  display: grid;
  gap: 0.1rem;
  overflow-wrap: anywhere;
}

.contact-card__name {
  font-weight: 600;
}

.contact-card__desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.contact-card--primary {
  border-color: rgba(236, 212, 154, 0.38);
  background: rgba(236, 212, 154, 0.06);
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(236, 212, 154, 0.74);
  background: rgba(0, 0, 0, 0.22);
}

/* Per-card image focus-point overrides. */
.card > img.image-crop--ages {
  object-position: 50% 100% !important;
}

.card > img.image-crop--brigands {
  object-position: 50% 50%;
}

.card > img.image-crop--forge-traveller {
  object-position: 50% 50%;
}

/* Teaser cards — mysterious, unrevealed projects */
.card--teaser h3 {
  font-size: clamp(2.15rem, 3.8vw, 3rem);
  letter-spacing: 0.015em;
  color: #999;
}

.card--teaser p {
  font-style: italic;
  opacity: 0.7;
}

.card--teaser img {
  filter: brightness(0.6) saturate(0.4);
}

.card--teaser:hover img {
  filter: brightness(0.75) saturate(0.6);
}

/* --- Hero Entrance --- */

@keyframes hero-up {
  from {
    opacity: 0;
    transform: translateY(1.8rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-scale-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-copy h1 {
  animation: hero-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-copy p {
  animation: hero-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.hero-brand {
  animation: hero-scale-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* --- Scroll Reveal --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-d, 0s);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet (<=1100px) --- */

@media (max-width: 1100px) {
  .section {
    padding-block: var(--section-space-tablet);
  }

  .hero-brand {
    width: min(100%, 28rem);
  }

  .blog-layout {
    grid-template-columns: 1fr minmax(18rem, 27rem);
  }

  .card-grid--volumes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Responsive: Mobile (<=860px) --- */

@media (max-width: 860px) {
  .header-tools-btn {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .site-nav__mobile-only {
    display: list-item;
  }

  .site-nav__mobile-only a {
    color: var(--color-accent);
    font-weight: 700;
  }

  /* Dropdown navigation panel. */
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + var(--space-xs));
    z-index: 20;
    display: grid;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: rgba(34, 43, 29, 0.98);
    box-shadow: var(--shadow-lg);
    transform-origin: top center;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .site-nav[data-open="false"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scaleY(0.96);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav a {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-grid,
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    grid-template-columns: 1fr;
  }

  .about-card__media {
    min-height: clamp(14rem, 48vw, 18rem);
  }

  .hero-brand {
    justify-self: start;
    width: min(100%, 18.7rem);
  }

  .blog-widget {
    justify-items: stretch;
  }

  .blog-logo {
    width: min(100%, 20rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--volumes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: var(--section-space-mobile);
  }

  .card,
  .featured-project {
    padding: var(--space-md);
  }

  .card-grid--secondary .card > img,
  .featured-project .card > img {
    --_pad: var(--space-md);
  }

  .card {
    grid-template-rows: auto auto auto;
    gap: var(--space-sm);
  }

  .card > img {
    max-height: 12.2rem;
  }
}

/* --- Responsive: Small Mobile (<=560px) --- */

@media (max-width: 560px) {
  .container {
    width: min(100% - (var(--space-md) * 2), var(--container));
  }

  .container--wide {
    width: min(100% - (var(--space-md) * 2), var(--container-wide));
  }

  .header-inner {
    min-height: var(--header-height);
    padding-block: var(--space-2xs);
  }

  .hero-copy h1 {
    margin-bottom: var(--space-sm);
  }

  .blog-logo {
    width: min(100%, 17rem);
  }

  .substack-shell {
    padding: var(--space-xs);
  }

  .card-grid--volumes {
    grid-template-columns: 1fr;
  }
}

/* --- Print --- */

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .site-footer,
  .menu-toggle,
  .skip-link,
  .blog-embed,
  .substack-shell {
    display: none !important;
  }

  .section {
    padding-block: 1.5rem;
    break-inside: avoid;
  }

  .section::before {
    display: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: 400;
    word-break: break-all;
  }

  img {
    max-width: 100% !important;
  }
}

/* --- Accessibility: Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Ensure scroll-reveal elements are visible even when JS is slow or absent. */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
