/* Nordic Tug. Plain CSS, system fonts, light theme with dark via prefers-color-scheme. */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f8fb;
  --bg-tint: #e4f1fa;
  --surface: #ffffff;
  --text: #0e1a24;
  --text-muted: #5e6b78;
  --border: #dfe6ec;
  --accent: #2a85bd;
  --accent-strong: #1c6a99;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(14, 26, 36, 0.05), 0 8px 24px rgba(14, 26, 36, 0.06);
  --shadow-lg: 0 2px 4px rgba(14, 26, 36, 0.06), 0 18px 40px rgba(14, 26, 36, 0.1);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --live-bg: #e4f1fa;   --live-fg: #1c6a99;
  --soon-bg: #e3f4e8;   --soon-fg: #1d6b3a;
  --review-bg: #fdf1d8; --review-fg: #8a5a00;
  --tf-bg: #eeeafb;     --tf-fg: #5b3fa8;
  --dev-bg: #edf0f3;    --dev-fg: #46525e;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141a;
    --bg-soft: #121a22;
    --bg-tint: #15212c;
    --surface: #161e26;
    --text: #e8eef3;
    --text-muted: #9aa8b5;
    --border: #26323d;
    --accent: #4fa3d6;
    --accent-strong: #6cb6e3;
    --accent-contrast: #0e141a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.35);

    --live-bg: #13324a;   --live-fg: #9fd0f0;
    --soon-bg: #143222;   --soon-fg: #9ddcb2;
    --review-bg: #3a2b0c; --review-fg: #f2cc7d;
    --tf-bg: #2a2147;     --tf-fg: #c9bcf5;
    --dev-bg: #232c35;    --dev-fg: #c3ccd5;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.015em; }

p { margin: 0 0 1em; }

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-strong);
  color: var(--accent-contrast);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 1.1em; height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) { .container { padding: 0 32px; } }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand img {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); }

@media (max-width: 420px) {
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .site-nav a { padding: 8px 8px; font-size: 0.9rem; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-strong);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 6px 2px;
}
.text-link:hover { text-decoration: underline; }

/* Sections */

.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

/* Hero */

.hero { padding: 56px 0 72px; }
@media (min-width: 900px) { .hero { padding: 96px 0 112px; } }

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 64px; }
}

.hero h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.9rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent-strong); }
.hero-lede {
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-muted);
  max-width: 34em;
  margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { color: var(--accent-strong); }

.hero-art { display: flex; justify-content: center; }
.hero-logo {
  width: min(100%, 400px);
  aspect-ratio: 1;
  padding: 6%;
  background: #ffffff;
  border-radius: 22%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 899px) {
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-logo { width: 132px; padding: 8px; border-radius: 28px; }
}

/* Apps */

.apps-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); }
.chip-count, .group-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.app-group + .app-group { margin-top: 64px; }
.group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  margin-bottom: 22px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.app-grid > li { display: flex; min-width: 0; }

.app-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.app-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.app-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 260px;
  padding: 28px 24px 0;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--bg-tint), transparent 70%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.app-shot {
  width: auto;
  height: 100%;
  max-width: 70%;
  object-fit: cover;
  object-position: top;
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: 0 10px 30px rgba(14, 26, 36, 0.14);
}
.app-art-icon { align-items: center; padding: 24px; }

.app-icon {
  width: 52px; height: 52px;
  flex: none;
  border-radius: 22%;
  border: 1px solid var(--border);
}
.app-icon-lg {
  width: 128px; height: 128px;
  box-shadow: var(--shadow-lg);
}

.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 18px;
}
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.app-heading { min-width: 0; }
.app-title { font-size: 1.15rem; overflow-wrap: anywhere; }
.app-subtitle { margin: 2px 0 0; color: var(--text-muted); font-size: 0.92rem; }

.app-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-live { background: var(--live-bg); color: var(--live-fg); }
.badge-soon { background: var(--soon-bg); color: var(--soon-fg); }
.badge-review { background: var(--review-bg); color: var(--review-fg); }
.badge-testflight { background: var(--tf-bg); color: var(--tf-fg); }
.badge-dev { background: var(--dev-bg); color: var(--dev-fg); }
.badge-note { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }

.app-blurb { color: var(--text-muted); font-size: 0.97rem; flex: 1; }

.app-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-height: 51px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.app-platforms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.noscript-list { columns: 2 220px; padding-left: 1.2em; }
.noscript-list h3 { font-size: 1.1rem; margin: 0 0 8px; break-after: avoid; }

/* Principles */

.principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.principle {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.principle-icon {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg-tint);
  color: var(--accent-strong);
}
.principle-icon .icon { width: 24px; height: 24px; }
.principle h3 { font-size: 1.1rem; margin-bottom: 8px; }
.principle p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }

/* Developer + contact */

.split {
  display: grid;
  gap: 24px;
}
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

.panel {
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
@media (min-width: 720px) { .panel { padding: 44px 40px; } }
.panel h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin-bottom: 14px; }
.panel p { color: var(--text-muted); font-size: 1.05rem; }
.panel .btn { margin-top: 8px; }

.panel-accent {
  background: linear-gradient(160deg, var(--accent-strong), #155a84);
  border-color: transparent;
  color: #ffffff;
}
.panel-accent .eyebrow { color: #d4ebf8; }
.panel-accent p { color: #e6f2fa; }
.panel-accent .btn {
  background: #ffffff;
  color: #155a84;
}
.panel-accent :focus-visible { outline-color: #ffffff; }
.contact-email {
  display: inline-block;
  margin: 4px 0 18px;
  color: #ffffff;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}
@media (prefers-color-scheme: dark) {
  .panel-accent { background: linear-gradient(160deg, #1c6a99, #134a6c); }
}

/* Prose pages (privacy, support, 404) */

.page { padding: 56px 0 88px; }
@media (min-width: 900px) { .page { padding: 88px 0 120px; } }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); letter-spacing: -0.025em; margin-bottom: 28px; }
.prose h2 { font-size: 1.5rem; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.2rem; margin: 32px 0 10px; }
.prose p { margin-bottom: 1.1em; }
.prose a { overflow-wrap: anywhere; }
.prose .effective { color: var(--text-muted); font-size: 0.95rem; margin-top: 32px; }

.prose-card {
  margin-top: 8px;
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prose-card p:last-child { margin-bottom: 0; }

/* Footer */

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; background: #ffffff; border: 1px solid var(--border); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0; padding: 0;
  list-style: none;
}
.footer-links a { color: var(--text-muted); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-links a:hover { color: var(--accent-strong); text-decoration: underline; }
