@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('/fonts/unbounded-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #261713;
  --paper: #fff7ef;
  --acid: #ad634e;
  --acid-soft: #d5a08c;
  --muted: #9c8177;
  --line: rgba(173, 99, 78, 0.24);
  font-family: 'Manrope', sans-serif;
  color: var(--paper);
  background: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.guest-page {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 58%, rgba(232, 255, 63, 0.10), transparent 36%),
    linear-gradient(135deg, #050808, #0b1110 60%, #07100d);
}

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

.guest-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(22px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
}

.guest-header, .guest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark { display: flex; align-items: stretch; gap: 10px; }
.brand-index {
  color: var(--acid);
  font: 700 10px/1 'Unbounded', sans-serif;
  padding-top: 3px;
}
.brand-name {
  font: 700 12px/.86 'Unbounded', sans-serif;
  letter-spacing: -.06em;
}

.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.connection-dot {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.connection.online .connection-dot { background: var(--acid); border-color: var(--acid); box-shadow: 0 0 13px var(--acid); }
.connection.online { color: var(--paper); }

.launch-stage {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 8px;
}

.eyebrow {
  color: var(--acid);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .17em;
  margin-bottom: 16px;
}

.launch-stage h1 {
  margin: 0;
  max-width: 680px;
  font: 700 clamp(34px, 10vw, 76px)/.96 'Unbounded', sans-serif;
  letter-spacing: -.07em;
  text-transform: uppercase;
}

.instruction {
  max-width: 330px;
  margin: 17px auto 24px;
  color: #a7afa9;
  font-size: 13px;
  line-height: 1.5;
}

.button-field {
  position: relative;
  width: min(58vw, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.button-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .5s ease, transform .5s ease;
}
.ring-two { inset: 12%; border-style: dashed; animation: rotate 24s linear infinite; }

.launch-button {
  position: relative;
  z-index: 2;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 242, 233, .2);
  border-radius: 50%;
  color: rgba(243, 242, 233, .38);
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 35px rgba(255, 255, 255, .025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, color .45s ease, background .45s ease, box-shadow .45s ease;
}
.button-status { font-size: 8px; font-weight: 700; letter-spacing: .18em; margin-bottom: 6px; }
.button-label { font: 700 clamp(22px, 7vw, 38px)/1 'Unbounded', sans-serif; letter-spacing: -.07em; }
.button-arrow { position: absolute; right: 21%; top: 19%; font-size: 16px; opacity: .6; }
.launch-button:disabled { cursor: not-allowed; }

.button-field.armed .button-ring { border-color: rgba(232, 255, 63, .55); }
.button-field.armed .ring-one { animation: pulseRing 1.8s ease-out infinite; }
.button-field.armed .launch-button {
  cursor: pointer;
  color: var(--ink);
  border-color: var(--acid);
  background: var(--acid);
  box-shadow: 0 0 45px rgba(232, 255, 63, .23), 0 15px 70px rgba(0, 0, 0, .45);
  animation: breathe 1.4s ease-in-out infinite;
}
.button-field.armed .launch-button:active { transform: scale(.93); }

.guest-page.launched .launch-button { transform: scale(9); animation: none; }
.guest-page.launched .flash { opacity: 1; }

.guest-footer {
  color: #79817c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
}
.footer-rule { height: 1px; flex: 1; background: rgba(255, 255, 255, .13); }

.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orbit { position: absolute; border: 1px solid rgba(232, 255, 63, .05); border-radius: 50%; }
.orbit-a { width: 76vw; height: 76vw; left: -55vw; top: 22%; }
.orbit-b { width: 48vw; height: 48vw; right: -35vw; bottom: 13%; }
.scan-line { position: absolute; left: 0; right: 0; height: 1px; top: -10%; background: linear-gradient(90deg, transparent, rgba(232, 255, 63, .16), transparent); animation: scan 8s linear infinite; }
.flash { position: fixed; z-index: 10; inset: 0; pointer-events: none; background: var(--acid); opacity: 0; transition: opacity .7s ease; }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulseRing { 0% { transform: scale(.82); opacity: 1; } 80%, 100% { transform: scale(1.12); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.035); } }
@keyframes scan { to { top: 110%; } }

/* Control surface */
.control-page {
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(190, 119, 91, .34), transparent 31%),
    linear-gradient(145deg, #f4e7de, #dfc5b8 62%, #cda896);
}
.control-shell { width: min(820px, 100%); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)); }
.control-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.control-kicker, .status-caption { font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.control-header h1 { margin: 7px 0 0; font: 700 clamp(29px, 5vw, 48px)/.94 'Unbounded', sans-serif; letter-spacing: -.065em; text-transform: uppercase; }
.guest-link { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 700; text-underline-offset: 5px; white-space: nowrap; }
.guest-link-icon { flex: none; font-family: 'Manrope', sans-serif; }
.status-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; }
.status-card, .control-card, .access-card { position: relative; border: 1px solid rgba(83, 43, 34, .21); padding: 19px; background: rgba(255, 247, 239, .48); backdrop-filter: blur(12px); }
.primary-status { background: var(--ink); color: var(--paper); }
.card-number { position: absolute; right: 14px; top: 12px; color: #737971; font-size: 9px; font-weight: 700; }
.status-card strong { display: block; margin-top: 25px; font: 700 clamp(23px, 4.3vw, 37px)/1 'Unbounded', sans-serif; letter-spacing: -.06em; }
.status-card strong small { font: 400 13px/1 'Manrope', sans-serif; letter-spacing: 0; }
.status-card p, .section-heading p, .access-card p { margin: 9px 0 0; color: #666d67; font-size: 12px; }
.primary-status p { color: #969e98; }
.control-card { margin-top: 10px; }
.section-heading { position: relative; display: flex; gap: 18px; padding-right: 30px; }
.section-heading .card-number { position: static; padding-top: 4px; }
.section-heading h2, .access-card h2 { margin: 0; font: 700 18px/1.15 'Unbounded', sans-serif; letter-spacing: -.045em; text-transform: uppercase; }
.target-form { margin-top: 23px; }
.target-form label { display: block; margin-bottom: 7px; color: #5d645e; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.input-row { display: flex; gap: 8px; }
.input-row input { min-width: 0; flex: 1; border: 1px solid rgba(7, 11, 11, .25); border-radius: 0; padding: 14px; color: var(--ink); background: #f8f8f2; outline: none; }
.input-row input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.secondary-button, .reset-button { border: 1px solid var(--ink); padding: 0 20px; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.media-ready { margin-top: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-top: 1px solid rgba(7, 11, 11, .16); padding-top: 17px; }
.media-ready > span { width: 9px; height: 9px; border-radius: 50%; background: #8ca500; box-shadow: 0 0 0 4px rgba(140, 165, 0, .14); }
.media-ready strong { font-size: 11px; letter-spacing: .08em; }
.media-ready small { color: #666d67; font-size: 11px; }
.action-card { color: var(--paper); background: linear-gradient(135deg, #b96f57, #8f4d3d); border-color: rgba(73, 34, 26, .35); }
.action-card .section-heading p { color: rgba(255, 247, 239, .72); }
.action-card .card-number { color: rgba(255, 247, 239, .62); }
.arm-button { width: 100%; margin-top: 18px; border: 0; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; color: var(--paper); background: var(--ink); cursor: pointer; font: 700 clamp(16px, 3.6vw, 24px)/1 'Unbounded', sans-serif; letter-spacing: -.05em; }
.arm-button:disabled { cursor: not-allowed; opacity: .42; }
.arm-icon { font-size: 28px; }
.reset-button { width: 100%; min-height: 42px; margin-top: 7px; color: var(--paper); border-color: rgba(255, 247, 239, .62); }
.access-card { display: flex; gap: 22px; padding: 36px 24px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 12px 18px; color: var(--paper); background: var(--ink); font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.control-page.is-armed .primary-status { color: var(--paper); background: linear-gradient(135deg, #b96f57, #8f4d3d); }
.control-page.is-armed .primary-status p { color: rgba(255, 247, 239, .72); }

@media (min-width: 720px) {
  .guest-shell { padding-left: 40px; padding-right: 40px; }
  .button-field { width: 235px; }
}

@media (max-width: 620px) {
  .control-header { align-items: flex-end; gap: 12px; }
  .guest-link { font-size: 9px; line-height: 1.2; }
  .status-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); gap: 8px; }
  .input-row { display: grid; }
  .secondary-button { min-height: 48px; }
  .status-card, .control-card { padding: 15px; }
  .status-card strong { margin-top: 22px; font-size: clamp(18px, 5.3vw, 25px); }
  .status-card strong small { display: block; margin-top: 4px; font-size: 10px; }
  .status-card p { font-size: 10px; line-height: 1.35; }
  .status-caption { font-size: 8px; letter-spacing: .12em; }
  .section-heading h2 { font-size: 16px; }
  .control-shell { padding-left: 12px; padding-right: 12px; }
}

@media (max-height: 690px) {
  .launch-stage { padding-top: 10px; }
  .launch-stage h1 { font-size: 30px; }
  .instruction { margin: 10px auto 12px; }
  .button-field { width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
