/* Caship corporate site — minimalist, Fluent-inspired.
   System fonts only (Segoe UI first): no third-party font requests. */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --text: #242424;
  --muted: #616161;
  --line: #e0e0e0;
  --brand: #0067b8;
  --brand-hover: #005a9e;
  --brand-press: #004e8c;
  --brand-tint: #eaf3fb;
  --on-brand: #ffffff;
  --danger: #b10e1c;
  --ok: #107c10;
  --shadow: 0 2px 4px rgba(0,0,0,.10), 0 0 2px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 16px rgba(0,0,0,.14), 0 0 2px rgba(0,0,0,.12);
  --radius: 4px;
  --wrap: 1120px;
  font-size: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1b; --bg-alt: #242424; --surface: #2b2b2b;
    --text: #f5f5f5; --muted: #b5b5b5; --line: #3d3d3d;
    --brand: #479ef5; --brand-hover: #6cb8f6; --brand-press: #9acbf9;
    --brand-tint: #0c2438; --on-brand: #0b0b0b;
    --danger: #ff8a8a; --ok: #6ccb5f;
    --shadow: 0 2px 4px rgba(0,0,0,.4); --shadow-lg: 0 8px 16px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; }
.brand-mark { width: 24px; height: 24px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: .9rem; font-weight: 700; border-radius: 2px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--text); text-decoration: none; font-size: .9375rem; padding: 6px 12px; border-radius: var(--radius); }
.nav a:hover { background: var(--bg-alt); color: var(--text); }
.nav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.hdr-cta { font-size: .9375rem; color: var(--text); text-decoration: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.hdr-cta:hover { background: var(--bg-alt); color: var(--text); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font: inherit; color: var(--text); cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .9375rem; text-decoration: none; cursor: pointer; padding: 10px 22px; min-height: 40px; border-radius: var(--radius); border: 1px solid transparent; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn.primary:active { background: var(--brand-press); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn.secondary:hover { background: var(--bg-alt); color: var(--text); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.link-arrow .ico { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover .ico { transform: translateX(3px); }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); }
h3 { font-size: 1.125rem; letter-spacing: -.005em; }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 62ch; margin: 16px 0 0; }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin: 12px 0 0; font-size: 1.0625rem; }

.hero { padding: 88px 0 80px; background: var(--bg-alt); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-art div { aspect-ratio: 1.15; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow); }
.hero-art div:nth-child(2), .hero-art div:nth-child(3) { background: var(--brand-tint); }
.hero-art .ico { width: 40px; height: 40px; stroke-width: 1.25; }

.page-hero { padding: 64px 0 48px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }

/* ---------- cards / tiles ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
a.tile { text-decoration: none; color: inherit; }
a.tile:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.tile .ico { color: var(--brand); width: 32px; height: 32px; }
.tile p { margin: 0; color: var(--muted); font-size: .9688rem; }
.tile .link-arrow { margin-top: auto; padding-top: 8px; color: var(--brand); }
.plain-col h3 { margin: 12px 0 8px; }
.plain-col p { margin: 0; color: var(--muted); }
.plain-col .ico { color: var(--brand); width: 32px; height: 32px; }

.band { background: var(--brand); color: var(--on-brand); padding: 56px 0; }
.band h2 { color: inherit; }
.band p { color: inherit; opacity: .92; margin: 8px 0 0; }
.band-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.band .btn.primary { background: var(--on-brand); color: var(--brand); }
.band .btn.primary:hover { background: var(--brand-tint); color: var(--brand-hover); }
@media (prefers-color-scheme: dark) { .band { background: #0c2438; color: #f5f5f5; } .band .btn.primary { background: #f5f5f5; color: #0b3a66; } }

/* ---------- products page ---------- */
.product { display: grid; grid-template-columns: 72px 1fr 1fr; gap: 24px 40px; padding: 40px 0; border-top: 1px solid var(--line); align-items: start; }
.product:first-of-type { border-top: 0; padding-top: 0; }
.product .ico { width: 44px; height: 44px; color: var(--brand); stroke-width: 1.25; }
.product h3 { font-size: 1.375rem; }
.product .tag { font-size: .8125rem; color: var(--muted); margin: 6px 0 0; }
.product p { margin: 12px 0 0; color: var(--muted); }
.product ul { margin: 0; padding-left: 18px; color: var(--text); }
.product li { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--surface); border-radius: 2px; padding: 6px 12px; font-size: .9rem; }

/* ---------- enrol page ---------- */
.enrol-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.enrol-card .ico { width: 36px; height: 36px; color: var(--brand); }
.enrol-card p { margin: 0; color: var(--muted); }
.enrol-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9375rem; }
.enrol-card .btn { margin-top: auto; align-self: flex-start; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; padding-top: 16px; border-top: 2px solid var(--brand); }
.steps li::before { content: counter(s); display: block; font-size: 1.5rem; font-weight: 600; color: var(--brand); margin-bottom: 4px; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .9688rem; }

/* dialog + form */
dialog { border: 0; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.dlg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 8px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dlg-h h2 { font-size: 1.375rem; }
.dlg-h p { margin: 4px 0 0; color: var(--muted); font-size: .9375rem; }
.x { background: none; border: 0; cursor: pointer; padding: 6px; color: var(--muted); border-radius: var(--radius); line-height: 0; }
.x:hover { background: var(--bg-alt); color: var(--text); }
.dlg-b { padding: 8px 28px 24px; }
.grp { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 24px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.grp:first-child { border-top: 0; margin-top: 8px; padding-top: 0; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.f { display: flex; flex-direction: column; gap: 6px; }
.f.full { grid-column: 1 / -1; }
.f label { font-size: .875rem; font-weight: 600; }
.f label .req { color: var(--danger); margin-left: 2px; }
.f input, .f select, .f textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid #8a8a8a; border-radius: var(--radius); padding: 8px 10px; min-height: 36px; width: 100%; }
.f textarea { min-height: 88px; resize: vertical; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: var(--text); }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.f .hint { font-size: .8125rem; color: var(--muted); }
.f input:user-invalid, .f select:user-invalid { border-color: var(--danger); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-top: 20px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.dlg-f { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.msg { margin: 16px 0 0; padding: 12px 14px; border-left: 4px solid var(--danger); background: var(--bg-alt); font-size: .9375rem; }
.msg[hidden] { display: none; }
.done { text-align: center; padding: 32px 8px 16px; }
.done .ico { width: 48px; height: 48px; color: var(--ok); }
.done h3 { font-size: 1.375rem; margin: 12px 0 8px; }
.done p { color: var(--muted); margin: 0 0 8px; }
.done code { background: var(--bg-alt); padding: 3px 8px; border-radius: 2px; font-size: 1rem; }

/* ---------- legal pages (Privacy / Terms) ---------- */
main.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px 80px; }
main.legal h1 { font-size: 2.25rem; margin-bottom: 8px; }
main.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; letter-spacing: -.005em; }
main.legal p, main.legal li { color: var(--text); line-height: 1.7; }
main.legal p { margin: 0 0 16px; }
main.legal ul { padding-left: 20px; margin: 0 0 16px; }
main.legal .muted, .muted { color: var(--muted); }

/* ---------- footer ---------- */
.ftr { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .9rem; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ftr h4 { margin: 0 0 12px; font-size: .875rem; font-weight: 600; }
.ftr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ftr a { color: var(--muted); text-decoration: none; }
.ftr a:hover { color: var(--text); text-decoration: underline; }
.ftr p { color: var(--muted); margin: 8px 0 0; max-width: 38ch; }
.ftr-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .cols-3, .cols-2, .steps { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .product { grid-template-columns: 1fr; gap: 16px; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .hdr-cta { display: none; }
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
  .fgrid { grid-template-columns: 1fr; }
  .dlg-h, .dlg-b { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
