/* MDT Software Apps — shared styles for the homepage, app pages and 404. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-500-latin-ext.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b1020;
  --bg-raised: #0f1528;
  --surface: #121a2e;
  --surface-hover: #16203a;
  --line: #22304d;
  --line-strong: #33466e;
  --text: #e6e9f2;
  --muted: #9aa3ba;
  --faint: #6f7a96;
  --violet: #8b7cf6;
  --violet-soft: rgba(139, 124, 246, 0.14);
  --blue: #5aa9ff;
  --blue-soft: rgba(90, 169, 255, 0.14);
  --amber: #f2c063;
  --amber-soft: rgba(242, 192, 99, 0.12);

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --gutter: 24px;
  --header-h: 64px;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; min-width: 0; width: 100%; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8cc4ff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--bg); }

.eyebrow {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(34, 48, 77, 0.7);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name small { font-weight: 500; color: var(--muted); }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s ease, background-color .15s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px; font-size: 17px; }
  /* Without JavaScript the toggle can't work, so keep the links visible. */
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { display: block; position: static; padding: 0; border: 0; background: none; }
  .no-js .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; }
  .no-js .site-nav a { padding: 6px 10px; font-size: 15px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--violet); color: #0b0820; }
.btn-primary:hover { background: #a194ff; color: #0b0820; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue); color: var(--text); background: var(--blue-soft); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(139, 124, 246, 0.16), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); letter-spacing: -0.035em; line-height: 1.02; font-weight: 800; }
.hero h1 .accent { color: var(--violet); }
.hero-lede { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 34em; margin: 22px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Release board: the signature element. Every row is real store status. */
.board {
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 8px 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.board-head, .board-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px 92px; align-items: center; gap: 8px;
  padding: 10px 14px;
}
.board-head { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding-top: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.board-head span:not(:first-child), .board-row .state { text-align: center; justify-self: center; }
.board-row { border-radius: 12px; color: var(--text); text-decoration: none; transition: background-color .15s ease; }
.board-row:hover { background: var(--surface-hover); color: var(--text); }
.board-app { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board-app img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.board-app span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-app small { display: block; font: 400 12px/1.3 var(--mono); color: var(--faint); }
.board-foot { font: 400 12px/1.5 var(--mono); color: var(--faint); padding: 10px 14px 0; margin: 0; }

.state { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.state-live { color: var(--blue); }
.state-live::before { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.state-soon { color: var(--violet); }
.state-soon::before { border: 1.5px solid var(--violet); }
.state-none { color: var(--faint); }
.state-none::before { background: var(--line-strong); }

/* ---------- Sections ---------- */

.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; }
.section-head p { color: var(--muted); max-width: 30em; margin: 0; }

/* ---------- App cards ---------- */

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }

.app-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.app-card:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: translateY(-2px); }
.app-card:target { border-color: var(--violet); }

.app-card-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.app-card h3 { font-size: 1.3rem; letter-spacing: -0.015em; }
.app-card-head .meta { font: 400 12px/1.4 var(--mono); color: var(--faint); margin: 4px 0 0; letter-spacing: 0.02em; }
.app-desc { color: var(--muted); font-size: 16px; margin-bottom: 22px; }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; margin-bottom: 20px; }
.store-badge { display: inline-block; border-radius: 9px; line-height: 0; transition: transform .15s ease; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge img { height: 40px; width: auto; }
/* The Google badge PNG carries its own clear space; trim it so both badges look equal. */
.store-badge.google img { height: 58px; margin: -9px -8px; }
.store-pending {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 40px; padding: 4px 12px;
  border: 1px dashed var(--line-strong); border-radius: 9px;
  font: 400 11px/1.35 var(--mono); color: var(--muted);
}
.store-pending strong { font: 600 13px/1.3 var(--font); color: var(--text); letter-spacing: 0; }

.app-links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.app-links a { color: var(--muted); text-decoration: none; }
.app-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.about-copy p { color: var(--muted); font-size: 18px; }
.about-copy p:first-child { color: var(--text); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.01em; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 16px; }
.facts strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* ---------- Support ---------- */

.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h3 { font-size: 1.2rem; margin-bottom: 12px; }
.panel p, .panel li { color: var(--muted); }
.panel ol, .panel ul { padding-left: 20px; margin: 0 0 1em; }
.panel li { margin-bottom: 6px; }
.contact-email { display: inline-block; font: 600 clamp(1.1rem, 2.4vw, 1.4rem)/1.3 var(--font); word-break: break-all; margin: 4px 0 18px; }
.support-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; }
.support-list a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; transition: border-color .15s ease, background-color .15s ease;
}
.support-list a:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.support-list img { width: 32px; height: 32px; border-radius: 8px; }
.support-list .arrow { margin-left: auto; color: var(--faint); }
.checklist { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.checklist li { position: relative; padding-left: 22px; font-size: 15px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 2px; background: var(--violet); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 32px; color: var(--faint); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer h2 { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-brand p { margin: 10px 0 0; max-width: 24em; }
.footer-legal-app { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-legal-app span { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer.compact .footer-bottom { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Document pages (privacy, EULA, support) ---------- */

.doc { max-width: 780px; margin: 0 auto; padding: 48px var(--gutter) 72px; }
.crumbs { font: 400 13px/1.4 var(--mono); color: var(--faint); margin: 0 0 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

.doc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 20px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-head .app-icon { width: 72px; height: 72px; border-radius: 17px; grid-row: span 2; }
.doc-head .eyebrow { margin: 0; align-self: end; }
.doc-head h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); letter-spacing: -0.03em; align-self: start; }
.doc-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; font: 400 13px/1.5 var(--mono); color: var(--muted); }

.doc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 8px; padding: 0; list-style: none; }
.doc-tabs a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.doc-tabs a:hover { color: var(--text); border-color: var(--line-strong); }
.doc-tabs a[aria-current="page"] { color: var(--text); background: var(--violet-soft); border-color: var(--violet); }
.lang-switch { margin-left: auto; }

.prose { padding-top: 16px; }
.prose > section { padding-top: 24px; }
.prose > section + section { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 48px; }
.prose h2 { font-size: 1.6rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.15rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.prose p, .prose li { color: #c9cfdd; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose em { color: var(--text); font-style: normal; }
.prose .meta { font: 400 13px/1.5 var(--mono); color: var(--muted); margin: 0 0 20px; }
.prose .soft { color: var(--muted); }
.prose .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0; }
.prose .card p { margin: 4px 0 0; }
.prose hr { display: none; }
.prose .faq dt { font-weight: 600; color: var(--text); margin-top: 22px; }
.prose .faq dd { margin: 6px 0 0; color: #c9cfdd; }

.callout { border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0; border: 1px solid var(--line); background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }
.callout-draft { border-color: rgba(242, 192, 99, 0.45); background: var(--amber-soft); }
.callout-draft strong { color: var(--amber); }
.callout-info { border-color: rgba(90, 169, 255, 0.4); background: var(--blue-soft); }

.needs-confirm {
  display: inline-block; vertical-align: 0.1em;
  font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(242, 192, 99, 0.5); border-radius: 6px; padding: 0 6px;
}

.store-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }

.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 200px); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; margin: 16px 0 8px; scroll-snap-type: x mandatory; }
.shots img { border-radius: 16px; border: 1px solid var(--line); scroll-snap-align: start; width: 100%; height: auto; }

/* ---------- 404 ---------- */

.not-found { max-width: 640px; margin: 0 auto; padding: 120px var(--gutter); }
.not-found h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; margin-bottom: 16px; }
.not-found p { color: var(--muted); font-size: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap, .about-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 64px 0; }
  .support-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 22px; }
  .app-card { padding: 20px; }
  .checklist { grid-template-columns: 1fr; }
  .doc { padding-top: 32px; }
  .doc-head .app-icon { width: 56px; height: 56px; border-radius: 13px; }
  .lang-switch { margin-left: 0; }
}
@media (max-width: 420px) {
  .board-head, .board-row { grid-template-columns: minmax(0, 1fr) 58px 58px; padding-left: 10px; padding-right: 10px; }
  .state { font-size: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .app-card:hover, .store-badge:hover { transform: none; }
}

.panel .panel-gap { margin-top: 28px; }
.footer-legal { grid-column: span 2; }
@media (max-width: 420px) { .footer-legal { grid-column: auto; } }
.prose > section > h3:first-child, .prose > .callout + section > h3:first-child { margin-top: 8px; }
