:root {
  color-scheme: dark;
  --navy-950: #041021;
  --navy-900: #061326;
  --navy-820: #0b1d35;
  --navy-760: #102943;
  --gold: #d3a84f;
  --gold-soft: #f0cc78;
  --text: #f7f8fb;
  --muted: #aeb9c9;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(13, 31, 55, 0.74);
  --panel-strong: rgba(18, 42, 72, 0.9);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(241, 200, 106, 0.12), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(65, 145, 255, 0.13), transparent 30%),
    linear-gradient(145deg, #020812 0%, #061326 54%, #03101f 100%);
  color: var(--text);
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(430px, 100%);
  min-height: min(820px, calc(100vh - 36px));
  min-height: min(820px, calc(100dvh - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(8, 24, 45, 0.96), rgba(3, 12, 24, 0.98)),
    var(--navy-900);
  box-shadow: var(--shadow);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.055), transparent 26%);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px;
  padding: max(22px, env(safe-area-inset-top)) 26px max(46px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition: opacity 260ms ease, transform 260ms ease, visibility 260ms ease;
}

.site-credit {
  position: absolute;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  transform: translateX(-50%);
  color: rgba(174, 185, 201, 0.58);
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
}

.site-credit:hover {
  color: rgba(211, 168, 79, 0.82);
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.topbar,
.screen-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.topbar {
  justify-content: flex-start;
  gap: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 25px;
  height: 25px;
}

.brand-mark span {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1.6px solid var(--gold);
  border-radius: 50%;
}

.brand-mark span:nth-child(1) {
  left: 1px;
  top: 8px;
}

.brand-mark span:nth-child(2) {
  left: 8px;
  top: 2px;
}

.brand-mark span:nth-child(3) {
  right: 1px;
  top: 9px;
}

.brand-mark.compact {
  width: 28px;
  height: 28px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  max-width: 340px;
  margin-bottom: 20px;
  font-size: clamp(48px, 14vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span,
h2 span {
  color: var(--gold);
}

h2 {
  margin-bottom: 14px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.25;
}

.lead,
.intro-block p,
.detail-copy,
.final-content p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.hero-content,
.final-content,
.principle-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  padding-top: 34px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.primary-button {
  padding: 0 20px;
  background: var(--gold);
  color: var(--navy-950);
  font-weight: 600;
  box-shadow: none;
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  min-height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.text-button {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: var(--muted);
}

.portal-scene {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 330px;
  height: 330px;
  transform: translateX(-50%);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(241, 200, 106, 0.24);
  border-radius: 50%;
  opacity: 0.72;
}

.orbit-one {
  inset: 20px;
}

.orbit-two {
  inset: 58px;
  border-color: rgba(93, 170, 255, 0.23);
  opacity: 0.56;
}

.door-glow {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: 90px;
  height: 150px;
  border-radius: 60px 60px 10px 10px;
  background: radial-gradient(circle at 50% 42%, rgba(255, 230, 150, 0.72), rgba(211, 168, 79, 0.18) 58%, transparent 74%);
  filter: blur(13px);
  transform: translateX(-50%);
}

.door {
  position: absolute;
  left: 50%;
  bottom: 78px;
  width: 66px;
  height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 42px 42px 8px 8px;
  background: linear-gradient(180deg, #f6dda0, #d8a948);
  box-shadow: 0 0 42px rgba(211, 168, 79, 0.4);
  transform: translateX(-50%);
}

.steps {
  position: absolute;
  left: 50%;
  bottom: 56px;
  width: 190px;
  height: 48px;
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 14px);
  transform: translateX(-50%) perspective(180px) rotateX(52deg);
}

.person {
  position: absolute;
  left: 50%;
  bottom: 92px;
  width: 8px;
  height: 31px;
  border-radius: 8px;
  background: #07111f;
  transform: translateX(-50%);
}

.person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #07111f;
  transform: translateX(-50%);
}

.intro-block {
  position: relative;
  z-index: 2;
}

.card-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.application-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 122px;
  padding: 15px 15px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.048);
  color: var(--text);
  text-align: left;
}

.application-card strong {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 136px;
  margin-top: 44px;
  font-size: 13px;
  line-height: 1.14;
}

.app-number {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.card-stars {
  position: absolute;
  top: 21px;
  right: 15px;
  display: flex;
  gap: 3px;
  color: var(--gold);
  opacity: 0.76;
}

.card-stars i {
  display: block;
  box-sizing: border-box;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px rgba(211, 168, 79, 0.26);
}

.business-heading {
  grid-column: 1 / -1;
  margin: 12px 0 2px;
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.business-heading span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.business-heading strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.business-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.detail-icon {
  display: block;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: var(--gold);
  line-height: 1.18;
}

.detail-icon-small {
  margin-top: 4px;
  margin-bottom: 16px;
}

.detail-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.small-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.detail-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
}

.example-visual {
  min-height: 130px;
  margin: 10px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 38%, rgba(241, 200, 106, 0.36), transparent 16%),
    radial-gradient(circle at 62% 42%, rgba(66, 157, 255, 0.28), transparent 24%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.content-box {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.content-box p {
  margin-bottom: 0;
  color: #d8dee8;
  font-size: 14px;
  line-height: 1.48;
}

.prompt-box {
  background: rgba(255, 255, 255, 0.085);
}

.detail-card .primary-button.full {
  flex: 0 0 auto;
  margin-bottom: 18px;
}

.detail-controls {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-dots {
  display: flex;
  gap: 6px;
}

.progress-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.progress-dots span.is-active {
  background: var(--gold);
}

.principle-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.principle-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.principle-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.principle-list strong {
  color: #fff;
}

.principle-list span {
  color: var(--muted);
}

.quiet-quote {
  margin: 8px 0 24px;
  padding: 18px;
  border: 1px solid rgba(241, 200, 106, 0.35);
  border-radius: 18px;
  color: var(--gold);
  background: rgba(241, 200, 106, 0.08);
  font-weight: 700;
}

.final-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: #e8ecf4;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 900;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (max-width: 390px) {
  body {
    padding: 10px;
  }

  .app-shell {
    min-height: calc(100vh - 20px);
    min-height: calc(100dvh - 20px);
    border-radius: 28px;
  }

  .screen {
    padding: 20px;
  }

  .card-grid {
    gap: 8px;
  }

  .application-card {
    min-height: 106px;
    padding: 11px;
  }
}

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