/* =========================================================================
   Midnight Study Studios — Splash
   Palette: Dark Academia — burgundy accent on warm ivory
   Type: Instrument Serif (display) + Satoshi (body)
   ========================================================================= */

:root {
  --bg: #F4EEE2;              /* warm ivory paper */
  --surface: #EBE3D3;         /* slightly deeper ivory for cards */
  --border: #C8B996;          /* muted parchment border */
  --text: #1D1712;            /* deep near-black */
  --muted: #6B5C4A;           /* aged sepia */
  --faint: #A69577;           /* tertiary text */
  --accent: #6E1F2A;          /* deep burgundy */
  --accent-dark: #4A1119;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* --- Grain overlay --- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* --- Rain (very subtle, near opacity of dust) --- */
.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0.35;
}

.drop {
  position: absolute;
  width: 1px;
  height: 30px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(110, 31, 42, 0.22),
    transparent
  );
  animation: fall linear infinite;
  transform: rotate(4deg);
}

.drop:nth-child(1)  { left: 4%;  animation-duration: 3.2s; animation-delay: 0s;    }
.drop:nth-child(2)  { left: 11%; animation-duration: 4.1s; animation-delay: 0.8s;  }
.drop:nth-child(3)  { left: 17%; animation-duration: 2.9s; animation-delay: 1.4s;  }
.drop:nth-child(4)  { left: 24%; animation-duration: 3.8s; animation-delay: 0.2s;  }
.drop:nth-child(5)  { left: 31%; animation-duration: 3.3s; animation-delay: 2.1s;  }
.drop:nth-child(6)  { left: 37%; animation-duration: 4.4s; animation-delay: 0.6s;  }
.drop:nth-child(7)  { left: 43%; animation-duration: 3.6s; animation-delay: 1.8s;  }
.drop:nth-child(8)  { left: 49%; animation-duration: 3.1s; animation-delay: 0.4s;  }
.drop:nth-child(9)  { left: 55%; animation-duration: 4.2s; animation-delay: 2.5s;  }
.drop:nth-child(10) { left: 62%; animation-duration: 3.5s; animation-delay: 1.1s;  }
.drop:nth-child(11) { left: 68%; animation-duration: 3.9s; animation-delay: 0.3s;  }
.drop:nth-child(12) { left: 74%; animation-duration: 3.0s; animation-delay: 1.6s;  }
.drop:nth-child(13) { left: 80%; animation-duration: 4.0s; animation-delay: 2.3s;  }
.drop:nth-child(14) { left: 86%; animation-duration: 3.4s; animation-delay: 0.9s;  }
.drop:nth-child(15) { left: 92%; animation-duration: 3.7s; animation-delay: 1.3s;  }
.drop:nth-child(16) { left: 8%;  animation-duration: 4.3s; animation-delay: 2.0s;  }
.drop:nth-child(17) { left: 27%; animation-duration: 3.2s; animation-delay: 2.7s;  }
.drop:nth-child(18) { left: 47%; animation-duration: 3.8s; animation-delay: 0.7s;  }
.drop:nth-child(19) { left: 66%; animation-duration: 4.1s; animation-delay: 1.9s;  }
.drop:nth-child(20) { left: 84%; animation-duration: 3.6s; animation-delay: 2.4s;  }

@keyframes fall {
  0%   { transform: translateY(-40px) rotate(4deg); }
  100% { transform: translateY(105vh)  rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .drop { animation: none; opacity: 0; }
}

/* --- Layout scaffolding --- */
.masthead,
.stage,
.foot {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

/* --- Masthead --- */
.masthead {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(200, 185, 150, 0.5);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  text-decoration: none;
}

.logo svg {
  color: var(--accent);
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.volume {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* --- Stage (main content) --- */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* --- Content column --- */
.content { max-width: 40rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem 0;
  font-weight: 500;
}

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem 0;
  color: var(--text);
}

.headline em {
  font-style: italic;
  color: var(--accent);
  font-family: var(--serif);
}

.lede {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 0 2.5rem 0;
  font-weight: 400;
}

/* --- Capture form --- */
.capture {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  align-items: baseline;
}

.capture input[type='email'] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0.6rem 0 0.6rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  outline: none;
}

.capture input[type='email']::placeholder { color: var(--faint); }

.capture input[type='email']:focus { outline: none; }

.capture input[type='email']:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.capture button {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0.6rem 0.25rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.capture button:hover:not(:disabled) {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.capture button:disabled {
  color: var(--faint);
  cursor: not-allowed;
}

.capture-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.75rem 0 0 0;
  font-style: italic;
  transition: color 0.3s ease;
}

/* --- Colophon (right column) --- */
.colophon {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
  margin-top: 0.5rem;
}

@media (max-width: 820px) {
  .colophon {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 2rem;
  }
}

.colophon-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(200, 185, 150, 0.35);
}

.colophon-row:last-child { border-bottom: none; }

.colophon-key {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

.colophon-value {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.35;
}

/* --- Footer --- */
.foot {
  padding: 1.75rem var(--gutter);
  border-top: 1px solid rgba(200, 185, 150, 0.5);
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  flex-wrap: wrap;
}

.foot-sep { opacity: 0.4; }

/* --- Utilities --- */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
}
