/* ==========================================================================
   No Lonely Number — main stylesheet
   Mobile-first. Vintage, warm, unhurried. Motion is felt, not noticed.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  background: var(--nln-night-charcoal);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- vignette — a still, worn darkening at the page corners -------------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  background: radial-gradient(
    ellipse 130% 100% at 50% 25%,
    transparent 55%,
    rgba(6, 6, 4, 0.34) 100%
  );
}

/* --- film grain, faint, across the whole page --------------------------- */

body::after {
  content: '';
  position: fixed;
  inset: -100px;
  z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  17%  { transform: translate(-24px, 16px); }
  34%  { transform: translate(12px, -30px); }
  51%  { transform: translate(-18px, -8px); }
  68%  { transform: translate(28px, 22px); }
  85%  { transform: translate(-8px, 30px); }
}

/* --- hero / wordmark ------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-art {
  position: relative;
  height: min(58vw, 460px);
  background-color: var(--nln-asphalt);
  background-image: image-set(
    url('../assets/opt/banner-1280.webp') 1x,
    url('../assets/opt/banner-2480.webp') 2x
  );
  background-size: cover;
  background-position: 58% 42%;
}

@media (min-width: 1300px) {
  .hero-art { background-image: url('../assets/opt/banner-2480.webp'); }
}

/* fade the artwork's dark lower edge into the page background */
.hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 22, 16, 0)   0%,
    rgba(20, 22, 16, 0)   55%,
    rgba(20, 22, 16, 0.6) 82%,
    var(--nln-night-charcoal) 100%
  );
}

/* rain drift — two layers of thin streaks, slow, barely there */
.hero-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-rain::before,
.hero-rain::after {
  content: '';
  position: absolute;
  inset: -120px 0;
  background-image:
    linear-gradient(
      100deg,
      transparent 0 46%,
      rgba(232, 211, 182, 0.28) 46.5%,
      transparent 47% 100%
    );
  background-size: 61px 130px;
  animation: rainfall 1.9s linear infinite;
  opacity: 0.16;
}

.hero-rain::after {
  background-size: 97px 210px;
  animation-duration: 2.9s;
  opacity: 0.09;
}

@keyframes rainfall {
  to { transform: translateY(130px); }
}

.hero-rain::after { animation-name: rainfall-b; }
@keyframes rainfall-b {
  to { transform: translateY(210px); }
}

/* the wordmark — logo lettering scaled to the full page width,
   straddling the artwork's dark lower edge so nothing is hidden.
   The ink is deliberately uneven: darker smudges via gradients clipped
   to the glyphs, and worn patches via a turbulence-noise alpha mask.
   Browsers without mask support just show clean orange — no harm done. */
.wordmark {
  position: relative;
  z-index: 5;
  margin-top: -0.62em;
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 11.2vw;
  line-height: 1;
  letter-spacing: 0.015em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background:
    radial-gradient(28% 60% at 16% 28%, rgba(58, 29, 10, 0.7), transparent 72%),
    radial-gradient(20% 65% at 47% 78%, rgba(74, 38, 13, 0.55), transparent 70%),
    radial-gradient(16% 50% at 71% 22%, rgba(58, 29, 10, 0.6), transparent 70%),
    radial-gradient(24% 60% at 90% 60%, rgba(96, 50, 18, 0.5), transparent 72%),
    linear-gradient(var(--nln-logo-orange), var(--nln-logo-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='320'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045 0.08' numOctaves='3' seed='11'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0.15 0.5 0.85 1 1 1 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='420' height='320' filter='url(%23w)'/%3E%3C/svg%3E");
  -webkit-mask-size: 340px 260px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='320'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045 0.08' numOctaves='3' seed='11'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0.15 0.5 0.85 1 1 1 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='420' height='320' filter='url(%23w)'/%3E%3C/svg%3E");
  mask-size: 340px 260px;
  filter: drop-shadow(0 2px 14px rgba(12, 12, 9, 0.5));
}

/* --- sonnet & portrait, side by side ------------------------------------- */

.duet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  justify-items: center;
  max-width: 64rem;
}

.sonnet {
  max-width: var(--measure);
  text-align: center;
}

.sonnet p {
  font-family: var(--font-sonnet);
  font-feature-settings: 'liga' 1, 'dlig' 1;
  font-size: clamp(1rem, 1.6vw + 0.6rem, 1.4rem);
  line-height: 1.75;
}

.sonnet p + p { margin-top: 1.1em; }

.portrait-fig {
  width: min(100%, 380px);
  margin-inline: auto;
}

.portrait-fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--nln-walnut);
  box-shadow: 0 8px 40px rgba(12, 12, 9, 0.7);
}

/* --- shared section shell ------------------------------------------------ */

section {
  padding: var(--space-5) var(--space-3);
  max-width: 44rem;
  margin-inline: auto;
}

.kicker {
  font-size: var(--step--1);
  font-weight: normal;
  letter-spacing: 0.35em;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: var(--space-4);
}

/* --- listen: one lit lamp, two unlit ------------------------------------- */

.listen { text-align: center; }

.lamps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.lamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.lamp-bulb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--nln-haze);
  box-shadow: none;
}

.lamp-name {
  font-size: var(--step-1);
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

/* the lit one */
.lamp--lit .lamp-bulb {
  background: var(--nln-pad);
  box-shadow:
    0 0 8px  rgba(224, 161, 91, 0.9),
    0 0 26px rgba(212, 153, 86, 0.55),
    0 0 60px rgba(212, 153, 86, 0.25);
  animation: lamplight 7s ease-in-out infinite;
}

.lamp--lit .lamp-name {
  font-size: var(--step-2);
  color: var(--text-accent);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.lamp--lit:hover .lamp-name,
.lamp--lit:focus-visible .lamp-name {
  color: var(--nln-pad);
  text-shadow: 0 0 18px rgba(224, 161, 91, 0.45);
}

/* soft lamplight flicker — an old bulb, not a strobe */
@keyframes lamplight {
  0%, 100% { opacity: 1; }
  42%  { opacity: 0.92; }
  44%  { opacity: 1; }
  71%  { opacity: 0.88; }
  74%  { opacity: 0.97; }
}

/* --- contact ------------------------------------------------------------- */

.contact form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--measure);
  margin-inline: auto;
}

.contact input[type='text'],
.contact input[type='email'] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--nln-walnut);
  border-radius: 0;
  padding: var(--space-2) var(--space-1);
  font-family: var(--font-body);
  font-size: var(--step-1);
  color: var(--text-hi);
  transition: border-color 0.4s ease;
}

.contact input::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.contact input:focus {
  outline: none;
  border-bottom-color: var(--nln-lamplight);
}

.contact button {
  align-self: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--step-1);
  letter-spacing: 0.14em;
  color: var(--nln-black);
  background: var(--nln-machine-tan);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  box-shadow: 0 3px 0 var(--nln-walnut);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.1s ease;
}

.contact button:hover,
.contact button:focus-visible {
  background: var(--nln-pad);
  box-shadow: 0 3px 0 var(--nln-walnut), 0 0 24px rgba(224, 161, 91, 0.35);
}

.contact button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--nln-walnut);
}

/* honeypot — off-screen for humans, present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-note {
  text-align: center;
  font-style: italic;
  color: var(--text-accent);
  min-height: 1.6em;
}

.form-note[hidden] { display: none; }

/* --- footer -------------------------------------------------------------- */

.site-footer {
  padding: var(--space-4) var(--space-3) var(--space-5);
  text-align: center;
  font-size: var(--step--1);
  color: var(--text-dim);
}

/* --- reduced motion: everything still ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after,
  .hero-rain::before,
  .hero-rain::after,
  .lamp--lit .lamp-bulb {
    animation: none;
  }
  .hero-rain { display: none; }
  * { transition: none !important; }
}

/* --- wider screens -------------------------------------------------------- */

@media (min-width: 720px) {
  .lamps {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-5);
    align-items: flex-end;
  }
}

@media (min-width: 900px) {
  .duet {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--space-4);
  }
}
