/* Passport Photo — site styles.
 *
 * The palette is the iOS app's own (src/theme/colors.ts): #F7F7F9 background, #3B6FF4 accent,
 * #0D0D0D ink. A document-photo site has to read as official without reading as a government
 * form, so the structure is plain and the colour is spent almost entirely on the one thing that
 * matters — telling somebody whether their photo will pass.
 *
 * Contrast was computed, not guessed. #3B6FF4 under white text is 4.40:1, which fails AA for
 * body text, so the accent is used for large type and decoration while every button and link
 * that carries white text uses #2850CC (6.8:1). Muted text is #5B5B70 (6.6:1 on white).
 */

:root {
  --ink: #0d0d0d;
  --ink-2: #1c1c24;
  --muted: #5b5b70;
  --muted-2: #7a7a8f;
  --line: #e5e5ea;
  --line-2: #d3d3dc;

  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f0f0f3;

  --brand: #3b6ff4;
  --brand-deep: #2850cc;
  --brand-dark: #1c3a99;
  --brand-tint: #e8effe;
  --brand-tint-2: #d4e2fd;

  --pass: #15803d;
  --pass-bg: #e8f7ee;
  --warn: #b45309;
  --warn-bg: #fdf3e3;
  --fail: #b91c1c;
  --fail-bg: #fdeaea;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(13, 13, 30, 0.05), 0 6px 20px rgba(13, 13, 30, 0.06);
  --shadow-lg: 0 20px 56px rgba(13, 13, 30, 0.14);
  --wrap: 1140px;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

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

/* The UA rule for [hidden] is display:none, but any author rule setting display wins on
 * specificity, so make hidden non-negotiable. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -0.021em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.15rem); font-weight: 750; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
strong { font-weight: 680; color: var(--ink); }
small { font-size: 0.86rem; }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.12em 0.36em; border-radius: 5px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* --- header ------------------------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink);
  text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; flex: none;
}
.brand img { border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 560; padding: 7px 11px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.btn { color: #fff; }
@media (max-width: 800px) { .nav-hide { display: none; } }
/* On a narrow phone the two-word brand and the CTA fight for the same row. Shrinking the wordmark
   a little keeps both on one line rather than letting the brand wrap under its own icon. */
@media (max-width: 430px) {
  .site-header .wrap { gap: 10px; padding: 0 14px; }
  .brand { font-size: 0.95rem; gap: 7px; }
  .brand img { width: 26px; height: 26px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 8px; font-size: 0.88rem; }
}

/* --- buttons ----------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 640; line-height: 1.2;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.06s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand-deep); border-color: var(--brand-tint-2); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-lg { padding: 15px 26px; font-size: 1.03rem; border-radius: 13px; }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; border-radius: 9px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.is-active { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }

/* --- hero -------------------------------------------------------------------------------- */

.hero { padding: clamp(34px, 5vw, 62px) 0 clamp(20px, 3vw, 34px); }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: clamp(26px, 4vw, 52px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 640;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--brand-dark);
  background: var(--brand-tint); border-radius: 999px; padding: 6px 13px; margin-bottom: 16px;
}
.lede { font-size: clamp(1.04rem, 0.98rem + 0.3vw, 1.2rem); color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.hero-cta-or { color: var(--muted-2); font-size: 0.92rem; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.97rem; color: var(--muted); }
.hero-points li::before { content: '✓'; color: var(--pass); font-weight: 800; flex: none; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { border-radius: 26px; box-shadow: var(--shadow-lg); max-height: 560px; width: auto; }

/* --- sections ---------------------------------------------------------------------------- */

section { padding: clamp(38px, 5vw, 70px) 0; }
section.tight { padding: clamp(24px, 3vw, 40px) 0; }
.section-head { max-width: 44em; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.surface { background: var(--surface); }
.tinted { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--bg) 100%); }

/* --- the tool ---------------------------------------------------------------------------- */

.tool {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.tool.is-busy { pointer-events: none; opacity: 0.7; }

.tool-start { padding: clamp(24px, 4vw, 44px); text-align: center; }
.tool-drop {
  border: 2px dashed var(--line-2); border-radius: var(--radius); padding: clamp(28px, 5vw, 52px) 20px;
  background: var(--bg); transition: border-color 0.15s, background 0.15s;
}
.tool-drop.is-over { border-color: var(--brand); background: var(--brand-tint); }
.tool-drop h3 { margin-bottom: 6px; }
.tool-drop p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.tool-drop-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tool-privacy { margin-top: 16px; font-size: 0.88rem; color: var(--muted-2); }

.tool-work { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 940px) { .tool-work { grid-template-columns: 1fr; } }

.tool-stage {
  background: var(--surface-2); padding: clamp(18px, 3vw, 30px);
  display: flex; flex-direction: column; align-items: center; gap: 16px; min-height: 380px;
  border-right: 1px solid var(--line);
}
@media (max-width: 940px) { .tool-stage { border-right: 0; border-bottom: 1px solid var(--line); } }
.tool-stage canvas {
  max-width: 100%; max-height: 460px; border-radius: 6px; background: #fff;
  box-shadow: 0 2px 10px rgba(13, 13, 30, 0.14); touch-action: none;
}
.tool-stage-hint { font-size: 0.88rem; color: var(--muted); text-align: center; max-width: 34em; }
.tool-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.tool-panel { padding: clamp(18px, 3vw, 26px); display: grid; gap: 20px; align-content: start; }
.tool-field { display: grid; gap: 7px; }
.tool-field > label, .tool-legend {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; color: var(--muted-2);
}
.tool-field select, .tool-field input[type="search"], .tool-field input[type="text"] {
  font: inherit; font-size: 0.95rem; padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%;
}
.spec-line { font-size: 0.87rem; color: var(--muted); line-height: 1.5; }
.spec-line strong { color: var(--brand-dark); }

.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 0.87rem; font-weight: 560;
  padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); cursor: pointer;
}
.swatch:hover { border-color: var(--muted-2); }
.swatch.is-active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.swatch em { font-style: normal; font-size: 0.76rem; color: var(--brand-dark); font-weight: 700; }
.swatch-dot { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.swatch-dot-auto { background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 50%, #64748b 100%); }

.slider-row { display: grid; gap: 5px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 0.87rem; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--brand-deep); }

.check-row { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--muted); }
.check-row input { accent-color: var(--brand-deep); width: 17px; height: 17px; }

.verdict { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.92rem; line-height: 1.55; }
.verdict:empty { display: none; }
.verdict-pass { background: var(--pass-bg); color: var(--pass); }
.verdict-warn { background: var(--warn-bg); color: var(--warn); }
.verdict-fail { background: var(--fail-bg); color: var(--fail); }
.verdict strong { color: inherit; }
.verdict-note { display: block; margin-top: 6px; font-size: 0.86rem; opacity: 0.85; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; }
.check p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.check strong { font-weight: 640; }
.check-icon {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; margin-top: 1px;
}
.check-pass .check-icon { background: var(--pass-bg); color: var(--pass); }
.check-warn .check-icon { background: var(--warn-bg); color: var(--warn); }
.check-fail .check-icon { background: var(--fail-bg); color: var(--fail); }

.tool-downloads { display: grid; gap: 9px; border-top: 1px solid var(--line); padding-top: 18px; }
.tool-downloads .btn { width: 100%; }
.tool-download-note { font-size: 0.82rem; color: var(--muted-2); }
.tool-status { font-size: 0.88rem; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.tool-status.is-error { background: var(--fail-bg); color: var(--fail); }
.tool-status.is-warn { background: var(--warn-bg); color: var(--warn); }
.tool-status.is-ok { background: var(--pass-bg); color: var(--pass); }

.tool-camera { display: grid; gap: 14px; justify-items: center; padding: clamp(18px, 3vw, 30px); }
.tool-camera video { max-width: 100%; max-height: 420px; border-radius: var(--radius); background: #000; transform: scaleX(-1); }

/* --- cards, grids ------------------------------------------------------------------------ */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(206px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: block; text-decoration: none; color: inherit;
}
a.card:hover { border-color: var(--brand); box-shadow: var(--shadow); color: inherit; }
.card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card-kicker { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; color: var(--brand-deep); display: block; margin-bottom: 7px; }

.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: flex; gap: 15px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 750; font-size: 0.95rem;
}
.step h3 { font-size: 1.04rem; margin-bottom: 3px; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.shots figure { margin: 0; }
.shots img { border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); display: block; }
.shots figcaption { font-size: 0.87rem; color: var(--muted); margin-top: 9px; text-align: center; }

/* --- tables ------------------------------------------------------------------------------ */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; background: var(--surface-2); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg); }
td.wrap-cell { white-space: normal; min-width: 260px; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.badge-verified { background: var(--pass-bg); color: var(--pass); }

/* --- FAQ --------------------------------------------------------------------------------- */

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0;
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 640; color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand-deep); font-weight: 700; font-size: 1.25rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq-body { padding: 0 18px 16px; color: var(--muted); font-size: 0.95rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-more { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 0.92rem; }

/* --- prose (guides) ---------------------------------------------------------------------- */

.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--brand);
  background: var(--brand-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { margin: 1.3em 0; }
.prose .table-scroll { margin: 1.3em 0; }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: 0.88rem; color: var(--muted-2); margin-top: 8px; }

.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 1.5em 0;
}
.callout-warn { border-left-color: var(--warn); }
.callout h4 { margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

.meta-line { font-size: 0.87rem; color: var(--muted-2); margin-bottom: 22px; }
.breadcrumb { font-size: 0.86rem; color: var(--muted-2); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-deep); text-decoration: underline; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 28px; }
.toc h2 { font-size: 0.8rem; letter-spacing: 0.045em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 0.94rem; }
.toc li { margin-bottom: 4px; }

/* --- app CTA ----------------------------------------------------------------------------- */

.app-cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.app-cta-grid { display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center; }
@media (max-width: 720px) { .app-cta-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.app-cta img.app-icon { border-radius: 21px; box-shadow: var(--shadow); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge svg { height: 44px; width: auto; border-radius: 7px; }

/* --- country grid ------------------------------------------------------------------------ */

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.country-chip {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 0.92rem;
}
.country-chip:hover { border-color: var(--brand); color: var(--ink); }
.country-chip .flag { font-size: 1.1rem; flex: none; }
.country-chip .size { margin-left: auto; font-size: 0.79rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.spec-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 12px; margin: 0 0 26px; }
.spec-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.spec-tile dt { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.spec-tile dd { margin: 0; font-size: 1.16rem; font-weight: 720; color: var(--ink); letter-spacing: -0.015em; }
.spec-tile dd small { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* --- footer ------------------------------------------------------------------------------ */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 46px 0 34px; margin-top: 40px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 0.78rem; letter-spacing: 0.045em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 11px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand-deep); text-decoration: underline; }
.footer-note { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.87rem; }
.footer-note p { margin-bottom: 0.6em; }

.disclaimer {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: 0.88rem; color: var(--muted); margin: 22px 0;
}

/* --- misc -------------------------------------------------------------------------------- */

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.pill {
  font-size: 0.86rem; padding: 6px 13px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.pill:hover { border-color: var(--brand); color: var(--brand-deep); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
