/* ============ littyl — retro-premium editorial, v2 ============ */
:root {
  --paper: #f4efe6;      /* warm off-white */
  --tint: #e9e0cf;       /* aged card */
  --ink: #33194d;        /* deep plum ink */
  --brand: #5b2b87;      /* logo purple */
  --coral: #f4544d;      /* logo dot */
  --lilac: #d9cbee;
  --muted: #7d7264;
  --hairline: rgba(51, 25, 77, 0.18);

  --font-display: "Zodiak", Georgia, serif;
  --font-body: "General Sans", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --maxw: 105rem; /* widescreen cap */
}

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

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.2 0 0 0 0 0.1 0 0 0 0 0.3 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: grain 9s steps(6) infinite; }
  @keyframes grain {
    0%,100% { transform: translate(0,0); }
    20% { transform: translate(-2%,1%); }
    40% { transform: translate(1%,-2%); }
    60% { transform: translate(-1%,2%); }
    80% { transform: translate(2%,-1%); }
  }
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }

.wrap { max-width: var(--maxw); margin-inline: auto; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem var(--pad);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand sup { font-size: 0.55em; font-family: var(--font-body); font-weight: 500; }
.brand-mark { width: 1.7rem; height: 1.7rem; }
.brand-mark .lm-l { fill: var(--brand); }
.brand-mark .lm-dot { fill: var(--coral); }
.topnav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.topnav a {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  position: relative;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 62px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vh, 3.5rem) var(--pad) clamp(1.5rem, 5vh, 3rem);
  max-width: none; /* canvas full-bleed */
  overflow: hidden;
}
.hero > :not(#goo):not(.hero-logo):not(.scroll-hint) {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

#goo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-logo {
  position: absolute;
  z-index: 1;
  width: clamp(11rem, 22vw, 20rem);
  right: clamp(2rem, 8vw, 10rem);
  top: 12%;
  opacity: 0.9;
  transform: rotate(8deg);
}
.hero-logo .hl-l {
  fill: none;
  stroke: var(--brand);
  stroke-width: 7;
  opacity: 0.85;
}
.hero-logo .hl-dot { fill: var(--coral); }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: floaty 7s ease-in-out infinite; }
  @keyframes floaty {
    0%, 100% { transform: rotate(8deg) translateY(0); }
    50% { transform: rotate(4deg) translateY(-1.6rem); }
  }
  .hero-logo .hl-l {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: draw 2.2s cubic-bezier(0.6, 0, 0.2, 1) 0.5s forwards;
  }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .hero-logo .hl-dot {
    transform-origin: 330px 240px;
    transform: scale(0);
    animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 2.1s forwards;
  }
  @keyframes pop { to { transform: scale(1); } }
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 19vw, 19rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  user-select: none;
  margin: auto 0;
  padding-top: 3vh;
  color: var(--brand);
}
.wm {
  display: inline-block;
  transform: translateY(var(--off, 0));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}
.wm:hover { transform: translateY(calc(var(--off, 0) - 0.07em)); color: var(--coral); }
.wm-up   { --off: -0.085em; }
.wm-down { --off:  0.07em; }
.wm-up2  { --off: -0.045em; font-style: italic; }
.wm-dot  { color: var(--coral); --off: 0; margin-left: 0.02em; }

@media (prefers-reduced-motion: no-preference) {
  .wm {
    animation: wm-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i) * 90ms + 150ms);
  }
  @keyframes wm-rise {
    from { opacity: 0; transform: translateY(calc(var(--off, 0) + 0.35em)); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(var(--off, 0)); filter: blur(0); }
  }
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.thesis {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.35;
  max-width: 26ch;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.thesis em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
}
.hero-meta {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}
.hero-meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.hero-meta dd {
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 84, 77, 0.4); }
    50% { box-shadow: 0 0 0 7px rgba(244, 84, 77, 0); }
  }
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1rem, 3vh, 2rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  z-index: 2;
}
.scroll-hint svg { width: 10px; height: 26px; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint svg { animation: nudge 1.8s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translateY(5px); } }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 0.9rem 0;
  background: var(--coral);
  color: var(--paper);
}
.marquee-track { display: flex; white-space: nowrap; width: max-content; }
.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: scroll 26s linear infinite; }
  @keyframes scroll { to { transform: translateX(-25%); } }
}

/* ---------- shelf ---------- */
.shelf { padding: clamp(4rem, 10vh, 8rem) var(--pad); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 8vh, 5.5rem);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1.25rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
}
.section-head p { color: var(--muted); font-size: 0.95rem; }

.app-row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vh, 4rem) 0;
}
.app-row + .app-row { border-top: 1px solid var(--hairline); }
.app-row .app-copy { order: 0; }
.app-row .plate { order: 1; }
.row-flip .app-copy { order: 1; }
.row-flip .plate { order: 0; }

.plate { margin: 0; will-change: transform; }
.plate-right { rotate: 1.2deg; }
.plate-left  { rotate: -1.2deg; }
.plate svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-row:hover .plate svg { transform: scale(1.025) rotate(-0.6deg); }

.p-tint { fill: var(--tint); }
.p-ink { fill: var(--brand); }
.p-accent { fill: var(--coral); }
.p-soft { fill: var(--lilac); stroke: var(--brand); stroke-width: 2; }
.p-card { fill: var(--paper); stroke: var(--brand); stroke-width: 2.5; }
.p-line { fill: none; stroke: var(--brand); stroke-width: 2; }

.app-no {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--coral);
  margin-bottom: 0.9rem;
}
.app-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.1rem;
  color: var(--brand);
}
.app-desc {
  max-width: 42ch;
  color: color-mix(in srgb, var(--ink) 84%, var(--muted));
  margin-bottom: 1.4rem;
  font-size: 1.02rem;
}
.app-status { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1.5px solid var(--coral);
  color: var(--coral);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.app-row:hover .chip:not(.chip-ghost) { background: var(--coral); color: var(--paper); }
.chip-ghost { border-color: var(--hairline); color: var(--muted); }

/* ---------- studio ---------- */
.studio {
  background: var(--brand);
  color: var(--paper);
  padding: clamp(4.5rem, 12vh, 8.5rem) var(--pad);
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--maxw);
  margin-inline: auto;
}
.studio-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(244, 239, 230, 0.55);
}
.studio-lede {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
  max-width: 24ch;
}
.studio-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  color: rgba(244, 239, 230, 0.8);
  font-size: 0.98rem;
  max-width: 62rem;
}
.pull {
  grid-column: 1 / -1;
  justify-self: end;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  color: var(--coral);
  text-align: right;
  margin-top: clamp(2rem, 6vh, 4rem);
  transform: rotate(-1.5deg);
}

/* ---------- contact ---------- */
.contact {
  padding: clamp(5rem, 14vh, 9rem) var(--pad);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.contact .eyebrow { justify-content: center; }
.contact-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 5.6rem);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--brand);
  transition: color 0.3s ease, letter-spacing 0.4s ease;
}
.contact-link:hover { color: var(--coral); letter-spacing: -0.02em; }
.contact-sub { color: var(--muted); max-width: 44ch; }

/* ---------- colophon ---------- */
.colophon {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem var(--pad);
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(5px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
  }
  .reveal.is-in { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .app-row { grid-template-columns: 1fr; }
  .app-row .plate, .row-flip .plate { order: 0; }
  .app-row .app-copy, .row-flip .app-copy { order: 1; }
  .plate-right, .plate-left { rotate: none; max-width: 26rem; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-cols { grid-template-columns: 1fr; }
  .pull { justify-self: start; text-align: left; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-logo { width: 9rem; right: 6%; top: 9%; opacity: 0.55; }
  .scroll-hint { display: none; }
}
@media (max-width: 520px) {
  .topnav a { font-size: 0.72rem; }
  .section-head { flex-direction: column; gap: 0.4rem; }
}
