/*
 * CV Atlas: landing page. World: a basin of blue sumi ink on white water (js/ink.js), the CV
 * floating on it. Paper white, cobalt and indigo ink thinning to pale blue, carbon ink text.
 * White in every system theme (owner brief: white and blue). Self-hosted fonts only:
 * Alegreya Sans Bold for display, the platform sans for text. Text keeps at least 4.5:1.
 */
@font-face { font-family: 'Atlas Display'; src: url('../fonts/alegreya/AlegreyaSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --paper: #fbfcfe; --white: #ffffff; --wash: #eef3fd; --wash-2: #dce6fb;
  --cobalt: #1e4fd8; --cobalt-deep: #173fb0; --indigo: #142c7a; --ink: #0e1630; --ink-2: #3a4566; --ink-3: #56607d;
  --current: rgba(30, 79, 216, .16); --current-2: rgba(30, 79, 216, .28);
  --focus: 0 0 0 3px #ffffff, 0 0 0 5px #1e4fd8;
  --sheet-shadow: 0 1px 2px rgba(20, 44, 122, .08), 0 8px 20px -8px rgba(20, 44, 122, .18), 0 40px 70px -36px rgba(20, 44, 122, .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --touch: 44px;
  --display: 'Atlas Display', 'Alegreya Sans', ui-sans-serif, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--wash-2) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; caret-color: var(--cobalt); }
::selection { background: var(--wash-2); color: var(--indigo); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; color: var(--indigo); }
p { margin: 0 0 14px; }
a { color: var(--cobalt); text-decoration-color: var(--current-2); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-deep); text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.wrap { width: min(1180px, 100% - 48px); margin: 0 auto; }
.narrow { width: min(680px, 100% - 48px); }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 50; background: var(--indigo); color: #fff; padding: 12px 16px; border-radius: 12px; text-decoration: none; }
.skip:focus { top: 12px; }
.skip:hover { color: #fff; }
.fine { font-size: 14px; color: var(--ink-3); }

/* ── Controls ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 600 16px/1 var(--text); text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 1px 1px rgba(20, 44, 122, .2), 0 6px 16px -6px rgba(30, 79, 216, .55); }
.btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 1px rgba(20, 44, 122, .2); }
.btn-small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ''; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px) rotate(45deg); }
select { font: inherit; font-size: 16px; min-height: var(--touch); padding: 0 42px 0 18px; border-radius: 999px; border: 1px solid var(--wash-2); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e4fd8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 18px center; color: var(--ink); appearance: none; box-shadow: 0 1px 2px rgba(20, 44, 122, .06); }
select:hover { border-color: var(--current-2); }

/* ── Navigation ── */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(251, 252, 254, .8); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid rgba(30, 79, 216, .1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--touch); color: var(--indigo); text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -.01em; }
.brand:hover { color: var(--indigo); }
.logo { display: block; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--cobalt); }

/* ── The basin: full-bleed ink, copy in a still margin, the CV floating on the water ── */
.basin { position: relative; isolation: isolate; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); border-bottom: 1px solid rgba(30, 79, 216, .12); }
.ink { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.basin-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.basin-copy { padding: clamp(8px, 2vw, 24px) 0; }
.basin h1 { font-size: clamp(44px, 7.2vw, 92px); line-height: .98; letter-spacing: -.025em; max-width: 13ch; }
.basin h1 span { display: block; text-wrap: balance; }
.basin h1 span + span { color: var(--cobalt); }
.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 38ch; margin-top: 26px; }
.hero-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-pick select { min-width: min(300px, 100%); }
.lens-controls { margin-top: clamp(32px, 4vw, 44px); max-width: 420px; }
.lens-label { font-size: 14px; color: var(--ink-3); margin-bottom: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(30, 79, 216, .14); border-radius: 999px; }
.seg button { font: 600 15px/1 var(--text); color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; min-height: 40px; padding: 0 16px; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg button:hover { color: var(--cobalt); }
.seg button[aria-checked="true"] { background: var(--cobalt); color: #fff; box-shadow: 0 4px 12px -4px rgba(30, 79, 216, .6); }
.lens-list { list-style: none; margin: 18px 0 0; padding: 0; }
.lens-list li { position: relative; padding: 9px 0 9px 22px; color: var(--ink-2); font-size: 16px; line-height: 1.4; }
.lens-list li::before { content: ''; position: absolute; left: 2px; top: 1.05em; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 0 3px var(--wash-2); }
.lens-figure { margin: 0; justify-self: center; width: 100%; max-width: 520px; }
.lens-paper { position: relative; overflow: hidden; width: 100%; border-radius: 3px; transition: opacity .25s var(--ease), filter .25s var(--ease); transform: rotate(-1.2deg); }
.lens-paper .cv-sheet { margin: 0; box-shadow: var(--sheet-shadow); }
.lens-paper.is-switching { opacity: .4; filter: blur(2px); }
.lens-figure figcaption { margin-top: 14px; text-align: center; }

/* ── Sections below: currents for dividers, heading in a still margin ── */
.section { padding: clamp(64px, 8vw, 112px) 0; position: relative; }
.section + .section::before { content: ''; position: absolute; top: 0; left: 50%; width: min(1180px, 100% - 48px); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--current-2) 20%, var(--current) 70%, transparent); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.section h2 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -.02em; max-width: 13ch; text-wrap: balance; }
.body-lg { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.quiet { background: var(--white); }

.regs { margin: 30px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.regs div { padding: 16px 0; border-top: 1px solid var(--wash-2); }
.regs dt { font-size: 14px; color: var(--ink-3); }
.regs dd { margin: 3px 0 0; font-weight: 600; color: var(--indigo); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; }
.table-wrap:focus-visible { box-shadow: var(--focus); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; font-variant-numeric: tabular-nums; }
.compare th, .compare td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--wash-2); vertical-align: top; }
.compare thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--current-2); }
.compare tbody th { font-weight: 700; color: var(--indigo); }
.compare td { color: var(--ink-2); white-space: nowrap; }
.compare td:nth-child(2), .compare td:nth-child(5) { white-space: normal; }
.compare tbody tr:hover td, .compare tbody tr:hover th { background: var(--wash); }

.guide-links { list-style: none; margin: 0 0 18px; padding: 0; columns: 2; column-gap: 36px; }
.guide-links li { break-inside: avoid; border-top: 1px solid var(--wash-2); }
.guide-links a { display: flex; align-items: center; min-height: var(--touch); padding: 8px 0; text-decoration: none; color: var(--ink); }
.guide-links a:hover { color: var(--cobalt); }

.faq { border-top: 1px solid var(--wash-2); }
.faq:last-child { border-bottom: 1px solid var(--wash-2); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; padding: 12px 0; cursor: pointer; font-weight: 600; font-size: 18px; color: var(--indigo); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 1.6px solid var(--cobalt); border-bottom: 1.6px solid var(--cobalt); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease); }
.faq[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq p { color: var(--ink-2); max-width: 60ch; padding-bottom: 10px; }

.final { background: var(--indigo); color: #fff; }
.final h2 { color: #fff; font-size: clamp(36px, 5vw, 60px); max-width: none; }
.final .lead { color: #d6e0fa; margin: 18px auto 0; }
.final .country-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.final select { border-color: transparent; min-width: min(320px, 100%); }
.final .btn-primary { background: #fff; color: var(--indigo); box-shadow: none; }
.final .btn-primary:hover { background: var(--wash); color: var(--indigo); }
.final a, .final a:hover { color: #fff; }
.final :focus-visible { box-shadow: 0 0 0 3px var(--indigo), 0 0 0 5px #fff; }
.section.final::before { display: none; }

/* ── Footer ── */
.footer { padding: 44px 0 60px; background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-inner .fine { max-width: 46ch; margin-top: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; align-content: flex-start; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--cobalt); text-decoration: underline; }

/* ── Smaller screens ── */
@media (max-width: 960px) {
  .basin-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .lens-figure { max-width: 460px; }
  .lens-controls { max-width: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .narrow { width: calc(100% - 32px); }
  .nav-links { gap: 8px; }
  .nav-links a:not(.btn) { display: none; }
  .nav-links a#nav-account:not([hidden]) { display: inline-flex; }
  .basin h1 { font-size: clamp(40px, 12vw, 56px); }
  .hero-pick select, .hero-pick .btn { flex: 1 1 100%; }
  .seg { display: flex; border-radius: 22px; }
  .seg button { flex: 1 1 auto; min-height: var(--touch); padding: 0 10px; }
  .lens-paper { transform: none; }
  .regs, .guide-links { grid-template-columns: 1fr; columns: 1; }
}
@media (pointer: coarse), (max-width: 640px) {
  .footer-links a { min-height: var(--touch); min-width: var(--touch); }
  .btn-small, .seg button { min-height: var(--touch); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print { .nav, .ink, .lens-controls, .hero-pick, .country-pick { display: none; } }

/* The name is written in capitals: CV ATLAS. The markup keeps "CV Atlas" so screen readers say it as words. */
.brand, .legal-brand { text-transform: uppercase; letter-spacing: .06em; }
