/* Newsletter landing page (/newsletter/, views/newsletter.ejs). Everything is scoped under .nl,
   so the site's style.css (loaded by partials/head) doesn't need overrides elsewhere. */

body:has(.nl) { background: #0b0b0d; }

.nl {
  --nl-bg: #0b0b0d;
  --nl-bg-alt: #111114;
  --nl-surface: #16161a;
  --nl-surface-2: #1c1c21;
  --nl-border: rgba(255, 255, 255, .08);
  --nl-text: #f4f4f5;
  --nl-muted: #a1a1aa;
  --nl-accent: #d40b3e;
  --nl-accent-hover: #ec1a50;
  --nl-radius: 16px;
  color: var(--nl-text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, sans-serif;
  background: var(--nl-bg);
  -webkit-font-smoothing: antialiased;
}
.nl *, .nl *::before, .nl *::after { box-sizing: border-box; }
.nl h1, .nl h2, .nl h3 { font-family: Montserrat, Inter, sans-serif; color: var(--nl-text); margin: 0; letter-spacing: -.01em; }
.nl p { margin: 0; }
.nl a { color: inherit; }
.nl img { max-width: 100%; display: block; }
.nl ul, .nl ol, .nl dl, .nl dd, .nl figure { margin: 0; padding: 0; list-style: none; }
.nl [id] { scroll-margin-top: 80px !important; }

.nl-wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.nl-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.nl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 48px; border: 0; border-radius: 999px;
  background: var(--nl-accent); color: #fff !important; text-decoration: none;
  font: 700 14px/1 Montserrat, Inter, sans-serif; white-space: nowrap; cursor: pointer;
  box-shadow: 0 8px 24px rgba(212, 11, 62, .3);
  transition: background .2s, transform .2s;
}
.nl-btn:hover { background: var(--nl-accent-hover); }
.nl-btn:active { transform: translateY(1px); }
.nl-btn[disabled] { opacity: .6; cursor: wait; }
.nl-btn--small { height: 36px; padding: 0 16px; font-size: 13px; box-shadow: none; }
.nl-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .2); box-shadow: none; }
.nl-btn--ghost:hover { background: rgba(255, 255, 255, .06); }

/* Header */
.nl-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 13, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nl-border);
}
body:has(#admin-bar) .nl-header { top: 32px; }
.nl-header__in { display: flex; align-items: center; gap: 24px; height: 64px; max-width: 1100px; }
.nl-header__logo img { width: 125px; height: auto; }
.nl-header__nav { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nl-header__nav a { position: relative; color: var(--nl-muted); text-decoration: none; transition: color .2s; }
.nl-header__nav a:hover { color: var(--nl-text); }
/* The section in view (scroll spy in newsletter.ejs): white text + an accent line under it. */
.nl-header__nav a.is-active { color: var(--nl-text); }
.nl-header__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--nl-accent); transform: scaleX(0); transition: transform .2s;
}
.nl-header__nav a.is-active::after { transform: scaleX(1); }

/* Hero */
.nl-hero {
  position: relative; overflow: hidden; padding: 72px 0 88px;
  background:
    radial-gradient(60% 50% at 70% 0%, rgba(212, 11, 62, .28), transparent 70%),
    radial-gradient(40% 40% at 100% 100%, rgba(212, 11, 62, .12), transparent 70%),
    var(--nl-bg);
  border-bottom: 1px solid var(--nl-border);
}
.nl-hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; max-width: 1100px; }
.nl-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(212, 11, 62, .45); background: rgba(212, 11, 62, .1);
  font: 700 11px/1 Montserrat, sans-serif; letter-spacing: .08em; text-transform: uppercase;
}
.nl-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--nl-accent); box-shadow: 0 0 0 3px rgba(212, 11, 62, .3); }
.nl h1 { margin: 22px 0 22px; font-size: clamp(36px, 5.4vw, 62px); font-weight: 800; line-height: 1.08; }
.nl h1 em { display: block; font-style: normal; color: var(--nl-accent); }
.nl-lead { color: var(--nl-muted); font-size: 17px; max-width: 520px; }
.nl-ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px !important; font-size: 13px; color: var(--nl-muted); }
.nl-ticks li { display: flex; align-items: center; gap: 7px; }
.nl-ticks li::before { content: "✓"; color: var(--nl-accent); font-weight: 700; }

/* Signup form */
.nl-formbox {
  margin-top: 28px; padding: 14px; max-width: 540px;
  background: rgba(22, 22, 26, .85); border: 1px solid var(--nl-border); border-radius: 18px;
}
.nl-form__row { display: flex; gap: 10px; }
.nl-form__field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 48px;
  background: var(--nl-bg); border: 1px solid var(--nl-border); border-radius: 999px; color: var(--nl-muted);
}
.nl-form__field:focus-within { border-color: var(--nl-accent); }
.nl .nl-form__field input {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; box-shadow: none; border-radius: 0;
  background: transparent; color: var(--nl-text); font: inherit; font-size: 16px; /* under 16px iOS zooms in on focus */ line-height: normal; text-align: left;
}
.nl-form__field input::placeholder { color: #71717a; }
.nl-form__consent { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--nl-muted); cursor: pointer; }
.nl-form__consent input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--nl-accent); cursor: pointer; }
.nl-form__consent a { color: var(--nl-text); }
.nl-form .message { font-size: 14px; margin-top: 10px; }
.nl-form .message:empty { display: none; }
.nl-form .message.success { color: #4ade80; }
.nl-form .message.error { color: #fb7185; }

/* Hero phone: the whole issue scrolls slowly inside the screen */
.nl-hero__phone { position: relative; display: flex; flex-direction: column; align-items: center; }
.nl-hero__phone figcaption, .nl-sample figcaption { margin-top: 18px; font-size: 12px; color: #71717a; text-align: center; }
.nl-phone {
  position: relative; width: 290px; padding: 10px; border-radius: 44px;
  background: #1a1a1f; border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 2px #000;
}
.nl-phone__bar { display: flex; height: 34px; align-items: center; padding: 0 22px; font: 600 12px/1 Inter, sans-serif; background: #fff; color: #000; border-radius: 34px 34px 0 0; }
.nl-phone__screen { height: 520px; overflow: hidden; background: #fff; border-radius: 0 0 34px 34px; }
.nl-phone__mail { width: 100%; height: auto; animation: nl-scroll 60s ease-in-out infinite alternate; }
@keyframes nl-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-100% + 520px)); } }
.nl-float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(22, 22, 26, .92); border: 1px solid var(--nl-border); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-size: 12px; line-height: 1.3;
}
.nl-float strong { display: block; font-size: 13px; }
.nl-float small { color: var(--nl-muted); font-size: 11px; }
.nl-float__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(212, 11, 62, .2); color: var(--nl-accent); font-size: 12px; }
.nl-float--tips { top: 90px; left: -30px; }
.nl-float--news { top: 360px; right: -40px; }

/* Sections */
.nl-section { padding: 88px 0; border-bottom: 1px solid var(--nl-border); }
.nl-section--alt { background: var(--nl-bg-alt); }
.nl-h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.15; }
.nl-h2::before { content: ""; display: block; width: 40px; height: 3px; margin-bottom: 22px; background: var(--nl-accent); border-radius: 2px; }
.nl-sub { margin-top: 14px !important; color: var(--nl-muted); max-width: 560px; }

/* Last issue: two rows of article cards drifting sideways */
.nl-issue { overflow: hidden; }
.nl-issue__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.nl-marquee { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.nl-marquee + .nl-marquee { margin-top: 16px; }
.nl-marquee__track, .nl-marquee__copy { display: flex; gap: 16px; width: max-content; }
.nl-marquee__track { animation: nl-marquee 70s linear infinite; }
.nl-marquee--reverse .nl-marquee__track { animation-direction: reverse; }
.nl-marquee:hover .nl-marquee__track, .nl-marquee:focus-within .nl-marquee__track { animation-play-state: paused; }
@keyframes nl-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
.nl-card {
  flex: none; width: 216px; display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: 14px;
  transition: border-color .2s, transform .2s;
}
.nl-card:hover { border-color: rgba(212, 11, 62, .6); transform: translateY(-2px); }
.nl-card img, .nl-card__noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--nl-surface-2); }
.nl-card__body { display: block; padding: 12px 14px 16px; }
.nl-card__label { display: block; font: 700 10px/1 Montserrat, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--nl-accent); }
.nl-card__title { display: block; margin-top: 8px; font: 700 13px/1.4 Montserrat, sans-serif; color: var(--nl-text); }

/* Stats */
.nl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: var(--nl-radius); overflow: hidden; }
.nl-stats > div { position: relative; padding: 26px 22px; border-left: 1px solid var(--nl-border); }
.nl-stats > div:first-child { border-left: 0; }
.nl-stats > div::before { content: ""; position: absolute; top: 0; left: 22px; width: 28px; height: 3px; background: var(--nl-accent); }
.nl-stats dt { font: 800 32px/1.1 Montserrat, sans-serif; }
.nl-stats > div:first-child dt { color: var(--nl-accent); }
.nl-stats dd { margin-top: 8px; font-size: 13px; color: var(--nl-muted); }
.nl-section:has(.nl-stats) { padding: 56px 0; }

/* Boxes */
.nl-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px !important; }
.nl-box { padding: 24px; background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: var(--nl-radius); }
.nl-box h3 { margin-top: 18px; font-size: 16px; font-weight: 700; }
.nl-box p { margin-top: 8px; font-size: 14px; color: var(--nl-muted); }
.nl-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(212, 11, 62, .15); color: var(--nl-accent); flex: none; }
.nl-box--wide { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.nl-box--wide h3 { margin-top: 0; }
.nl-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto !important; max-width: 380px; }
.nl-chips li { padding: 7px 12px; border-radius: 999px; background: var(--nl-bg); border: 1px solid var(--nl-border); font-size: 12px; font-weight: 500; }

/* How an issue looks */
.nl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.nl-split > *, .nl-hero__in > *, .nl-cta > * { min-width: 0; }
.nl-part { margin-top: 26px; padding-left: 16px; border-left: 3px solid var(--nl-accent); }
.nl-part h3 { font-size: 16px; }
.nl-part p { margin-top: 6px; font-size: 14px; color: var(--nl-muted); }
.nl-part + .nl-part { border-left-color: rgba(212, 11, 62, .45); }
.nl-split .nl-btn { margin-top: 32px; }
.nl .nl-sample { padding: 28px 24px 18px; background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: 20px; }
.nl-sample__phones { display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
.nl-phone--small { width: calc(50% - 8px); max-width: 220px; padding: 6px; border-radius: 26px; }
.nl-phone--small:last-child { margin-top: 36px; }
.nl-phone--small .nl-phone__screen { height: 400px; border-radius: 20px; }
/* Crops of the full issue screenshot (640×3918): the tip grid, and the news part */
.nl-sample__img { width: 100%; height: auto; }
.nl-sample__img--tips { margin-top: -141%; }
.nl-sample__img--news { margin-top: -338%; }

/* Steps */
.nl-steps { counter-reset: none; }
.nl-step { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--nl-accent); font: 800 14px/1 Montserrat, sans-serif; box-shadow: 0 0 0 6px rgba(212, 11, 62, .15); }

/* FAQ */
.nl-split--faq { align-items: start; }
.nl-faq { display: flex; flex-direction: column; gap: 10px; }
.nl-faq details { background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: 12px; }
.nl-faq details[open] { border-color: rgba(212, 11, 62, .55); }
.nl-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px;
  font: 700 14px/1.4 Montserrat, sans-serif; cursor: pointer; list-style: none;
}
.nl-faq summary::-webkit-details-marker { display: none; }
.nl-faq summary::after { content: ""; width: 8px; height: 8px; flex: none; border: solid var(--nl-accent); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.nl-faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.nl-faq details p { padding: 0 20px 18px; font-size: 14px; color: var(--nl-muted); }

/* Bottom call to action */
.nl-cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px 32px;
  border: 1px solid rgba(212, 11, 62, .4); border-radius: 24px;
  background: radial-gradient(70% 90% at 0% 100%, rgba(212, 11, 62, .35), transparent 70%), radial-gradient(40% 60% at 100% 0%, rgba(212, 11, 62, .15), transparent 70%), var(--nl-surface);
}
.nl-cta .nl-formbox { margin-top: 0; }

/* Footer */
.nl-footer { padding: 28px 0; font-size: 12px; color: var(--nl-muted); }
.nl-footer__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1100px; }
.nl-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.nl-footer nav a { display: inline-block; padding: 10px 0; }
.nl-footer a { text-decoration: none; }
.nl-footer a:hover { color: var(--nl-text); }

/* Tablet / phone */
@media (max-width: 900px) {
  .nl-header__nav { display: none; }
  .nl-header__in { justify-content: space-between; }
  .nl-hero { padding: 48px 0 64px; }
  .nl-hero__in, .nl-split, .nl-cta { grid-template-columns: 1fr; }
  .nl-hero__phone { margin-top: 16px; }
  .nl-grid3 { grid-template-columns: 1fr; }
  .nl-box--wide { flex-wrap: wrap; }
  .nl-chips { justify-content: flex-start; margin-left: 0 !important; max-width: none; }
  .nl-issue__head { flex-direction: column; align-items: flex-start; }
  .nl-section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .nl-wrap { padding: 0 16px; }
  .nl-form__row { flex-direction: column; }
  .nl-form__row .nl-btn { width: 100%; }
  /* flex: 1 in the now vertical row would squash the field to the input's height */
  .nl-form__field { flex: none; }
  .nl-stats dt { font-size: 26px; }
  .nl-stats > div { padding: 22px 18px; }
  .nl-stats > div::before { left: 18px; }
  .nl-stats > div { border-left: 0; border-top: 1px solid var(--nl-border); }
  .nl-stats > div:first-child { border-top: 0; }
  .nl-float--tips { left: 0; }
  .nl-float--news { right: 0; }
  .nl-phone { width: 260px; }
  .nl-cta { padding: 32px 20px; }
  .nl .nl-sample { padding: 16px 12px 14px; }
  .nl-sample__phones { gap: 10px; }
  .nl-phone--small .nl-phone__screen { height: 320px; }
  .nl-footer__in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .nl-phone__mail { animation: none; }
  .nl-marquee { mask-image: none; -webkit-mask-image: none; overflow-x: auto; }
  .nl-marquee__track { animation: none; }
  .nl-marquee__copy { display: none; }
}
