/* =========================================================
   Gregory G. — Portfolio
   1. Tokens y base   2. Cabecera   3. Menú   4. Home (esfera)
   5. Visor (lightbox)   6. Portfolio   7. Contacto   8. Pie
   ========================================================= */

/* ---------- 1. Tokens y base ---------- */
:root {
  --bg: #050505;
  --bg-rgb: 5, 5, 5;
  --fg: #f5f3ee;
  --fg-rgb: 245, 243, 238;
  --muted: #8d8a85;
  --line: rgba(245, 243, 238, 0.16);
  --font-display: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --pad: clamp(18px, 3.2vw, 56px);
  --header-h: clamp(72px, 8vw, 104px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f2efe9;
  --bg-rgb: 242, 239, 233;
  --fg: #0a0a0a;
  --fg-rgb: 10, 10, 10;
  --muted: #6f6b64;
  --line: rgba(10, 10, 10, 0.18);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--muted) transparent;
  scrollbar-width: thin;
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}
html.is-locked,
html.is-locked body {
  overflow: hidden;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
::selection {
  background: var(--fg);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}
.mono {
  font-family: var(--font-mono);
  font-weight: 400;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

/* ---------- 2. Cabecera ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 -28px 0;
  z-index: -1;
  background: linear-gradient(rgba(var(--bg-rgb), 0.94) 58%, rgba(var(--bg-rgb), 0));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.site-header.is-scrolled::before {
  opacity: 1;
}
.menu-open .site-header::before {
  opacity: 0;
}
.brand,
.header-right > * {
  pointer-events: auto;
}
.brand {
  display: block;
  flex: none;
  line-height: 0;
  transition:
    opacity 0.3s ease,
    transform 0.5s var(--ease);
}
.brand:hover {
  transform: scale(1.06) rotate(-3deg);
}
.brand img {
  height: clamp(46px, 5.4vw, 72px);
  width: auto;
  display: block;
}
.header-right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 36px);
}
.tagline {
  margin: 0;
  font-size: clamp(15px, 1.25vw, 21px);
  font-weight: 200;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.tagline b {
  font-weight: 700;
}
.mono-link {
  font-family: var(--font-mono);
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.mono-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.theme-toggle {
  position: relative;
  flex: none;
  width: 60px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  background: transparent;
  transition:
    opacity 0.3s ease,
    border-color 0.5s ease;
}
.theme-toggle__knob {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fg);
  display: grid;
  place-items: center;
  transition:
    transform 0.5s var(--ease),
    background-color 0.5s ease;
}
[data-theme='light'] .theme-toggle__knob {
  transform: translateX(28px);
}
.eye {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--bg);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.3s ease;
}
.eye .pupil {
  fill: var(--bg);
  stroke: none;
}
.eye--open,
[data-theme='light'] .eye--closed {
  opacity: 0;
}
[data-theme='light'] .eye--open {
  opacity: 1;
}

.menu-btn {
  position: relative;
  flex: none;
  width: 40px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
}
.menu-btn span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--fg);
  transition:
    transform 0.5s var(--ease),
    opacity 0.25s ease,
    background-color 0.5s ease;
}
.menu-btn span:nth-child(1) {
  top: 3px;
}
.menu-btn span:nth-child(2) {
  top: 15px;
}
.menu-btn span:nth-child(3) {
  top: 27px;
}
.menu-btn:hover span:nth-child(2) {
  transform: scaleX(0.6);
  transform-origin: right;
}
.menu-open .menu-btn span:nth-child(1) {
  transform: translateY(12px) rotate(45deg);
}
.menu-open .menu-btn span:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-btn span:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}
.menu-open .brand,
.menu-open .tagline,
.menu-open .mono-link,
.menu-open .theme-toggle {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 820px) {
  .tagline {
    display: none;
  }
}

/* ---------- 3. Menú a pantalla completa ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0s 0.45s,
    background-color 0.5s ease;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.45s ease,
    background-color 0.5s ease;
}
.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.menu__list li {
  overflow: hidden;
  padding: 0 0.6em;
  font-size: clamp(46px, 9vw, 112px);
}
.menu__list a {
  position: relative;
  display: inline-block;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(110%);
  transition:
    transform 0.8s var(--ease) calc(var(--i) * 70ms),
    opacity 0.3s ease;
}
.menu-open .menu__list a {
  transform: none;
}
.menu__list a::before {
  content: '';
  position: absolute;
  left: -0.32em;
  top: 50%;
  width: 0.13em;
  height: 0.13em;
  margin-top: -0.04em;
  background: currentColor;
  transform: scale(0);
  transition: transform 0.35s var(--ease);
}
.menu__list a[aria-current='page']::before,
.menu__list a:hover::before,
.menu__list a:focus-visible::before {
  transform: scale(1);
}
.menu__list:hover a:not(:hover) {
  opacity: 0.35;
}
.menu__foot {
  position: absolute;
  inset: auto 0 clamp(20px, 3vw, 40px) 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2em;
  font-size: 13px;
  color: var(--muted);
}
.menu__foot a {
  text-decoration: none;
}
.menu__foot a:hover {
  color: var(--fg);
}

/* ---------- 4. Home: esfera de fotos ---------- */
body[data-page='home'] {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
#sphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
#sphere.is-hover {
  cursor: pointer;
}
#sphere.is-dragging {
  cursor: grabbing;
}
.sphere-label {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  padding: 3px 8px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}
.sphere-label.is-on {
  opacity: 1;
}
.home-ui {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 5;
  padding: 0 var(--pad) clamp(16px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  animation: fade-in 1.2s ease 0.9s forwards;
}
.home-ui > * {
  pointer-events: auto;
}
.home-ui__hint {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 10.5px;
  pointer-events: none;
}
.home-ui__link,
.home-ui__shuffle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  background: none;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  justify-self: start;
}
.home-ui__shuffle {
  justify-self: end;
}
.home-ui__link span,
.home-ui__shuffle span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease);
}
.home-ui__link:hover span,
.home-ui__shuffle:hover span {
  background-size: 100% 1px;
}
.home-ui svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.6s var(--ease);
}
.home-ui__link:hover svg {
  transform: translateX(5px);
}
.home-ui__shuffle:hover svg {
  transform: rotate(180deg);
}
.home-msg {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
@media (max-width: 720px) {
  .home-ui {
    grid-template-columns: 1fr 1fr;
    letter-spacing: 0.16em;
  }
  .home-ui__hint {
    grid-column: 1 / -1;
    grid-row: 1;
    letter-spacing: 0.2em;
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

/* ---------- 5. Visor de fotos ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(var(--bg-rgb), 0.97);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0s 0.35s;
}
.lb.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}
.lb__stage {
  position: relative;
  width: min(92vw, calc((100dvh - 150px) * var(--ar, 1)));
  aspect-ratio: var(--ar, 1);
  background: var(--c, transparent);
  transform: scale(0.97);
  opacity: 0;
  transition:
    transform 0.5s var(--ease),
    opacity 0.3s ease;
  touch-action: pan-y pinch-zoom;
}
.lb.is-open .lb__stage.is-ready {
  transform: none;
  opacity: 1;
}
.lb__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
.lb__full {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.lb__full.is-loaded {
  opacity: 1;
}
.lb__bar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.lb__meta {
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lb__meta a {
  color: var(--muted);
  text-decoration: none;
}
.lb__meta a:hover {
  color: var(--fg);
}
.lb__btn {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition:
    background-color 0.25s ease,
    transform 0.4s var(--ease);
}
.lb__btn:hover {
  background: rgba(var(--fg-rgb), 0.1);
}
.lb__btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb__close {
  margin-right: -12px;
}
.lb__close:hover {
  transform: rotate(90deg);
}
.lb__prev,
.lb__next {
  position: absolute;
  top: 50%;
  margin-top: -24px;
}
.lb__prev {
  left: clamp(4px, 1.4vw, 24px);
}
.lb__next {
  right: clamp(4px, 1.4vw, 24px);
}
@media (max-width: 720px) {
  .lb__stage {
    width: min(100vw, calc((100dvh - 140px) * var(--ar, 1)));
  }
  .lb__prev,
  .lb__next {
    top: auto;
    bottom: 8px;
    margin: 0;
    z-index: 1;
  }
}

/* ---------- 6. Portfolio ---------- */
.year-hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* Fotos desenfocadas a media opacidad: se oscurecen en modo oscuro y se aclaran en modo claro */
.year-hero__bg {
  position: absolute;
  inset: -36px;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  filter: blur(14px) saturate(1.15);
  opacity: 0.5;
}
[data-theme='light'] .year-hero__bg {
  opacity: 0.42;
}
.year-hero__bg i {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.year-hero__bg i.is-loaded {
  opacity: 1;
}
.year-list {
  list-style: none;
  margin: 0;
  padding: calc(var(--header-h) + 8px) 16px 56px;
  text-align: center;
}
.year-list li {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s var(--ease) calc(var(--i) * 60ms + 0.15s) forwards;
}
.year-list a {
  display: block;
  font-weight: 800;
  font-size: clamp(
    30px,
    min(7.4vw, calc((100svh - var(--header-h) - 190px) / var(--n, 6) / 1.14)),
    92px
  );
  line-height: 1.14;
  text-decoration: none;
  opacity: 0.85;
  transition:
    opacity 0.25s ease,
    letter-spacing 0.5s var(--ease);
}
.year-list a:hover,
.year-list a:focus-visible {
  opacity: 1;
  letter-spacing: 0.05em;
}
.year-list .year-list__all a {
  display: inline-block;
  margin-bottom: 0.55em;
  padding: 0 0 0.2em;
  border-bottom: 2px solid currentColor;
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
}
.year-list .year-list__all a:hover {
  letter-spacing: 0.3em;
}
.year-hero__scroll {
  position: absolute;
  inset: auto 0 22px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.55;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.gallery {
  display: grid;
  grid-template-columns: clamp(104px, 10vw, 150px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 56px);
  padding: calc(var(--header-h) + 20px) var(--pad) 40px;
  min-height: 100svh;
}
.rail {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail a {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0 5px 18px;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.4;
  transition: opacity 0.25s ease;
}
.rail a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  background: currentColor;
  transform: scale(0);
  transition: transform 0.35s var(--ease);
}
.rail a:hover,
.rail a[aria-current='true'] {
  opacity: 1;
}
.rail a[aria-current='true']::before {
  transform: scale(1);
}
.rail small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.year-sec {
  margin-bottom: clamp(48px, 7vw, 104px);
}
.year-sec__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 clamp(12px, 1.6vw, 22px);
}
.year-sec__head h2 {
  margin: 0;
  font-size: clamp(44px, 6.4vw, 96px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.year-sec__head span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Filas justificadas: todas las fotos de una fila tienen la misma altura, sin recortes */
.rows {
  --row-h: clamp(140px, 17vw, 300px);
  --gap: clamp(4px, 0.6vw, 10px);
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.rows::after {
  content: '';
  flex-grow: 1000000;
}
.ph {
  position: relative;
  flex-grow: calc(var(--ar) * 100);
  flex-basis: calc(var(--ar) * var(--row-h));
  overflow: hidden;
  background: var(--c);
  cursor: zoom-in;
}
.ph::before {
  content: '';
  display: block;
  padding-bottom: calc(100% / var(--ar));
}
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 0.7s ease,
    transform 0.9s var(--ease);
}
.ph img.is-loaded {
  opacity: 1;
}
.ph:hover img,
.ph:focus-visible img {
  transform: scale(1.035);
}
.ph:focus-visible {
  outline-offset: -4px;
  z-index: 1;
}

@media (max-width: 860px) {
  .gallery {
    display: block;
    padding-top: var(--header-h);
  }
  .rail {
    top: calc(var(--header-h) - 6px);
    z-index: 20;
    display: flex;
    gap: 22px;
    margin: 0 calc(var(--pad) * -1) 20px;
    padding: 8px var(--pad) 10px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(var(--bg-rgb), 0.94);
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  .rail a {
    padding: 4px 0;
    font-size: 17px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
  }
  .rail a::before,
  .rail small {
    display: none;
  }
  .rail a[aria-current='true'] {
    border-bottom-color: currentColor;
  }
}

/* ---------- 7. Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) 1.25fr;
  gap: clamp(36px, 7vw, 140px);
  max-width: 1560px;
  min-height: calc(100svh - 80px);
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(28px, 6vw, 96px)) var(--pad) 72px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 17px;
}
.eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  background: currentColor;
}
.contact h1 {
  margin: 0.22em 0 0.5em;
  font-size: clamp(40px, 4.6vw, 66px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.contact__country {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.contact__city {
  margin: 0.7em 0 1.3em;
  font-size: 17px;
  color: var(--muted);
}
.contact__mail {
  font-size: 18px;
  font-weight: 400;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease);
}
.contact__mail:hover {
  background-size: 100% 1px;
}
.contact__social {
  display: flex;
  gap: 1.8em;
  margin: 2.8em 0 0;
  font-family: var(--font-mono);
  font-size: 22px;
}
.contact__social a {
  text-decoration: none;
}
.contact__social a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.field {
  position: relative;
  margin-bottom: clamp(26px, 3.2vw, 46px);
}
.field input {
  width: 100%;
  padding: 26px 18px 12px;
  border: 0;
  border-bottom: 1px solid var(--fg);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 18px;
  outline: none;
  transition: box-shadow 0.25s ease;
}
.field input:focus {
  box-shadow: 0 1px 0 var(--fg);
}
.field input + label {
  position: absolute;
  left: 18px;
  top: 24px;
  font-size: 18px;
  transform-origin: left top;
  pointer-events: none;
  transition:
    transform 0.35s var(--ease),
    color 0.25s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-22px) scale(0.74);
  color: var(--muted);
}
.field--area label {
  display: block;
  margin: 0 0 12px 18px;
  font-size: 18px;
}
.field textarea {
  display: block;
  width: 100%;
  min-height: clamp(200px, 30vh, 330px);
  padding: 16px 18px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 18px;
  resize: vertical;
  outline: none;
  transition: box-shadow 0.25s ease;
}
.field textarea:focus {
  box-shadow: inset 0 0 0 1px var(--fg);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--fg);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}
.btn-send {
  min-width: 212px;
  height: 68px;
  padding: 0 32px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 9px 9px 0 var(--fg);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.5s ease;
}
.btn-send:hover {
  transform: translate(4px, 4px);
  box-shadow: 5px 5px 0 var(--fg);
}
.btn-send:active {
  transform: translate(9px, 9px);
  box-shadow: 0 0 0 var(--fg);
}
.btn-send[disabled] {
  opacity: 0.5;
  cursor: progress;
}
.form-status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 1.5em;
}
.form-status.is-error {
  color: #ff6b5e;
}
[data-theme='light'] .form-status.is-error {
  color: #b3261e;
}
@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

/* ---------- 8. Pie ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 26px var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
