/* MND Apps hub site. The hub itself is neutral (paper / ink) so each app card can wear its own app's colours. */
:root {
  --bg: #f6f4ef;
  --bg-alt: #eeebe3;
  --surface: #ffffff;
  --text: #14161a;
  --text-dim: #5d6168;
  --line: #dcd8cd;
  --accent: #14161a;
  --on-accent: #f6f4ef;
  --radius: 28px;
  --max: 1160px;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e10;
    --bg-alt: #141518;
    --surface: #1a1c20;
    --text: #f2f1ec;
    --text-dim: #a0a3a9;
    --line: #2b2e33;
    --accent: #f2f1ec;
    --on-accent: #0d0e10;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand b { font-weight: 500; margin-left: 4px; color: var(--text-dim); }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--text-dim); }
.nav a:hover { color: var(--text); }
@media (max-width: 560px) { .hide-sm { display: none; } .nav { gap: 18px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-line { border: 1.5px solid var(--line); }
.btn-line:hover { border-color: var(--text); }
.btn.big { min-height: 58px; padding: 0 28px; font-size: 1.05rem; overflow-wrap: anywhere; }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #b8d600, #16a34a 50%, #c99a3e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.2rem; color: var(--text-dim); margin-top: 22px; max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-icons { position: relative; height: 340px; }
.hero-icons img {
  position: absolute; width: 168px; height: 168px; border-radius: 38px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
}
.hero-icons .i1 { left: 0; top: 10px; transform: rotate(-8deg); }
.hero-icons .i2 { right: 0; top: 60px; transform: rotate(7deg); }
.hero-icons .i3 { left: 26%; bottom: 0; transform: rotate(-2deg); }
@media (prefers-reduced-motion: no-preference) {
  .hero-icons img { animation: float 7s ease-in-out infinite; }
  .hero-icons .i2 { animation-delay: -2.3s; }
  .hero-icons .i3 { animation-delay: -4.6s; }
  @keyframes float { 50% { translate: 0 -8px; } }
}
@media (max-width: 860px) {
  .hero { padding: 56px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-icons { height: 220px; max-width: 360px; width: 100%; margin: 0 auto; }
  .hero-icons img { width: 112px; height: 112px; border-radius: 26px; }
}

/* Section heads */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
.section-head p { color: var(--text-dim); margin-top: 14px; font-size: 1.08rem; }

/* App cards: each one uses its app's own palette, whatever the hub's light/dark mode */
.app-list { display: grid; gap: 24px; }
.app {
  --card-bg: #111; --card-text: #fff; --card-dim: #bbb; --card-accent: #fff; --card-on-accent: #000; --card-line: rgba(255,255,255,.14);
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 32px;
  background: var(--card-bg); color: var(--card-text);
  border-radius: var(--radius); padding: 48px; overflow: hidden; position: relative;
}
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.app-id img { width: 56px; height: 56px; border-radius: 14px; }
.app h3 { font-size: 1.9rem; font-weight: 800; }
.platform { color: var(--card-dim); font-size: .92rem; font-weight: 600; }
.tagline { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; color: var(--card-accent); margin-bottom: 14px; }
.app-copy > p:not(.tagline) { color: var(--card-dim); max-width: 34em; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { border: 1px solid var(--card-line); border-radius: 999px; padding: 5px 13px; font-size: .86rem; font-weight: 600; }
.app-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--card-line); }
.status { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--card-dim); }
.app-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; background: var(--card-accent); color: var(--card-on-accent);
  font-weight: 800; text-decoration: none; font-size: .96rem;
  transition: transform .15s ease;
}
a.app-link:hover { transform: translateX(3px); }
.app-link.is-soon { background: transparent; color: var(--card-dim); border: 1.5px dashed var(--card-line); }
.app-visual { display: flex; justify-content: center; align-items: center; min-height: 360px; position: relative; }

/* Device frames. Cards with devices drop their bottom padding so the phones run off the bottom edge. */
.app.has-devices { padding-bottom: 0; }
.app.has-devices .app-copy { padding-bottom: 48px; }
.devices { align-self: end; height: 480px; width: 100%; max-width: 440px; margin: 0 auto; }
.devices > * { position: absolute; }

.phone {
  width: 248px; padding: 8px; border-radius: 48px;
  background: linear-gradient(145deg, #3b3e42, #16181a 30%, #0c0d0e);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 1px rgba(0,0,0,.6), 0 50px 70px -30px rgba(0,0,0,.65);
}
.phone::before { /* Dynamic Island */
  content: ""; position: absolute; z-index: 1; left: 50%; top: 18px; transform: translateX(-50%);
  width: 29%; height: 23px; border-radius: 999px; background: #000;
}
.phone img { width: 100%; height: auto; border-radius: 40px; background: #000; }

.watch {
  width: 196px; padding: 13px; border-radius: 54px;
  background: linear-gradient(150deg, #4a4d50, #1d1f21 35%, #0a0b0b);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 0 1px rgba(0,0,0,.7), 0 40px 60px -24px rgba(0,0,0,.8);
}
.watch::before, .watch::after { content: ""; position: absolute; right: -6px; border-radius: 4px; background: linear-gradient(90deg, #2b2d2f, #55585b); }
.watch::before { top: 24%; width: 8px; height: 40px; } /* Digital Crown */
.watch::after { top: 52%; width: 5px; height: 48px; right: -4px; } /* side button */
.watch img { width: 100%; height: auto; border-radius: 42px; background: #000; }

.app-love40 .phone { left: 4%; top: 36px; }
.app-love40 .watch { right: 2%; top: 170px; z-index: 2; }
.app-rally .phone.back { left: 2%; top: 74px; transform: rotate(-7deg); }
.app-rally .phone.front { right: 4%; top: 30px; transform: rotate(3deg); z-index: 2; }

.mark { width: 220px; height: auto; filter: drop-shadow(0 24px 30px rgba(14, 52, 96, .18)); }

/* App themes */
.app-love40 {
  --card-bg: #050605; --card-text: #f5f7f0; --card-dim: #a3a898; --card-accent: #d7ff00; --card-on-accent: #0d0f00; --card-line: #2a2e27;
  background: radial-gradient(90% 80% at 80% 70%, #232c04 0%, #050605 65%);
}
.app-rally {
  --card-bg: #0b5d2e; --card-text: #ffffff; --card-dim: #cfe6d6; --card-accent: #dfff4f; --card-on-accent: #1a2a10; --card-line: rgba(255,255,255,.22);
  background: radial-gradient(80% 70% at 78% 60%, #13803f 0%, transparent 70%), linear-gradient(160deg, #0b5d2e, #014725);
}
.app-cor {
  --card-bg: #faf7f1; --card-text: #0e3460; --card-dim: #4a5a6e; --card-accent: #0e3460; --card-on-accent: #faf7f1; --card-line: #e3dccd;
  background: linear-gradient(135deg, #faf7f1 55%, #f3ead8);
  box-shadow: inset 0 0 0 1px #e8e1d2;
}
.app-cor .tagline { color: #0e3460; }
.app-cor .tagline::after { content: ""; display: block; width: 64px; height: 5px; border-radius: 3px; background: #e0b771; margin-top: 12px; }
.app-cor .status { color: #8a6420; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 32px 22px; gap: 8px; }
  .app.has-devices .app-copy { padding-bottom: 0; }
  .app-visual { min-height: 0; padding-top: 24px; }
  .devices { height: 360px; max-width: 340px; margin-top: 16px; }
  .phone { width: 196px; padding: 7px; border-radius: 38px; }
  .phone::before { top: 14px; height: 18px; }
  .phone img { border-radius: 31px; }
  .watch { width: 150px; padding: 10px; border-radius: 42px; }
  .watch img { border-radius: 33px; }
  .watch::before { height: 30px; } .watch::after { height: 36px; }
  .app-love40 .phone { left: 0; top: 20px; }
  .app-love40 .watch { right: 2%; top: 120px; }
  .app-rally .phone.back { left: 0; top: 50px; }
  .app-rally .phone.front { right: 0; top: 16px; }
  .mark { width: 150px; }
}

/* Principles */
.how { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.principle .num { font-family: var(--font-display); font-weight: 800; color: var(--text-dim); font-size: .95rem; }
.principle h3 { font-size: 1.3rem; font-weight: 700; margin: 14px 0 10px; }
.principle p { color: var(--text-dim); font-size: .98rem; }
@media (max-width: 960px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* Contact */
.contact-card {
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; background: var(--surface);
}
.contact-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.contact-card p { color: var(--text-dim); margin-top: 12px; max-width: 36em; }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; padding: 28px 22px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; }
.foot-grid .brand { margin-bottom: 8px; }
.foot-grid nav { display: flex; flex-direction: column; gap: 6px; }
.foot-grid h4 { font-size: 1rem; margin-bottom: 6px; }
.foot-grid nav a { color: var(--text-dim); text-decoration: none; }
.foot-grid nav a:hover { color: var(--text); text-decoration: underline; }
.legal { color: var(--text-dim); font-size: .8rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: clamp(3rem, 10vw, 6rem); font-weight: 800; }
.notfound p { color: var(--text-dim); margin: 14px 0 28px; }
