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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #060812;
  color: #e2e8f0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding:
    max(1.5rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  text-align: center;
  isolation: isolate;
  overflow-x: hidden;
}

.landing__stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  overflow: visible;
}

.landing__footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding-top: 1.5rem;
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.landing__footer-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.landing__footer-logo {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.landing__footer-text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
}

.landing__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #060812;
  pointer-events: none;
}

.landing__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/background.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 0.2;
}

.landing__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 18, 0.2);
}

.landing__glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 55% 40% at 50% 30%,
    rgba(99, 102, 241, 0.28) 0%,
    transparent 68%
  );
  opacity: 0;
  animation: glow-in 1.4s ease forwards;
  pointer-events: none;
}

.landing__hero {
  position: relative;
  width: 100%;
  max-width: 40rem;
  padding-inline: clamp(1rem, 5vw, 2rem);
  box-sizing: border-box;
  overflow: visible;
}

.landing__eyebrow {
  margin: 0.4rem 0 1rem;
  font-size: calc(1.15rem + 10pt);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.landing__title {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.landing__title--brand {
  display: block;
  width: fit-content;
  max-width: calc(100% - 0.5em);
  margin: 0 auto 0.25rem;
  padding-inline: 0.2em;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: visible;
  background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 45%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.landing__tagline {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #c4ced9;
}

.landing__pad[hidden] {
  display: none !important;
}

.landing__pad {
  --pad-body-min: 17rem;
  width: 100%;
  max-width: 28rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(129, 140, 248, 0.35);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  min-height: calc(var(--pad-body-min) + 10.25rem);
  box-sizing: border-box;
}

.landing__reveal-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  flex-shrink: 0;
}

.landing__btn--reveal {
  width: 100%;
}

.landing__reveal-limit {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #fca5a5;
}

.landing__pad-body {
  flex: 1 1 auto;
  min-height: var(--pad-body-min);
  display: flex;
  flex-direction: column;
}

.landing__pad-result {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.landing__pad-result[hidden] {
  display: none !important;
}

.landing__email-section {
  width: 100%;
  padding-top: 1.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(71, 85, 105, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.landing__email-toggle {
  margin: 0;
  padding: 0.75rem 0.5rem;
  min-height: 3rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.landing__email-toggle:hover {
  color: #c7d2fe;
}

.landing__email-toggle.is-open {
  color: #e2e8f0;
  text-decoration: none;
}

.landing__email-panel {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  overflow: hidden;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing__email-panel.is-expanded {
  grid-template-rows: 1fr;
}

.landing__email-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
}

.landing__email-panel.is-expanded .landing__email-panel-inner {
  opacity: 1;
}

.landing__email-panel input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.landing__email-panel input:focus {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-color: #818cf8;
}

.landing__btn--send {
  margin-top: 0.35rem;
}

.landing__btn--send:hover:not(:disabled) {
  transform: translateY(-1px);
}

.landing__email-feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0 0;
}

.landing__check {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.landing__check.is-visible {
  opacity: 1;
  transform: scale(1);
}

.landing__check-circle {
  stroke: #22c55e;
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.landing__check.is-visible .landing__check-circle {
  animation: check-circle 0.5s ease forwards;
}

.landing__check-path {
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.landing__check.is-visible .landing__check-path {
  animation: check-stroke 0.35s 0.35s ease forwards;
}

.landing__sent-msg {
  margin: 0;
  flex: 1;
  min-width: 10rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #86efac;
}

@keyframes check-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-stroke {
  to {
    stroke-dashoffset: 0;
  }
}

.landing__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #eef2ff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.landing__btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(129, 140, 248, 0.45);
}

.landing__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.landing__btn--secondary {
  background: transparent;
  color: #a5b4fc;
  border: 1px solid #475569;
  box-shadow: none;
}

.landing__btn--secondary:hover:not(:disabled) {
  border-color: #818cf8;
  color: #c7d2fe;
  transform: none;
  box-shadow: none;
}

.landing__btn--secondary.is-active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
}

.landing__email-section[hidden],
.landing__email-panel[hidden] {
  display: none !important;
}

.landing__split-ratio {
  display: block;
  width: 100%;
  margin: 0;
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.4;
}

.landing__split-ulo {
  color: #4ade80;
}

.landing__split-sep {
  color: #94a3b8;
  font-weight: 500;
}

.landing__split-uno {
  color: #f87171;
}

.landing__codes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing__code-item {
  display: flex;
  flex-direction: column;
}

.landing__code-item--latest .landing__code {
  background: rgba(99, 102, 241, 0.1);
}

.landing__code-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a5b4fc;
}

.landing__code {
  margin: 0 0 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(1rem, 4.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f8fafc;
  word-break: break-all;
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  margin-left: 0;
  margin-right: 0;
  border-radius: 8px;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.landing__code:hover {
  background: rgba(99, 102, 241, 0.12);
}

.landing__code-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.landing__copy-control {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.35rem 0.15rem;
  border: none;
  background: none;
  font: inherit;
  color: #a5b4fc;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.landing__copy-control:hover {
  color: #c7d2fe;
}

.landing__copy-control:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-radius: 4px;
}

.landing__copy-text {
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.landing__copy-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.landing__copy-icon {
  display: block;
}

.landing__copy-icon--check {
  display: none;
  color: #4ade80;
}

.landing__copy-control.is-copied .landing__copy-icon--clipboard {
  display: none;
}

.landing__copy-control.is-copied .landing__copy-icon--check {
  display: block;
}

.landing__store {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.1rem 0 0;
  width: 100%;
  max-width: 28rem;
  text-align: center;
}

.landing__store-heading {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #a5b4fc;
  line-height: 1.4;
}

.landing__store-badges {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.landing__store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #a5b4fc;
  text-decoration: none;
  background: #0b1120;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.65);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.landing__store-badge:hover {
  color: #c7d2fe;
  background: #111827;
  border-color: #334155;
}

.landing__store-badge:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.landing__store-icon {
  flex-shrink: 0;
  display: block;
  width: 2.25rem;
  height: 2.25rem;
}

#send-email-btn {
  box-sizing: border-box;
  width: 11.5rem;
  max-width: 100%;
}

.landing__status {
  margin-top: 1.25rem;
  width: 100%;
  font-size: 0.9rem;
  color: #fca5a5;
  max-width: 28rem;
}

.landing__status--success {
  color: #86efac;
}

/* Intro: UNETWORK at center, travels up to final slot; layout stays top-aligned throughout */
.landing.landing--intro,
.landing.landing--intro .landing__stack,
.landing.landing--settled,
.landing.landing--settled .landing__stack {
  justify-content: flex-start;
}

.landing.landing--intro .anim-intro-content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.landing.landing--intro .landing__hero {
  position: relative;
}

.landing.landing--intro .landing__hero .anim-intro-content {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}

.landing.landing--settled .landing__hero .anim-intro-content {
  position: static;
  max-height: none;
  overflow: visible;
}

.anim-brand-float {
  opacity: 1;
  will-change: transform;
  animation: brand-float-top 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes brand-float-top {
  from {
    transform: translateY(calc(50dvh - 11rem));
  }

  to {
    transform: translateY(0);
  }
}

.anim-fade-in {
  opacity: 0;
  animation: fade-in-opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade-in-opacity {
  to {
    opacity: 1;
  }
}

@keyframes glow-in {
  to {
    opacity: 1;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Phones & narrow viewports */
@media (max-width: 600px) {
  .landing.landing--intro,
  .landing.landing--settled {
    justify-content: flex-start;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .landing__stack {
    max-width: 100%;
  }

  .landing__hero {
    padding-inline: 0.25rem;
  }

  .landing__title--brand {
    font-size: clamp(2.5rem, 14vw, 3.75rem);
    letter-spacing: 0.04em;
    max-width: 100%;
  }

  .landing__tagline {
    font-size: 1rem;
    padding-inline: 0.25rem;
  }

  .landing__pad {
    --pad-body-min: 17rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1rem;
    gap: 0.75rem;
    min-height: calc(var(--pad-body-min) + 10rem);
    max-width: 100%;
    border-radius: 14px;
  }

  .landing__pad-body {
    min-height: var(--pad-body-min);
    flex: 1 1 auto;
  }

  .landing__split-ratio {
    margin: 0;
  }

  .landing__btn--reveal {
    width: 100%;
    max-width: 100%;
  }

  #send-email-btn {
    width: 11.5rem;
    max-width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
  }

  .landing__code-label {
    margin-bottom: 0.45rem;
  }

  .landing__code {
    padding: 0.55rem 0.2rem;
    margin-bottom: 0.65rem;
  }

  .landing__code-actions {
    margin-bottom: 0.75rem;
  }

  .landing__email-section {
    padding-top: 0.85rem;
    margin-top: 0.15rem;
    gap: 0.5rem;
  }

  .landing__email-toggle {
    padding: 0.65rem 0.35rem;
  }

  .landing__email-panel {
    gap: 0.5rem;
  }

  .landing__email-panel input {
    padding: 0.85rem 0.9rem;
  }

  .landing__sent-msg {
    min-width: 0;
  }

  .landing__store {
    margin-top: 1rem;
    max-width: 100%;
  }

  .landing__store-badges {
    gap: 1.75rem;
  }

  .landing__store-badge {
    width: 5rem;
    height: 5rem;
  }

  .landing__store-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .landing__email-feedback {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0.35rem;
  }

  .landing__status {
    font-size: 0.875rem;
    padding-inline: 0.25rem;
  }

  .landing__footer {
    padding-top: 1.25rem;
  }

  .landing__footer-logo {
    width: 1.25rem;
    height: 1.25rem;
  }

  .landing__footer-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 900px), ((hover: none) and (pointer: coarse)) {
  .landing__btn--reveal {
    width: 100%;
    max-width: 100%;
  }

  #send-email-btn {
    width: 11.5rem;
    max-width: 100%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .landing__btn:hover:not(:disabled),
  .landing__btn--send:hover:not(:disabled) {
    transform: none;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
  }

  .landing__btn:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  }

  .landing__code:active {
    background: rgba(99, 102, 241, 0.18);
  }

  .landing__email-toggle:active {
    color: #c7d2fe;
  }

  .landing__copy-control:active {
    color: #c7d2fe;
  }

  .landing__store-badge:active {
    background: #1e293b;
    border-color: #475569;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-brand-float,
  .anim-fade-in,
  .landing__bg::before,
  .landing__glow,
  .landing__pad,
  .landing__email-panel,
  .landing__email-panel-inner {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .landing__email-panel.is-expanded {
    grid-template-rows: 1fr;
  }

  .landing.landing--intro .anim-intro-content {
    visibility: visible;
    pointer-events: auto;
    max-height: none;
  }
}
