:root {
  --bg: #16191B;
  --amber: #D4A853;
  --amber-dim: rgba(212, 168, 83, 0.15);
  --amber-muted: rgba(212, 168, 83, 0.4);
  --paper: #E8DCC8;
  --text: #F5F2ED;
  --muted: rgba(245, 242, 237, 0.56);
  --dim: rgba(245, 242, 237, 0.15);
  --teal: #5B8A8A;
  --surface: rgba(232, 220, 200, 0.045);
  --surface-strong: rgba(232, 220, 200, 0.075);
  --font: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to right,
      rgba(245, 242, 237, 0.024) 0,
      rgba(245, 242, 237, 0.024) 1px,
      transparent 1px,
      transparent 40px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(245, 242, 237, 0.024) 0,
      rgba(245, 242, 237, 0.024) 1px,
      transparent 1px,
      transparent 40px
    );
  mask-image: linear-gradient(to bottom, black 0, rgba(0, 0, 0, 0.35) 760px, rgba(0, 0, 0, 0.12) 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

img,
svg {
  display: block;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 20px 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 52px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.home-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.hero {
  display: grid;
  gap: 32px;
  align-items: start;
  min-height: calc(100vh - 160px);
  padding-bottom: 54px;
}

.hero-copy {
  position: relative;
  max-width: 760px;
  padding-top: 18px;
}

.hero-copy::after {
  content: '';
  position: absolute;
  top: -44px;
  right: 4px;
  width: 240px;
  height: 240px;
  pointer-events: none;
  border: 1px solid var(--amber-dim);
  border-radius: 50%;
  opacity: 0.8;
  box-shadow:
    0 0 0 52px rgba(212, 168, 83, 0.035),
    0 0 0 104px rgba(212, 168, 83, 0.02);
}

.reference-code,
.panel-label,
.benefit-card span {
  margin: 0 0 16px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-dek {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
}

.signup-panel,
.membership,
.benefit-card,
.tool-strip {
  border: 1px solid rgba(232, 220, 200, 0.13);
  border-radius: 2px;
  background: var(--surface);
}

.signup-panel {
  padding: 24px;
}

.signup-heading {
  max-width: 560px;
}

.signup-heading h2,
.membership-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.signup-heading p:last-child,
.membership-intro p {
  margin-bottom: 22px;
  color: var(--muted);
}

.newsletter-options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.newsletter-toggle {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: rgba(22, 25, 27, 0.5);
  border: 1px solid var(--dim);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.newsletter-toggle:hover,
.newsletter-toggle.selected {
  border-color: var(--amber-muted);
  background: rgba(212, 168, 83, 0.07);
}

.toggle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: transparent;
  border: 1px solid rgba(245, 242, 237, 0.28);
  border-radius: 2px;
}

.newsletter-toggle.selected .toggle-box {
  color: var(--bg);
  background: var(--amber);
  border-color: var(--amber);
}

.choice-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.choice-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.choice-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.newsletter-form {
  margin: 0;
}

.newsletter-input-row {
  display: grid;
  gap: 8px;
}

.newsletter-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(232, 220, 200, 0.06);
  border: 1px solid rgba(232, 220, 200, 0.18);
  border-radius: 2px;
  outline: none;
}

.newsletter-input::placeholder {
  color: var(--muted);
}

.newsletter-input:focus {
  border-color: var(--amber);
}

.newsletter-submit {
  min-height: 48px;
  padding: 12px 18px;
  color: var(--bg);
  background: var(--amber);
  border: 0;
  border-radius: 2px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.newsletter-submit:hover:not(:disabled) {
  background: #b8923e;
}

.newsletter-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.newsletter-note {
  margin: 12px 0 0;
  color: rgba(245, 242, 237, 0.44);
  font-size: 12px;
  line-height: 1.45;
}

.newsletter-error,
.newsletter-success {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

.newsletter-error {
  color: #ff8e78;
}

.newsletter-success {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--amber);
}

.success-dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
}

.membership {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.membership-intro {
  max-width: 680px;
}

.membership-grid {
  display: grid;
  gap: 12px;
}

.benefit-card {
  padding: 18px;
  background: rgba(232, 220, 200, 0.035);
}

.benefit-card span {
  display: block;
  margin-bottom: 10px;
}

.benefit-card h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.2;
}

.benefit-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}

.tool-strip {
  display: grid;
  gap: 1px;
  overflow: hidden;
  padding: 1px;
  background: rgba(232, 220, 200, 0.11);
}

.tool-strip div {
  padding: 16px;
  background: rgba(22, 25, 27, 0.92);
}

.tool-strip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.tool-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 28px 32px 80px;
  }

  .newsletter-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 840px) {
  .site-header {
    padding-bottom: 74px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 46px;
    align-items: center;
  }

  .signup-panel {
    position: sticky;
    top: 24px;
  }

  .membership {
    padding: 32px;
  }

  .membership-grid,
  .tool-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding-inline: 16px;
  }

  .site-header {
    padding-bottom: 34px;
  }

  .hero {
    min-height: 0;
    padding-bottom: 34px;
  }

  .hero-copy::after {
    width: 160px;
    height: 160px;
    top: -24px;
    right: -34px;
  }

  .signup-panel,
  .membership {
    padding: 18px;
  }

  .reference-code,
  .panel-label,
  .benefit-card span {
    font-size: 10px;
  }
}
