/* Ice white / cobalt. Edit these tokens to adjust the whole template. */
:root {
  color-scheme: light;
  --page: #f5f8ff;
  --surface: #ffffff;
  --blue: #2457e8;
  --blue-dark: #1742bf;
  --blue-soft: #eaf0ff;
  --ink: #15284b;
  --muted: #64748e;
  --line: #dce5f4;
  --radius: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #eaf0f9; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: default; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #6289ff; outline-offset: 3px; }
h1:focus, #dialogTitle:focus { outline: none; }
img { display: block; max-width: 100%; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.film { max-width: 440px; margin: auto; background: var(--page); position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; }
.scene { position: relative; min-height: 100vh; min-height: 100svh; padding-top: env(safe-area-inset-top); }
.film-nav { height: 72px; margin: 0 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.nav-left { display: flex; align-items: center; min-width: 0; }
.wordmark { font-size: 10px; letter-spacing: 2.3px; font-weight: 750; color: var(--ink); white-space: nowrap; }
.wordmark:before { content: "N"; display: inline-block; width: 26px; line-height: 28px; margin-right: 9px; border-radius: 8px; background: var(--blue); color: white; text-align: center; letter-spacing: 0; font-size: 17px; font-weight: 600; }
.nav-back { width: 32px; height: 40px; display: grid; place-items: center; color: var(--blue); margin-left: -8px; margin-right: 4px; }
.nav-back svg { width: 18px; }
.locale-select { max-width: 49%; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font-size: 16px; padding: 0 7px; text-overflow: ellipsis; }

/* Portrait and copy occupy separate areas, keeping faces unobstructed. */
.gate-hero { position: relative; }
.gate-hero .visual { position: absolute; top: calc(88px + env(safe-area-inset-top)); left: 18px; right: 18px; height: 354px; overflow: hidden; border-radius: 20px; background: #e3eaf7; }
.visual-photo { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 20%); transform: scale(var(--zoom, 1)); transform-origin: var(--focus, 50% 20%); }
.visual-wash, .visual-edge, .visual-shade, .visual-grain { display: none; }
.gate-face-space { height: 386px; pointer-events: none; }
.gate-hero-copy { padding: 0 24px 6px; overflow-wrap: break-word; word-wrap: break-word; }
.gate-badge { display: inline-flex; align-items: center; max-width: 100%; font-size: 10px; font-weight: 650; letter-spacing: .6px; line-height: 1.6; color: var(--blue); }
.gate-badge > span { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; margin-right: 7px; flex: none; }
.gate-hero h1 { font-size: 29px; line-height: 1.27; font-weight: 750; letter-spacing: -.9px; margin: 10px 0 10px; }
.gate-hero-copy > p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }
.gate-content { padding: 18px 18px 26px; }
.gate-thumbnails { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin: 0 0 22px; }
.gate-thumb { position: relative; min-width: 0; height: 78px; padding: 3px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.gate-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); transform: scale(var(--zoom, 1)); transform-origin: var(--focus); border-radius: 9px; pointer-events: none; }
.gate-thumb[aria-pressed="true"] { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.gate-thumb:hover { border-color: var(--blue); }
.gate-card { overflow-wrap: break-word; word-wrap: break-word; }
.gate-intro-card { background: var(--blue-soft); padding: 20px; border-radius: var(--radius); }
.gate-section-label { margin: 0 0 9px; font-size: 10px; line-height: 1.5; letter-spacing: 1px; color: var(--blue); font-weight: 650; }
.gate-intro-card h2 { font-size: 18px; line-height: 1.5; margin: 0 0 7px; letter-spacing: -.3px; }
.gate-intro-card p { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0; }
.gate-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; padding: 24px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.gate-stats > div { display: flex; flex-direction: column; padding: 0 5px; border-right: 1px solid var(--line); }
.gate-stats > div:last-child { border: 0; }
.gate-stats strong { color: var(--blue); font-size: 24px; font-weight: 650; line-height: 1.2; }
.gate-stats span { color: var(--muted); font-size: 10px; margin-top: 7px; line-height: 1.5; }
.gate-benefits { margin: 0 4px 24px; }
.gate-benefits > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gate-benefits > .gate-section-label { margin-bottom: 15px; }
.gate-benefits strong { font-size: 13px; line-height: 1.6; }
.gate-benefits p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 4px 0 0; }
.gate-footer { padding-bottom: env(safe-area-inset-bottom); }
.main-button { width: 100%; min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border: 1px solid var(--blue); border-radius: 14px; background: var(--blue); color: white; font-size: 14px; line-height: 1.5; font-weight: 650; box-shadow: 0 7px 18px #2457e81a; text-align: start; }
.main-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.main-button:disabled { background: #e2e9f6; border-color: #e2e9f6; color: #64748e; box-shadow: none; }
.main-button svg { margin-left: 12px; }

/* Animated Safari instructions. */
.guide { display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.guide > .visual { display: none; }
.guide-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 29px 24px 22px; }
.guide-heading h1 { margin: 0 0 14px; font-size: 33px; line-height: 1.25; font-weight: 700; letter-spacing: -1px; overflow-wrap: break-word; }
.guide-heading h1 em { font-style: normal; color: var(--blue); }
.guide-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.compass { width: 44px; height: 44px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); display: grid; place-items: center; flex: none; margin-left: 12px; }
.compass svg { width: 27px; height: 27px; }
.guide-demo { margin: 0 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: white; }
.guide-demo img { width: 100%; height: auto; }
.guide-demo figcaption { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 10px; color: var(--muted); flex-wrap: wrap; border-top: 1px solid var(--line); }
.guide-demo figcaption > span { margin: 6px 7px 6px 0; }
.guide-demo figcaption > div { display: flex; }
.guide-demo button { background: var(--blue-soft); border-radius: 8px; min-height: 36px; padding: 8px 10px; color: var(--blue); font-size: 10px; margin-left: 5px; }
.animated-steps { list-style: none; counter-reset: guide; padding: 0; margin: 0 25px 20px; }
.animated-steps li { display: flex; align-items: center; flex-wrap: wrap; counter-increment: guide; font-size: 13px; line-height: 1.8; min-height: 46px; }
.animated-steps li:before { content: "0" counter(guide); width: 28px; height: 28px; line-height: 28px; text-align: center; background: var(--blue-soft); color: var(--blue); border-radius: 9px; font-size: 11px; font-weight: 650; margin-right: 11px; }
.animated-steps li span { font-weight: 600; color: var(--blue); margin: 0 4px; }
.guide-note { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0 25px 27px; }
.film-footer { margin-top: auto; padding: 0 22px 20px; }
.copy-status { color: var(--blue); font-size: 12px; line-height: 1.6; padding-top: 12px; }
.copy-status:empty { display: none; }
.copy-fallback { width: 100%; min-height: 44px; margin-top: 12px; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 16px; }

/* Profile preparation. Same ice-white surface as the contact sheet. */
.safari-preparation { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.safari-preparation-top { display: flex; justify-content: space-between; align-items: flex-start; }
.safari-chip { color: var(--blue); font-size: 10px; line-height: 1.6; max-width: 52%; }
.safari-chip > span { font-size: 7px; margin-right: 4px; }
.safari-state-chip { color: var(--muted); padding-left: 8px; text-align: end; }
.safari-preparation h2 { font-size: 20px; line-height: 1.45; margin: 17px 0 8px; letter-spacing: -.4px; }
.safari-preparation-text { font-size: 12px; line-height: 1.8; margin: 0; color: var(--muted); }
.safari-progress { margin: 20px 0 10px; height: 6px; background: #dfe7f7; border-radius: 10px; overflow: hidden; }
.safari-progress-fill { height: 100%; width: 0; background: var(--blue); border-radius: 10px; transition: width .4s ease; }
.safari-timer-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; line-height: 1.5; }
.safari-proof { list-style: none; padding: 0; margin: 20px 0; }
.safari-proof li { display: flex; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.safari-proof li:last-child { border: 0; }
.safari-proof-number { width: 28px; height: 28px; line-height: 28px; text-align: center; flex: none; background: var(--blue-soft); color: var(--blue); border-radius: 9px; font-size: 12px; font-weight: 600; margin-right: 12px; }
.safari-proof h3 { font-size: 13px; line-height: 1.5; margin: 0 0 4px; }
.safari-proof p { font-size: 11px; line-height: 1.7; margin: 0; color: var(--muted); }
.safari-lock { border-left: 3px solid var(--blue); background: var(--blue-soft); padding: 13px 15px; border-radius: 0 12px 12px 0; margin-bottom: 18px; }
.safari-lock strong { color: var(--blue); font-size: 12px; }
.safari-lock p { font-size: 11px; line-height: 1.7; margin: 5px 0 0; color: var(--muted); }
.safari-faq { padding: 24px 5px 0; }
.safari-faq h3 { font-size: 12px; margin: 17px 0 6px; }
.safari-faq p { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0; }

/* Contact sheet: fixed overlay remains outside the clipped page. */
.lead-modal { position: fixed; top: 0; right: 0; bottom: auto; left: 0; width: 100%; height: 100vh; height: 100dvh; display: flex; align-items: flex-end; justify-content: center; z-index: 1000; padding: 24px 0 0; background: #10244480; overflow: hidden; }
.lead-sheet { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0; padding: 10px 24px calc(24px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: var(--page); color: var(--ink); box-shadow: 0 -12px 50px #10244426; animation: sheet-enter .22s ease-out; }
.lead-handle { height: 4px; width: 38px; margin: 0 auto 19px; border-radius: 10px; background: #c8d5eb; }
.lead-top { display: flex; align-items: center; }
.lead-profile-card { display: flex; align-items: center; flex: 1; min-width: 0; padding: 0; background: var(--page); }
.lead-profile-card .modal-picture { width: 48px; height: 56px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; object-position: center 20%; margin-right: 12px; flex: none; }
.lead-profile-card > div { min-width: 0; overflow-wrap: break-word; }
.lead-profile-card strong { font-size: 14px; font-weight: 650; line-height: 1.5; }
.lead-profile-card p { font-size: 11px; color: var(--muted); margin: 3px 0 0; line-height: 1.5; }
.lead-close { width: 40px; height: 40px; min-width: 40px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); display: grid; place-items: center; margin-left: 10px; }
.lead-close svg { width: 18px; height: 18px; }
.lead-back { display: flex; align-items: center; background: none; color: var(--muted); font-size: 11px; min-height: 40px; margin: 17px 0 12px; padding: 5px 0; }
.lead-back svg { width: 15px; height: 15px; margin-right: 6px; }
.lead-kicker { font-size: 11px; font-weight: 600; color: var(--blue); line-height: 1.6; }
.lead-kicker > span { margin-right: 7px; }
.lead-sheet h2 { font-size: 29px; letter-spacing: -.7px; line-height: 1.3; margin: 9px 0 12px; }
.lead-intro { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0 0 25px; }
.lead-form { display: grid; gap: 20px; }
.lead-method { border: 0; padding: 0; margin: 0; min-width: 0; }
.lead-method legend, .lead-form label { display: block; padding: 0; margin-bottom: 9px; font-size: 11px; line-height: 1.5; font-weight: 600; color: #516581; }
.contact-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.contact-switch button { min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.contact-switch button[aria-pressed="true"] { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); }
.contact-switch svg { width: 17px; height: 17px; margin-right: 8px; }
.lead-form input, .lead-form select { width: 100%; min-width: 0; min-height: 52px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-size: 16px; line-height: 1.4; }
.lead-form input::placeholder { color: #8391a8; opacity: 1; font-size: 13px; }
.lead-phone-row { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 9px; }
.lead-phone-row select { padding: 10px 6px; }
.lead-form input[aria-invalid="true"] { border-color: #c1364f; }
.lead-error { color: #b32642; font-size: 11px; line-height: 1.5; margin: 7px 0 0; }
.lead-submit { justify-content: center; position: relative; margin-top: 3px; padding-right: 38px; padding-left: 38px; }
.lead-submit svg { position: absolute; right: 16px; width: 18px; height: 18px; }
.photo-error, .animation-error { color: #b32642; padding: 10px 24px; font-size: 12px; line-height: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript { padding: 30px; line-height: 1.8; }
@keyframes sheet-enter { from { transform: translateY(20px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

/* Small phones, landscape and right-to-left languages. */
@media (max-width: 370px) {
  .film-nav { margin: 0 16px; }
  .wordmark { letter-spacing: 1.3px; font-size: 9px; }
  .wordmark:before { width: 23px; line-height: 25px; margin-right: 6px; }
  .gate-hero .visual { left: 14px; right: 14px; height: 320px; }
  .gate-face-space { height: 352px; }
  .gate-hero-copy { padding-left: 20px; padding-right: 20px; }
  .gate-hero h1 { font-size: 26px; }
  .gate-content { padding-left: 14px; padding-right: 14px; }
  .gate-thumbnails { gap: 7px; }
  .gate-thumb { height: 77px; }
  .guide-heading { padding-left: 20px; padding-right: 20px; }
  .guide-heading h1 { font-size: 29px; }
  .lead-sheet { padding-left: 19px; padding-right: 19px; }
  .lead-sheet h2 { font-size: 27px; }
}
@media (max-height: 710px) {
  .lead-handle { margin-bottom: 13px; }
  .lead-back { margin: 10px 0 5px; }
  .lead-form { gap: 15px; }
  .lead-intro { margin-bottom: 20px; }
}
@media (max-height: 450px) { .lead-sheet { border-radius: 18px 18px 0 0; } }
html[dir="rtl"] .film-nav, html[dir="rtl"] .gate-thumbnails { direction: ltr; }
html[dir="rtl"] .locale-select { direction: rtl; }
html[dir="rtl"] .lead-profile-card .modal-picture, html[dir="rtl"] .safari-proof-number { margin-left: 12px; margin-right: 0; }
html[dir="rtl"] .lead-close { margin-right: 10px; margin-left: 0; }
html[dir="rtl"] .animated-steps li:before { margin-left: 11px; margin-right: 0; }
html[dir="rtl"] .main-button svg, html[dir="rtl"] .lead-back svg { transform: scaleX(-1); }
html[dir="rtl"] .lead-submit svg { left: 16px; right: auto; }
html[dir="rtl"] .lead-phone-row, html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"] { direction: ltr; text-align: left; }
@media (prefers-reduced-motion: reduce) { .lead-sheet { animation: none; } .safari-progress-fill { transition: none; } }

/* Non-blocking completion message, hidden automatically after two seconds. */
.completion-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1100; max-width: calc(100% - 40px); padding: 20px 38px; border: 1px solid #dce6fa; border-radius: 16px; background: #fff; box-shadow: 0 12px 40px #17366c26; color: var(--blue); font-size: 20px; font-weight: 700; line-height: 1.5; text-align: center; pointer-events: none; }
