/* build.ilsetanis.com — warm near-black, one terracotta glow.
   Fraunces for headlines, Geist for UI. */

:root {
  --ink: #141210;
  --ink-2: #1c1916;
  --cream: #f1e9da;
  --muted: #d8cbb8;
  --faint: #b7aa98;
  --clay: #c0744f;
  --ember: #d2662f;
  --burnt: #6f3f27;
  --hair: rgba(241, 233, 218, 0.16);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --soft: "opsz" 144, "wght" 340, "SOFT" 80, "WONK" 0;
  --soft-italic: "opsz" 144, "wght" 560, "SOFT" 60, "WONK" 1;
  --pad: clamp(1.35rem, 4.8vw, 5rem);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: var(--ink);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One large burnt-orange glow. It drifts slowly. */
body::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: -8vh;
  left: 0;
  width: 100%;
  height: 120vh;
  background: radial-gradient(
    78% 62% at 74% 18%,
    rgba(210, 102, 47, 0.98) 0%,
    rgba(192, 116, 79, 0.58) 26%,
    rgba(111, 63, 39, 0.3) 50%,
    rgba(20, 18, 16, 0) 74%
  );
  filter: blur(34px);
  transform-origin: 74% 18%;
  animation: glow-breathe 22s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2%, 2.5%, 0) scale(1.07); }
}

body::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  inset: 0;
  background-image: url("assets/grain.png");
  background-size: 148px 148px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

h1, h2, h3, .brand {
  font-family: var(--serif);
  font-weight: 340;
  font-optical-sizing: none;
  font-variation-settings: var(--soft);
  font-synthesis: none;
}

h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 560;
  font-variation-settings: var(--soft-italic);
}

::selection { background: rgba(210, 102, 47, 0.45); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.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;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: 0.75rem;
  transform: translateY(-160%);
  z-index: 20;
  background: var(--cream);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus { transform: none; }

.shell {
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin-inline: auto;
}

.top,
main,
.footer {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #e0b394;
}

.eyebrow__num {
  letter-spacing: 0.14em;
  color: var(--cream);
}

.rule {
  border: 0;
  height: 1px;
  background: var(--hair);
  margin: 0 0 clamp(1.25rem, 2vw, 1.6rem);
}

/* ---------- Header ---------- */
.top {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top));
}

.brand {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}

.handle {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
}
.handle:hover { color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(6.5rem + env(safe-area-inset-top));
  padding-bottom: clamp(5.5rem, 12vh, 7.5rem);
}

.hero__title { max-width: 8.6em; }

.hero__title {
  font-size: clamp(3.45rem, 8.6vw, 8.15rem);
  line-height: 0.9;
  letter-spacing: -0.034em;
  text-wrap: balance;
}

.hero__sub {
  margin-top: clamp(1.4rem, 2.6vw, 2rem);
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
}

.scrollcue {
  position: absolute;
  z-index: 2;
  left: max(var(--pad), calc((100% - var(--max)) / 2));
  bottom: clamp(1.4rem, 3.5vh, 2.4rem);
  width: 1px;
  height: 64px;
  background: linear-gradient(var(--cream), transparent);
  animation: cue 2.6s ease-in-out infinite;
}
.scrollcue:focus-visible { outline-offset: 6px; }

@keyframes cue {
  0%, 100% { transform: scaleY(1); transform-origin: top; opacity: 0.85; }
  50% { transform: scaleY(0.65); transform-origin: top; opacity: 0.4; }
}

.badge {
  position: absolute;
  z-index: 2;
  right: max(var(--pad), calc((100% - var(--max)) / 2));
  bottom: clamp(1.5rem, 4vh, 2.6rem);
  width: 108px;
  height: 108px;
  margin: 0;
  animation: spin 32s linear infinite;
}
.badge svg { width: 100%; height: 100%; display: block; }
.badge__text {
  fill: var(--cream);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Guide ---------- */
.guide {
  position: relative;
  padding-top: clamp(5.5rem, 14vw, 13.5rem);
}

.guide::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  inset: 8% 0 auto;
  height: 70%;
  background: radial-gradient(42% 60% at 10% 40%, rgba(192, 116, 79, 0.2), transparent 72%);
}

.guide__panel {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  background: rgba(20, 18, 16, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid var(--hair);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(241, 233, 218, 0.07);
  padding: clamp(1.85rem, 4vw, 3.5rem);
}

.guide__title {
  font-size: clamp(2.35rem, 4.4vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 12em;
}

.guide__form {
  position: relative;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.45rem, 2.4vw, 1.9rem);
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  padding: 0.85rem 0.05rem 0.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.field input:focus-visible {
  outline-offset: 4px;
  border-bottom-color: var(--cream);
}

.field input[aria-invalid="true"] { border-bottom-color: #e7c4b0; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.consent input {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.22rem;
  flex: 0 0 auto;
  border: 1px solid rgba(241, 233, 218, 0.55);
  border-radius: 3px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.consent input:checked {
  background: var(--cream);
  border-color: var(--cream);
}

.consent input:checked::after {
  content: "";
  width: 0.58rem;
  height: 0.32rem;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg);
}

.consent label {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
  cursor: pointer;
}

.consent a {
  color: var(--cream);
  text-underline-offset: 0.18em;
  white-space: nowrap;
}
.consent a:hover { color: #fff; }

.btn {
  align-self: flex-start;
  margin-top: 0.65rem;
  min-height: 52px;
  padding: 0.95rem 1.7rem;
  border: 1px solid rgba(241, 233, 218, 0.72);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
  background: transparent;
  color: var(--cream);
  border-color: rgba(241, 233, 218, 0.4);
}

.form-status {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--cream);
}
.form-status:empty { display: none; }
.form-status:focus { outline: none; }

.form-success {
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-weight: 340;
  font-variation-settings: var(--soft);
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.form-success:focus { outline: none; }

/* ---------- Projects ---------- */
.work { padding-top: clamp(5.5rem, 14vw, 13.75rem); }

.work__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(1.1rem, 2vw, 1.5rem);
}

.work__nav { display: flex; gap: 0.65rem; }

.round {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.round:hover:not(:disabled) {
  background: var(--ember);
  color: var(--ink);
  border-color: var(--ember);
}

.round:disabled { opacity: 0.32; cursor: default; }

.work__title {
  font-size: clamp(3rem, 6.6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.034em;
  margin-bottom: clamp(1.4rem, 2.5vw, 2.1rem);
}

.work__frame { position: relative; }

.scroller {
  list-style: none;
  display: flex;
  gap: 1.05rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-block: 22px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.scroller::-webkit-scrollbar { display: none; }

.card-item {
  flex: 0 0 82%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.9;
  border-radius: 26px;
  overflow: hidden;
  background: var(--ink-2);
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(241, 233, 218, 0.14);
  transition: transform 0.8s var(--ease), border-color 0.8s var(--ease);
}

.card--link { cursor: pointer; }

.card__media,
.card__shade { position: absolute; inset: 0; }

.card__media { z-index: 0; }
.card__shade {
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(20, 18, 16, 0.02) 0%,
    rgba(20, 18, 16, 0.05) 40%,
    rgba(20, 18, 16, 0.45) 70%,
    rgba(20, 18, 16, 0.92) 100%
  );
}

.card__media img,
.card__media video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
  transition: transform 2.6s var(--ease);
}

.card__copy {
  position: absolute;
  z-index: 2;
  left: 1.25rem;
  right: 4rem;
  bottom: 1.3rem;
}

.card__name {
  font-size: clamp(2.4rem, 3.2vw, 3.35rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.card__sub {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: rgba(241, 233, 218, 0.88);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.card__arrow {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 1.15rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(241, 233, 218, 0.5);
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgba(20, 18, 16, 0.28);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .card--link:hover {
    transform: translateY(-12px);
    border-color: rgba(241, 233, 218, 0.42);
  }
  .card--link:hover .card__media img,
  .card--link:hover .card__media video { transform: scale(1.1); }
  .card--link:hover .card__arrow {
    background: var(--ember);
    color: var(--ink);
    border-color: var(--ember);
  }
}

.card--link:focus-visible { transform: translateY(-8px); }

.card--link:focus-visible .card__arrow {
  background: var(--ember);
  color: var(--ink);
  border-color: var(--ember);
}

.noscript {
  margin-top: 1.25rem;
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.65;
}
.noscript a { color: var(--cream); }

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(5.5rem, 14vw, 12.5rem);
  border-top: 1px solid var(--hair);
  padding-block: clamp(1.75rem, 4vw, 2.75rem) calc(clamp(1.75rem, 4vw, 2.75rem) + env(safe-area-inset-bottom));
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover { color: var(--cream); }

.footer p {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--faint);
}

/* ---------- Reveal ---------- */
.hero__copy {
  animation: rise 1.15s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.is-in,
.js .reveal:focus-within { opacity: 1; transform: none; }

@media (min-width: 720px) {
  .btn { min-width: 11.5rem; }
  .card-item { flex-basis: 46%; }
}

@media (min-width: 960px) {
  .scroller { gap: 1.85rem; }
  .card-item { flex-basis: calc((100% - 3.7rem) / 3); }
}

@media (max-width: 719px) {
  .badge { display: none; }
  .hero__copy { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroller { scroll-behavior: auto; }
  .hero__copy,
  .js .reveal,
  .card,
  .card__media img,
  .card__media video,
  .btn,
  .round,
  .card__arrow,
  .badge,
  .scrollcue,
  body::before {
    transition: none;
    animation: none;
    transform: none;
  }
  .js .reveal,
  .hero__copy { opacity: 1; }
}
