/* Amke Media: shared styles for the secondary pages (privacy, terms, 404, thanks, welcome).
   The homepage (index.html) keeps its own inline CSS. Keep the tokens below in sync with its :root. */

/* ---------- Tokens ---------- */
:root {
  --navy: #0C447C;
  --navy-700: #0A3A6B;
  --navy-900: #062646;
  --blue: #378ADD;
  --blue-ink: #2570BD;
  --sky: #85B7EB;
  --mist: #C8DDF4;
  --ice: #EEF4FB;
  --ink: #243A52;
  --muted: #4A6380;
  --soft: #C9DCF2;
  --line: #D6E4F3;
  --error: #A32D2D;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(20px, 5vw, 56px);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
p, li { text-wrap: pretty; }
::selection { background: var(--sky); color: var(--navy-900); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; transition: top .25s var(--ease); }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn { --bg: var(--navy); --fg: #fff; position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; border: 0; border-radius: 999px; background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; text-wrap: balance; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s var(--ease); }
.btn:active { transform: translateY(0) scale(.98); }
.btn__arrow { flex: none; transition: transform .35s var(--ease); }
.btn--primary { box-shadow: 0 12px 28px -12px rgba(12,68,124,.6), inset 0 1px 0 rgba(255,255,255,.14); }
.btn--ghost { --bg: transparent; --fg: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover::before { transform: translateX(120%); }
  .btn:hover .btn__arrow { transform: translateX(4px); }
  .btn--primary:hover { --bg: var(--navy-700); box-shadow: 0 18px 36px -12px rgba(12,68,124,.7), inset 0 1px 0 rgba(255,255,255,.14); }
  .btn--ghost:hover { --bg: var(--ice); }
  a:hover { text-decoration-thickness: 2px; }
}

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 1px 0 rgba(12,68,124,.1); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--navy); text-decoration: none; }
.brand__word { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: .14em; white-space: nowrap; }
.header .btn { flex: none; white-space: nowrap; }
.mark { flex: none; width: 44px; height: 44px; overflow: visible; }
.mark__route { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.mark__summit { transform-box: fill-box; transform-origin: center; }
@media (hover: hover) {
  .brand:hover .mark__route { animation: draw .9s var(--ease) both; }
  .brand:hover .mark__summit { animation: pop .6s var(--spring) .6s both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } }

/* ---------- Document pages (privacy, terms) ---------- */
.doc { max-width: 760px; padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 112px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--blue-ink); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 28px; height: 1.5px; background: currentColor; }
h1 { margin: 0 0 12px; color: var(--navy); font-family: var(--serif); font-size: clamp(40px, 6vw, 60px); font-weight: 500; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
.updated { margin: 0 0 40px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 48px 0 12px; color: var(--navy); font-family: var(--serif); font-size: clamp(26px, 3vw, 30px); font-weight: 500; line-height: 1.2; text-wrap: balance; }
.doc p, .doc ul { margin: 0 0 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--blue); }
.callout { margin: 48px 0 0; padding: 22px 24px; border-radius: 18px; background: var(--ice); }
.callout p { margin: 0; }
.doc .glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; }
.doc .glance li { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--ice); color: var(--muted); font-size: 15px; line-height: 1.45; }
.glance strong { color: var(--navy); font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; }

/* ---------- Status pages (404, thanks, welcome) ---------- */
.status { background: linear-gradient(180deg, #fff 30%, var(--ice)); }
.status__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(48px, 8vw, 104px); }
.status__inner--long { align-items: start; }
.status__inner--long .art { position: sticky; top: 120px; }
.status__copy { display: flex; flex-direction: column; align-items: flex-start; animation: fadeUp .9s var(--ease) .1s both; }
.status h1 { margin-bottom: 18px; font-size: clamp(42px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.02em; }
.lede { max-width: 32em; margin: 0 0 28px; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.steps { display: grid; gap: 20px; margin: 4px 0 36px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 56px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1; }
.steps strong { display: block; color: var(--navy); font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.25; }
.steps p { margin: 4px 0 0; }
.note { margin: 0 0 32px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.note p { margin: 0 0 12px; }
.note a { font-weight: 600; }
.note p:last-child { margin: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }

/* Mountain illustration (decorative, finite motion) */
.art { width: 100%; max-width: 520px; height: auto; justify-self: center; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.art__rise { animation: rise 1.2s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(80px); } }
.art__route { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; animation: draw 1.3s cubic-bezier(.45, .05, .3, 1) 1s both; }
.art__summit { fill: var(--blue); stroke: #fff; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: pop .7s var(--spring) 2.2s both; }
.art__ring { fill: none; stroke: var(--sky); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 2.4s cubic-bezier(.2, .6, .4, 1) 2.6s; }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
.art__flag { transform-box: fill-box; transform-origin: 0 100%; animation: plant .8s var(--spring) 2.5s both; }
@keyframes plant { from { opacity: 0; transform: translateY(-14px) scaleY(.2); } }
.art__here { fill: var(--blue); stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pop .6s var(--spring) 2.1s both; }
.art__goal { fill: none; stroke: var(--sky); stroke-width: 2; stroke-dasharray: 3 4; }
.art__trail { fill: none; stroke: var(--sky); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 8; }
.art__trail-mask { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 1; animation: draw 1.8s var(--ease) 2.4s both; }
.art__sign { transform-box: fill-box; transform-origin: 50% 100%; animation: plant .8s var(--spring) 3.9s both; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--soft); font-size: 15px; line-height: 1.5; }
.footer a { color: #fff; text-decoration: none; }
.footer :focus-visible { outline-color: var(--sky); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; padding-block: 44px 28px; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__tile { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--ice); }
.footer__tile .mark { width: 36px; height: 36px; }
.footer__brand strong { display: block; margin-bottom: 2px; color: #fff; font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: .14em; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.footer__nav a, .footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.footer__nav a[aria-current="page"] { color: var(--sky); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-block: 8px 20px; border-top: 1px solid rgba(133,183,235,.16); font-size: 14px; }
@media (hover: hover) {
  .footer__nav a:hover, .footer__bottom a:hover { background-size: 100% 1px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .status__inner { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .art, .status__inner--long .art { position: static; order: -1; max-width: 280px; }
}
@media (max-width: 560px) {
  .header__inner { height: 66px; gap: 10px; }
  .brand { gap: 9px; }
  .brand .mark { width: 34px; height: 34px; }
  .brand__word { font-size: 17px; letter-spacing: .12em; }
  .header .btn { min-height: 44px; padding: 8px 14px; font-size: 13.5px; }
  .header .btn__arrow { display: none; }
  .doc .glance { grid-template-columns: minmax(0, 1fr); }
  .footer__nav { gap: 0 22px; }
}
@media (max-width: 374px) {
  .brand__word { font-size: 15px; letter-spacing: .1em; }
  .header .btn { padding-inline: 12px; }
}
@media (max-width: 354px) {
  .brand__word { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- Print ---------- */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  body { display: block; color: #000; font-size: 11pt; line-height: 1.5; }
  .header { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid #999; }
  .header .btn, .skip, .footer__nav, .art { display: none !important; }
  .status { background: none; }
  .status__inner { display: block; }
  .doc { max-width: none; padding-block: 24px; }
  .doc a[href^="http"]::after, .doc a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 90%; }
  .doc h2 { break-after: avoid; }
  .doc li, .glance li, .callout, .steps li { break-inside: avoid; }
  .callout, .note, .glance li { border: 1px solid #999; background: none; }
  .footer { background: none; color: #000; border-top: 1px solid #999; }
  .footer a, .footer__brand strong { color: #000; }
}
