/* ==========================================================================
   landing.css — focused, production-ready landing page.
   Built entirely on the Al-Shawabkeh design tokens. Mobile-first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared
   -------------------------------------------------------------------------- */

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(0, 215, 122, 0.62);
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.toast-stack {
  position: fixed;
  z-index: 1400;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(0, 215, 122, 0.32);
  border-radius: 10px 10px 5px 10px;
  background: rgba(7, 20, 12, 0.96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  color: var(--fog-200);
  pointer-events: auto;
  animation: toast-in 420ms var(--ease-spring) both;
}

.toast[data-leaving="true"] { animation: toast-out 260ms ease both; }
.toast-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(0, 215, 122, 0.24); border-radius: 7px 7px 4px 7px; color: var(--brand); }
.toast-copy strong { display: block; font-size: 0.78rem; }
.toast-copy span { display: block; margin-top: 2px; color: var(--fog-500); font-size: 0.75rem; }
.toast-close { border: 0; background: transparent; color: var(--fog-500); cursor: pointer; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .live-dot { animation: none; }
}

/* --------------------------------------------------------------------------
   Header — clean top bar (brand + studio access only)
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 900;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border-dark);
  background: rgba(3, 7, 5, 0.82);
  backdrop-filter: blur(18px) saturate(125%);
}

.header-frame {
  width: min(calc(100% - 36px), var(--content-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-grid;
  grid-template-columns: 37px auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark-wrap {
  position: relative;
  width: 37px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: rgba(0, 215, 122, 0.09);
  border: 1px solid rgba(0, 215, 122, 0.25);
  border-radius: 8px 8px 4px 8px;
}

.brand-mark-wrap::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  right: -3px;
  top: -3px;
  background: var(--brand);
  box-shadow: 0 0 15px rgba(0, 215, 122, 0.8);
}

.brand-mark { width: 22px; height: 22px; }

.brand-copy { display: grid; line-height: 1.05; min-width: 0; }

.brand-copy strong {
  color: var(--fog-50);
  font-size: 0.88rem;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--fog-400);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-era {
  padding-left: 10px;
  border-left: 1px solid var(--border-dark);
  color: var(--brand-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.login-key {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(0, 215, 122, 0.42);
  border-radius: 9px 9px 5px 9px;
  background: rgba(0, 215, 122, 0.08);
  color: var(--brand-soft);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}

.login-key:hover,
.login-key:focus-visible {
  background: var(--brand);
  color: var(--ink-950);
}

.login-key svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Hero — who am I
   -------------------------------------------------------------------------- */

.landing-hero {
  position: relative;
  padding: calc(var(--header-height) + clamp(64px, 10vh, 120px)) 0 clamp(72px, 10vw, 120px);
  background:
    radial-gradient(circle at 80% 10%, rgba(0, 215, 122, 0.09), transparent 30%),
    radial-gradient(circle at 6% 85%, rgba(0, 215, 122, 0.045), transparent 26%),
    var(--ink-950);
  overflow: hidden;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(205, 242, 222, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 242, 222, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 45%, #000 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-bottom: 26px;
}

.hero-kicker-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-kicker-main::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brand);
}

.hero-kicker-meta {
  color: var(--fog-600);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.hero-title {
  color: var(--fog-50);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 680;
  line-height: 0.94;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.hero-title span {
  color: var(--brand-soft);
  font-weight: 590;
}

.hero-intro {
  max-width: 660px;
  margin-top: 28px;
  color: var(--fog-400);
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.hero-intro strong {
  color: var(--fog-100);
  font-weight: 680;
}

.hero-actions { margin-top: 36px; }

.hero-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 760px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--border-dark);
}

.hero-ledger-item {
  padding: 0 22px 18px 0;
}

.hero-ledger-item + .hero-ledger-item { border-left: 1px solid var(--border-dark); padding-left: 22px; }
.hero-ledger-item:nth-child(3) { border-left: 0; padding-left: 0; }

.hero-ledger-item strong {
  display: block;
  color: var(--fog-100);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-ledger-item span {
  display: block;
  margin-top: 6px;
  color: var(--fog-600);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Disciplines — what you gain (6 cards)
   -------------------------------------------------------------------------- */

.disciplines {
  position: relative;
  padding-block: clamp(76px, 10vw, 140px);
  background: var(--ink-900);
  border-block: 1px solid var(--border-dark);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 68px);
}

.section-head h2 {
  color: var(--fog-50);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.section-head h2 span { color: var(--brand); }

.section-head p {
  max-width: 560px;
  margin-top: 18px;
  color: var(--fog-400);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  line-height: 1.6;
}

.disciplines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.discipline-card {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--border-dark);
  border-radius: 13px 13px 6px 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.discipline-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 20px;
  height: 20px;
  border-right: 1px solid rgba(0, 215, 122, 0.4);
  border-bottom: 1px solid rgba(0, 215, 122, 0.4);
  border-radius: 0 0 6px 0;
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.discipline-card:hover {
  border-color: var(--border-dark-strong);
  background: rgba(0, 215, 122, 0.03);
  transform: translateY(-3px);
}

.discipline-card:hover::after { opacity: 1; }

.discipline-card .card-index {
  display: block;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.discipline-card h3 {
  margin-top: 12px;
  color: var(--fog-50);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.discipline-card p {
  margin-top: 9px;
  color: var(--fog-500);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Newsletter — why join (centered, email first)
   -------------------------------------------------------------------------- */

.newsletter {
  position: relative;
  padding-block: clamp(80px, 11vw, 150px);
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 215, 122, 0.07), transparent 42%),
    var(--ink-950);
  overflow: hidden;
}

.newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(205, 242, 222, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 242, 222, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
  pointer-events: none;
}

.newsletter-center {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.newsletter-center .section-number { justify-content: center; }
.newsletter-center .section-number::before { display: none; }

.newsletter-center h2 {
  color: var(--fog-50);
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.newsletter-center h2 span { color: var(--brand); }

.newsletter-lede {
  max-width: 540px;
  margin: 34px auto 0;
  color: var(--fog-500);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.65;
}

.newsletter-form {
  max-width: 620px;
  margin: 40px auto 0;
}

.newsletter-input {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.newsletter-input .input {
  min-height: 62px;
  padding: 0 20px;
  border-radius: 12px 12px 6px 12px;
  font-size: 1.05rem;
}

.newsletter-input .button {
  min-height: 62px;
  padding-inline: 28px;
  border-radius: 12px 12px 6px 12px;
  font-size: 0.95rem;
}

.newsletter-note {
  min-height: 1.3em;
  margin-top: 14px;
}

/* What you'll get */
.newsletter-get {
  margin-top: clamp(48px, 7vw, 72px);
}

.newsletter-get-label {
  color: var(--brand-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.newsletter-get-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 26px;
  text-align: left;
}

.get-card {
  position: relative;
  padding: clamp(22px, 3vw, 28px);
  border: 1px solid var(--border-dark);
  border-radius: 13px 13px 6px 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.get-card:hover {
  border-color: rgba(0, 215, 122, 0.35);
  background: rgba(0, 215, 122, 0.035);
  transform: translateY(-3px);
}

.get-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 215, 122, 0.3);
  border-radius: 10px 10px 5px 10px;
  background: rgba(0, 215, 122, 0.08);
  color: var(--brand);
}

.get-icon svg { width: 20px; height: 20px; }

.get-card h3 {
  margin-top: 16px;
  color: var(--fog-50);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.get-card p {
  margin-top: 8px;
  color: var(--fog-500);
  font-size: 0.9rem;
  line-height: 1.55;
}

.newsletter-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: clamp(36px, 5vw, 48px);
}

.newsletter-proof span {
  color: var(--fog-600);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.newsletter-proof span::before {
  content: "·";
  margin-right: 10px;
  color: var(--brand);
}

.newsletter-proof span:first-child::before { content: none; }

/* --------------------------------------------------------------------------
   Footer — clean
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-dark);
  background: var(--ink-900);
  padding: clamp(44px, 6vw, 72px) 0 clamp(26px, 3vw, 38px);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.footer-contact h2 {
  color: var(--fog-50);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.footer-contact h2 span { color: var(--brand); }

.footer-email-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.footer-email {
  color: var(--fog-300);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 560;
  border-bottom: 1px solid rgba(0, 215, 122, 0.42);
  padding-bottom: 2px;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

.footer-email:hover {
  color: var(--brand-soft);
  border-color: rgba(0, 215, 122, 0.6);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-dark);
  border-radius: 8px 8px 4px 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--fog-400);
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(0, 215, 122, 0.42);
  background: rgba(0, 215, 122, 0.08);
  color: var(--fog-50);
}

.icon-button svg { width: 15px; height: 15px; }

.footer-meta {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.footer-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--fog-500);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.footer-bottom {
  margin-top: clamp(34px, 5vw, 54px);
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
  color: var(--fog-600);
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .disciplines-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter-input { grid-template-columns: 1fr auto; }
  .newsletter-get-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-ledger-item { padding-bottom: 0; }
  .hero-ledger-item:nth-child(3) { border-left: 1px solid var(--border-dark); padding-left: 22px; }
}

@media (min-width: 960px) {
  .disciplines-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .brand-era { display: none; }
  .brand-copy small { display: none; }
  .login-key span { display: none; }
  .login-key { padding: 0 12px; }
}

/* ==========================================================================
   Admin panel, login, and result pages
   (admin/results pages load tokens + base + this file)
   ========================================================================== */

.admin-page {
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(32px, 5vh, 56px)) 0 clamp(40px, 6vh, 72px);
  background:
    radial-gradient(circle at 85% 8%, rgba(0, 215, 122, 0.05), transparent 26%),
    var(--ink-950);
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.admin-head h1 {
  color: var(--fog-50);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 680;
  letter-spacing: -0.05em;
}

.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.stat-card {
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--border-dark);
  border-radius: 11px 11px 5px 11px;
  background: rgba(255, 255, 255, 0.02);
}

.stat-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--fog-600);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--fog-50);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-card[data-tone="brand"] strong { color: var(--brand); }
.stat-card[data-tone="warning"] strong { color: var(--warning); }
.stat-card[data-tone="danger"] strong { color: var(--danger); }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-toolbar .input { max-width: 320px; }

.subscriber-table-wrap {
  border: 1px solid var(--border-dark);
  border-radius: 13px 13px 6px 13px;
  background: rgba(255, 255, 255, 0.015);
  overflow-x: auto;
}

.subscriber-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }

.subscriber-table th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-dark-strong);
  color: var(--fog-500);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.subscriber-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-dark);
  color: var(--fog-200);
  vertical-align: middle;
}

.subscriber-table tr:last-child td { border-bottom: 0; }
.subscriber-table tr:hover td { background: rgba(0, 215, 122, 0.02); }
.subscriber-table .email-cell { color: var(--fog-100); font-weight: 600; }
.subscriber-table .date-cell { color: var(--fog-500); font-family: var(--font-mono); font-size: 0.74rem; white-space: nowrap; }

.row-actions { display: flex; gap: 6px; }
.row-actions .button-sm { min-height: 30px; padding-inline: 10px; font-size: 0.68rem; }

.admin-empty { padding: clamp(40px, 6vw, 72px) 20px; text-align: center; color: var(--fog-500); }
.admin-empty strong { display: block; margin-bottom: 8px; color: var(--fog-200); font-size: 1.05rem; }

/* Login */
.login-shell {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 215, 122, 0.06), transparent 34%),
    var(--ink-950);
}

.login-card { width: min(100%, 400px); padding: clamp(28px, 4vw, 40px); }

.login-card h1 {
  color: var(--fog-50);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.login-card .login-sub { color: var(--fog-500); font-size: 0.84rem; margin-bottom: 28px; }
.login-form { display: grid; gap: 16px; }

.login-error {
  padding: 11px 14px;
  border: 1px solid rgba(255, 111, 125, 0.35);
  border-radius: var(--radius-2);
  background: rgba(255, 111, 125, 0.07);
  color: #ffb4bc;
  font-size: 0.8rem;
}

/* Confirmation / result pages */
.result-shell {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 215, 122, 0.07), transparent 36%),
    var(--ink-950);
}

.result-card { width: min(100%, 520px); padding: clamp(32px, 5vw, 52px); text-align: center; }

.result-card .result-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 215, 122, 0.4);
  border-radius: 50%;
  color: var(--brand);
}

.result-card .result-icon svg { width: 24px; height: 24px; }

.result-card h1 {
  color: var(--fog-50);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.result-card p { color: var(--fog-400); font-size: 0.94rem; line-height: 1.6; margin-bottom: 28px; }

@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
