:root {
  --bg: #F4F1EA;
  --bg-deep: #ECE7DD;
  --ink: #2A1810;
  --ink-soft: #76675A;
  --ink-faint: #B3A692;
  --accent: #8B3A1F;
  --accent-light: #C97A4E;
  --rule: #E2DBCA;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100%;
}

/* subtle grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* soft radial light from upper-left */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(255, 245, 225, 0.55), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  /* 100vh is fallback for browsers without dvh support; dvh tracks the
     dynamic viewport on iOS so the footer stays on-screen when the
     URL/nav bars are visible. min-height would override dvh and bring
     the bug back, so don't add one. */
  height: 100vh;
  height: 100dvh;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 3vw, 2rem);
}

/* header */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-in 1.2s ease-out 0.2s forwards;
}

header .mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* main content */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 78rem;
  margin: 0 auto;
  width: 100%;
  padding: 0;
  min-height: 0;
}

.hero-lockup {
  display: flex;
  align-items: baseline;
  gap: clamp(0.6rem, 2vw, 1.6rem);
  width: 100%;
  max-width: 100%;
}

/* Sized to match the wordmark "Y" cap height. The SVG viewBox is cropped
   tight to the glyphs, so height here equals visible mark height. With
   align-items: baseline, the mark's bottom edge (its baseline) lands on
   the wordmark baseline, so the mark's top aligns with the Y's cap. */
.hero-mark {
  flex: 0 0 auto;
  height: clamp(2.1rem, 8.4vw, 7.7rem);
  width: auto;
  display: block;
  opacity: 0;
  animation: rise-in-short 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s forwards;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: rise-in 1s ease-out 0.5s forwards;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--ink-faint);
  margin-right: 1rem;
  vertical-align: middle;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(3rem, 12vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  margin-bottom: 0;
  padding-bottom: 0.18em;
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.wordmark .yano {
  opacity: 0;
  animation: rise-in-short 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
  display: inline-block;
}

.wordmark .kamay {
  opacity: 0;
  color: var(--accent-light);
  animation: rise-in-skew 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1.05s forwards;
  display: inline-block;
  transform-origin: 0 100%;
  /* Room for the skewed "y" overhang — without padding, the slanted
     glyph clips against the element box. */
  padding-right: 0.20em;
  margin-right: -0.12em;
}

.description {
  max-width: 42rem;
  margin-top: clamp(1.5rem, 4vw, 5rem);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 350;
  opacity: 0;
  animation: rise-in 1.2s ease-out 1.4s forwards;
}

.description em {
  font-style: italic;
  color: var(--ink);
  font-weight: 400;
}

.description .lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7em;
  font-style: normal;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0.15em 0 0.05em;
}

/* footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--rule);
  opacity: 0;
  animation: fade-in 1.2s ease-out 1.2s forwards;
}

footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
}

/* decorative side glyph */
.glyph {
  position: fixed;
  right: clamp(1rem, 3vw, 3rem);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  animation: fade-in 1.5s ease-out 2.2s forwards;
  z-index: 2;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Short-travel variant for the wordmark — keeps the "y" descender
   inside the body's overflow:hidden boundary during animation */
@keyframes rise-in-short {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* "kamay" carries a persistent -9deg skew (brand treatment) that the
   animation must compose with, otherwise the skew snaps off at end. */
@keyframes rise-in-skew {
  from {
    opacity: 0;
    transform: translateY(0.35rem) skewX(-9deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewX(-9deg);
  }
}

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

/* responsive */
@media (max-width: 640px) {
  header .right { display: none; }
  .glyph { display: none; }
  footer {
    font-size: 0.72rem;
  }
}

/* very short viewports (landscape phones) */
@media (max-height: 500px) {
  .glyph { display: none; }
  .description { margin-top: 1rem; }
}
