@font-face {
  font-family: Inter;
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #102330;
  --gold: #edbb55;
  --white: #f9fafb;
  --muted: #bdc9ce;
  font-family: Inter, system-ui, sans-serif;
  color: var(--white);
  background: var(--navy);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 5px; }
button, a, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
[hidden] { display: none !important; }

.home {
  min-height: 600px;
  height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) clamp(104px, 17vh, 170px);
}
.home-scene { position: relative; min-height: 0; isolation: isolate; }
.home-photo { position: absolute; inset: 0; z-index: -1; }
.home-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.login-link {
  position: absolute; top: max(28px, env(safe-area-inset-top)); right: max(3.7vw, env(safe-area-inset-right));
  min-height: 44px; display: flex; align-items: center;
  font-size: clamp(16px, 1.5vw, 21px); font-weight: 500; text-decoration: none;
}
.login-link:hover { text-decoration: underline; }
.home-heading { position: absolute; top: 12.8%; width: 100%; text-align: center; padding: 0 24px; }
.home-heading h1 {
  margin: 0; font-size: clamp(76px, 7.5vw, 124px); line-height: 1.04;
  font-weight: 800; letter-spacing: -.025em;
}
.home-heading p { margin: 5px 0 0; font-size: clamp(22px, 2.2vw, 36px); line-height: 1.3; letter-spacing: -.015em; font-weight: 500; }
.home-action { position: absolute; right: 8.4%; bottom: 8.5%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.observe-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: clamp(60px, 4.75vw, 82px); padding: 11px 23px;
  background: var(--gold); color: #101e27; border: 1px solid transparent; border-radius: 13px;
  font-size: clamp(18px, 1.65vw, 27px); font-weight: 600; line-height: 1.3; letter-spacing: -.015em;
  text-decoration: none; transition: background-color 160ms ease, transform 160ms ease;
}
.observe-button:hover { background: #f6cd7a; transform: translateY(-2px); }
.observe-button:active { transform: translateY(0); }
.observe-button:focus-visible { outline-color: var(--white); }
.icon { display: inline-block; flex: 0 0 auto; width: 28px; height: 28px; background: currentColor; mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat; }
.icon-camera { --icon: url('/assets/icons/camera.svg'); }
.icon-book { --icon: url('/assets/icons/book.svg'); }
.icon-play { --icon: url('/assets/icons/play-circle.svg'); }
.icon-arrow { --icon: url('/assets/icons/arrow-right.svg'); }
.icon-close { --icon: url('/assets/icons/x.svg'); }
.observe-button .icon-camera { width: clamp(30px, 2.8vw, 46px); height: clamp(30px, 2.8vw, 46px); }
.observe-button .icon-arrow { margin-left: 8px; width: 30px; height: 30px; }
.home-nav {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  padding: 24px max(5.4vw, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom));
  background: var(--navy);
}
.home-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 72px; height: 100%; padding: 2px 12px;
  color: var(--white); background: transparent; border: 0; text-decoration: none;
  font-size: clamp(16px, 1.75vw, 27px); line-height: 1.25; font-weight: 600; letter-spacing: -.025em;
  transition: color 160ms ease;
}
.home-nav-item + .home-nav-item { border-left: 1px solid #ffffff29; }
.home-nav-item > .icon { width: clamp(32px, 3.5vw, 54px); height: clamp(32px, 3.5vw, 54px); }
.home-nav-primary > .icon, .home-nav-item:hover { color: var(--gold); }

.home-dialog {
  width: min(640px, calc(100% - 40px)); max-height: calc(100svh - 64px);
  padding: 0; margin: auto; background: #152c3a; color: var(--white);
  border: 1px solid #ffffff29; border-radius: 20px; box-shadow: 0 24px 90px #0005;
  overflow: auto; overscroll-behavior: contain;
}
.home-dialog::backdrop { background: #06131fbc; backdrop-filter: blur(8px); }
.dialog-heading { position: sticky; top: 0; z-index: 1; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 25px 30px 20px; background: #152c3a; border-bottom: 1px solid #ffffff1f; }
.dialog-heading h2 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.025em; }
.close-button { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; padding: 10px; color: var(--white); background: #ffffff0c; border: 0; border-radius: 50%; }
.close-button:hover { background: #ffffff1c; }
.dialog-body { padding: 12px 30px 30px; font-size: 16px; line-height: 1.6; }
.dialog-body p { color: var(--muted); }
.intro { margin: 12px 0 26px; font-size: 18px; }
.how-steps { display: grid; gap: 22px; padding-left: 24px; margin: 0 0 26px; }
.how-steps li { padding-left: 10px; }
.how-steps li::marker { color: var(--gold); }
.how-steps strong, .how-steps span { display: block; }
.how-steps span { margin-top: 4px; color: var(--muted); }
.dialog-body .observation-note { padding: 16px 0 16px 18px; border-left: 2px solid var(--gold); font-size: 14px; }
.trial-summary { padding: 15px 0 28px; }
.trial-summary h3 { font-size: 22px; line-height: 1.3; margin-bottom: 8px; font-weight: 600; letter-spacing: -.025em; }
.trial-summary p { margin: 0 0 20px; }
.dialog-cta { width: 100%; min-height: 54px; font-size: 16px; border-radius: 10px; padding: 12px 20px; }
.home-details { border-top: 1px solid #ffffff24; }
.home-details summary { cursor: pointer; padding: 18px 0; font-weight: 500; }
.home-details p { margin: 0 0 14px; }
.home-details a { display: inline-block; margin-bottom: 20px; color: var(--gold); }
.home-utilities { display: flex; gap: 28px; flex-wrap: wrap; border-top: 1px solid #ffffff24; padding: 18px 0; }
.text-button { min-height: 44px; padding: 8px 0; background: transparent; color: var(--white); border: 0; text-decoration: underline; text-underline-offset: 5px; font-size: 15px; }
.home-footer { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid #ffffff24; color: var(--muted); font-size: 13px; }
.home-footer div { display: flex; gap: 24px; flex-wrap: wrap; }
.home-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.install-steps { padding-left: 22px; margin: 24px 0; }
.install-steps li { padding-left: 8px; margin: 14px 0; }
.install-qr { display: flex; align-items: center; gap: 22px; margin: 24px 0; }
.install-qr img { border-radius: 8px; }
.home-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); margin: 0; padding: 12px 22px; background: var(--white); color: var(--navy); border-radius: 10px; z-index: 10; }
.noscript-note { padding: 20px; text-align: center; }

@media (max-width: 900px) and (orientation: portrait) {
  .home-action { right: 6%; }
  .home-heading { top: 10%; }
  .home-photo img { object-position: 42% center; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .home { min-height: 520px; grid-template-rows: minmax(0, 1fr) calc(92px + env(safe-area-inset-bottom)); }
  .home-photo img { object-position: 50% 50%; }
  .login-link { top: max(12px, env(safe-area-inset-top)); right: max(22px, env(safe-area-inset-right)); font-size: 15px; }
  .home-heading { top: max(80px, 11%); padding: 0 18px; }
  .home-heading h1 { font-size: clamp(62px, 18vw, 88px); letter-spacing: -.055em; line-height: 1.05; }
  .home-heading p { margin-top: 9px; font-size: clamp(18px, 5vw, 23px); letter-spacing: -.035em; }
  .home-action { left: 24px; right: 24px; bottom: 12px; gap: 2px; }
  .observe-button { width: 100%; min-height: 56px; padding: 12px 16px; gap: 12px; font-size: 17px; border-radius: 11px; }
  .observe-button .icon-camera { width: 29px; height: 29px; }
  .observe-button .icon-arrow { width: 25px; height: 25px; margin-left: auto; }
  .home-nav { padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); }
  .home-nav-item { min-height: 64px; gap: 8px; padding: 0 6px; font-size: 13px; letter-spacing: -.03em; white-space: nowrap; }
  .home-nav-item > .icon { width: 29px; height: 29px; }
  .home-dialog { width: calc(100% - 24px); max-height: calc(100svh - 32px); border-radius: 16px; }
  .dialog-heading { padding: 18px 20px; gap: 12px; }
  .dialog-heading h2 { font-size: 21px; }
  .dialog-body { padding: 8px 20px 22px; }
  .intro { font-size: 16px; }
  .install-qr { flex-direction: column; text-align: center; gap: 8px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  .home { min-height: 320px; grid-template-rows: minmax(0, 1fr) 80px; }
  .home-heading { top: 9%; }
  .home-heading h1 { font-size: 56px; }
  .home-heading p { font-size: 18px; margin-top: 6px; }
  .login-link { top: 10px; right: max(24px, env(safe-area-inset-right)); padding: 0 10px; background: #102330bf; border-radius: 6px; }
  .home-action { right: 4%; bottom: 4%; gap: 0; }
  .observe-button { min-height: 46px; font-size: 15px; padding: 8px 14px; gap: 10px; border-radius: 9px; }
  .observe-button .icon { width: 24px; height: 24px; }
  .home-nav { padding: 8px max(30px, env(safe-area-inset-right)) 8px; }
  .home-nav-item { min-height: 60px; font-size: 14px; gap: 5px; }
  .home-nav-item > .icon { width: 27px; height: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
