/* foothold.me — full-bleed multi-page site with top nav + images.
   Not an app chrome / not a side-rail. */

html {
  margin: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { margin: 0; }
* { box-sizing: border-box; }

.site {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  /* Mulish only — no system fallbacks (design_system/00_overview.md). */
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: clip;
}

.admin-table td.admin-table__actions { text-align: right; }

/* ── top bar ────────────────────────────────────────────────────────────── */

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
}
.top__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.top__logo:hover { color: var(--fg); text-decoration: none; }
.top__mark { display: block; color: var(--fg); }
.top__word { font-size: 1.15rem; }
.top__nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.top__a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.top__a:hover { color: var(--fg); text-decoration: none; }
.top__a.is-on { color: var(--fg); border-bottom-color: var(--accent); }
.top__theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.top__theme:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.top__theme-icon { display: block; }

/* ── full-screen hero (home) ────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 100px var(--gutter) 72px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    url('/static/img/hero.webp') center / cover no-repeat;
  transform: scale(1.02);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg,
      color-mix(in srgb, var(--bg) 92%, transparent) 0%,
      color-mix(in srgb, var(--bg) 78%, transparent) 42%,
      color-mix(in srgb, var(--bg) 35%, transparent) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero__brand {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}
.hero__mark {
  color: var(--fg);
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--accent) 45%, transparent));
  flex-shrink: 0;
}
.hero__name {
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.hero__tag {
  margin: 0 0 20px;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero__tag em {
  font-style: normal;
  color: var(--accent);
}
.hero__lead {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 1.12rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--fg) 78%, var(--muted));
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.4rem;
  opacity: 0.7;
}
.hero__scroll:hover { color: var(--accent); opacity: 1; }

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.btn:hover { text-decoration: none; }
.btn--solid {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn--solid:hover { filter: brightness(1.1); color: var(--accent-fg); }
.btn--ghost {
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  color: var(--fg);
  border-color: color-mix(in srgb, var(--fg) 22%, transparent);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── explore tiles (home) — edge to edge ────────────────────────────────── */

.explore {
  padding: 56px var(--gutter) 64px;
  width: 100%;
  margin: 0;
}
.explore__head { margin-bottom: 28px; max-width: 36em; }
.explore__kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.explore__head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.05;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.tile:hover { text-decoration: none; color: #fff; }
.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.tile:hover .tile__img { transform: scale(1.05); }
.tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent 20%,
    rgba(8, 6, 14, 0.88) 100%);
}
.tile__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  z-index: 1;
}
.tile__n {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, #fff 55%, var(--accent));
  margin-bottom: 8px;
}
.tile__body h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.tile__body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: color-mix(in srgb, #fff 72%, transparent);
}

/* ── inner pages: photo band + sheet ────────────────────────────────────── */

.band {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  padding: 110px var(--gutter) 40px;
  overflow: hidden;
}
.band__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 45%, transparent) 0%,
    color-mix(in srgb, var(--bg) 90%, transparent) 100%);
}
.band__inner {
  position: relative;
  z-index: 1;
  max-width: 40em;
}
.band__kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.band__inner h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.band__lead {
  margin: 0;
  max-width: 38em;
  font-size: 1.1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--fg) 80%, var(--muted));
}
.band__lead strong { color: var(--fg); }

/* Full-bleed content strip under band — no centered “ears”. */
.sheet {
  width: 100%;
  margin: 0;
  padding: 28px var(--gutter) 56px;
  background: var(--bg);
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.duo__card {
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}
.duo__card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.duo__text { padding: 20px 18px 24px; }
.duo__text h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.duo__text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mosaic__item {
  padding: 28px 22px;
  border-radius: 4px;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--accent) 10%, var(--panel)) 0%,
      var(--panel) 60%);
  border: 1px solid var(--line);
  min-height: 130px;
}
.mosaic__item--wide { grid-column: span 2; }
.mosaic__item h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
}
.mosaic__item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 48em;
}

.sheet__cta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.sheet__cta p {
  margin: 0;
  font-weight: 600;
  max-width: 28em;
}

/* ── contact: one viewport, bold but compact ────────────────────────────── */

.contact-page {
  position: relative;
  /* Fit under fixed header; no page scroll on desktop. */
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 72px var(--gutter) 12px;
  overflow: hidden;
  box-sizing: border-box;
}
/* Real image (like .band__img) — CSS-only bg + heavy veil washed the hero out. */
.contact-page__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
}
.contact-page__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Readable text, but hero must remain visible (esp. right side). */
  background:
    linear-gradient(105deg,
      color-mix(in srgb, var(--bg) 88%, transparent) 0%,
      color-mix(in srgb, var(--bg) 55%, transparent) 42%,
      color-mix(in srgb, var(--bg) 28%, transparent) 100%);
}
html.light .contact-page__veil {
  background:
    linear-gradient(105deg,
      color-mix(in srgb, var(--bg) 90%, transparent) 0%,
      color-mix(in srgb, var(--bg) 62%, transparent) 45%,
      color-mix(in srgb, var(--bg) 35%, transparent) 100%);
}
.contact-page__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
}
.contact-page__head {
  flex: 0 0 auto;
  width: 100%;
}
.contact-page__kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-page__head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
}
.contact-page__lead {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--fg) 78%, var(--muted));
  max-width: 36em;
}

.contact-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.contact-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Large but viewport-aware fields. */
.page-contact .ds-field {
  gap: 4px;
  flex: 0 0 auto;
}
/* Message field eats remaining vertical space. */
.page-contact .ds-field:has(textarea) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page-contact .ds-field__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-contact .ds-field__required {
  color: var(--accent);
  margin-left: 4px;
}
.page-contact .ds-field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
  border-width: 2px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border-color: color-mix(in srgb, var(--fg) 22%, transparent);
  color: var(--fg);
}
.page-contact .ds-field__input::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
  font-size: 1rem;
}
.page-contact .ds-field__input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.page-contact .ds-field__textarea,
.page-contact textarea.ds-field__input {
  flex: 1 1 auto;
  min-height: 120px;
  height: 100%;
  padding: 14px 16px;
  font-size: 1.08rem;
  line-height: 1.45;
  resize: none;
}
.page-contact .ds-field__error {
  min-height: 14px;
  font-size: 0.8rem;
  line-height: 1.2;
}

.page-contact .ds-btn,
.page-contact .ds-btn--primary {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  margin-top: 4px;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  border-width: 2px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.page-contact .ds-btn--primary:hover {
  filter: brightness(1.1);
  background: var(--accent);
  color: var(--accent-fg);
}
.page-contact .ds-btn.is-loading .ds-btn__label { visibility: hidden; }
.page-contact .ds-btn__spinner { transform: scale(1.2); }

.page-contact .land-contact__done {
  padding: 16px 0;
  border: none;
  background: transparent;
}
.page-contact .land-contact__done h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: var(--accent);
}
.page-contact .land-contact__done p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36em;
}
.land-hp {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* footer — flush, minimal */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 16px var(--gutter) 20px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.foot__brand { color: var(--fg); font-weight: 700; }
.foot__dim { opacity: 0.8; }

/* Hide footer on contact — page is already full-bleed scene */
.page-contact .foot { display: none; }

html:not(.light) .when-light { display: none; }
html.light .when-dark { display: none; }

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 10; }
  .duo { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; }
  .mosaic__item--wide { grid-column: span 1; }
  .hero__brand { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__mark { width: 88px; height: 88px; }
  .hero__cta .btn { min-height: 48px; }
  .sheet__cta { flex-direction: column; align-items: flex-start; }
}

/* Phone / narrow: single-row top bar (no wrap) so content padding stays predictable. */
@media (max-width: 700px) {
  :root { --gutter: 14px; }

  .top {
    flex-wrap: nowrap;
    gap: 8px 10px;
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(var(--gutter), env(safe-area-inset-right, 0px))
      10px
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .top__logo { flex-shrink: 0; min-width: 0; }
  .top__word { font-size: 0.98rem; }
  .top__mark { width: 30px; height: 30px; }
  .top__nav {
    margin-left: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 2px 12px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .top__nav::-webkit-scrollbar { display: none; }
  .top__a {
    font-size: 0.84rem;
    white-space: nowrap;
    padding: 8px 0; /* ≥44px touch with line */
  }
  .top__theme {
    width: 40px;
    height: 40px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .hero {
    min-height: 100dvh;
    padding:
      calc(64px + env(safe-area-inset-top, 0px))
      max(var(--gutter), env(safe-area-inset-right, 0px))
      calc(48px + env(safe-area-inset-bottom, 0px))
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .hero__bg { background-position: center right; }
  .hero__name { font-size: clamp(2.5rem, 13vw, 3.4rem); }
  .hero__mark { width: 68px; height: 68px; }
  .hero__tag { font-size: clamp(1.15rem, 4.5vw, 1.35rem); margin-bottom: 16px; }
  .hero__lead { font-size: 1rem; margin-bottom: 24px; }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 22rem;
  }
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 14px 20px;
  }
  .hero__scroll {
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .explore {
    padding:
      32px
      max(var(--gutter), env(safe-area-inset-right, 0px))
      44px
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .tiles { gap: 8px; }
  .tile {
    aspect-ratio: 16 / 11;
    border-radius: 4px;
    /* Comfortable tap target height on stacked tiles */
    min-height: 148px;
  }
  .tile__body { padding: 16px; }
  .tile__body h3 { font-size: 1.15rem; }
  .tile__body p { font-size: 0.9rem; }

  .band {
    min-height: 34vh;
    padding:
      calc(72px + env(safe-area-inset-top, 0px))
      max(var(--gutter), env(safe-area-inset-right, 0px))
      24px
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .band__inner h1 { font-size: clamp(1.65rem, 7vw, 2.15rem); }
  .band__lead { font-size: 1rem; }
  .sheet {
    padding:
      18px max(var(--gutter), env(safe-area-inset-right, 0px))
      calc(36px + env(safe-area-inset-bottom, 0px))
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .duo__text, .mosaic__item { padding: 16px; }
  .mosaic__item { min-height: 0; }
  .sheet__cta .btn {
    width: 100%;
    max-width: 22rem;
    justify-content: center;
    min-height: 48px;
  }

  /* Contact: scrollable full-scene; works with software keyboard. */
  .contact-page {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    padding:
      calc(60px + env(safe-area-inset-top, 0px))
      max(var(--gutter), env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px))
      max(var(--gutter), env(safe-area-inset-left, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .contact-page__img { object-position: center center; }
  .contact-page__veil {
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--bg) 72%, transparent) 0%,
        color-mix(in srgb, var(--bg) 55%, transparent) 45%,
        color-mix(in srgb, var(--bg) 78%, transparent) 100%);
  }
  html.light .contact-page__veil {
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--bg) 78%, transparent) 0%,
        color-mix(in srgb, var(--bg) 58%, transparent) 45%,
        color-mix(in srgb, var(--bg) 82%, transparent) 100%);
  }
  .contact-page__inner { gap: 12px; }
  .contact-page__head h1 {
    font-size: clamp(1.7rem, 8vw, 2.15rem);
    max-width: none;
  }
  .contact-page__lead { font-size: 0.94rem; line-height: 1.45; }
  .contact-form { gap: 10px; }
  .page-contact .ds-field:has(textarea) { flex: 0 0 auto; }
  .page-contact .ds-field__input {
    min-height: 48px;
    font-size: 16px; /* iOS: no focus zoom */
    padding: 12px 14px;
  }
  .page-contact .ds-field__textarea,
  .page-contact textarea.ds-field__input {
    min-height: 132px;
    height: auto;
    font-size: 16px;
    resize: vertical;
  }
  .page-contact .ds-btn,
  .page-contact .ds-btn--primary {
    min-height: 52px;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    /* sticky-ish feel above home indicator */
    margin-bottom: env(safe-area-inset-bottom, 0px);
  }

  .foot {
    padding:
      14px max(var(--gutter), env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px))
      max(var(--gutter), env(safe-area-inset-left, 0px));
    font-size: 0.78rem;
  }
}

/* Very narrow: hide wordmark, keep mark + nav readable */
@media (max-width: 380px) {
  .top__word { display: none; }
  .top__nav { gap: 2px 10px; }
  .top__a { font-size: 0.8rem; }
  .hero__name { font-size: clamp(2.2rem, 16vw, 2.8rem); }
  .contact-page__lead { display: none; } /* keep form first on tiny screens */
}

/* Prefer less motion when asked */
@media (prefers-reduced-motion: reduce) {
  .tile__img { transition: none; }
  .tile:hover .tile__img { transform: none; }
}
