/* SoftwarePlus.ai — one stylesheet for every page.
   Each program page sets --c (its icon colour) on <body>; everything else is shared. */

:root {
  --paper: #eef1f4;
  --surface: #ffffff;
  --ink: #16202e;
  --muted: #4a5566;
  --rule: #cfd6de;
  --link: #1f5fa8;
  --c: #2b3a55;          /* program colour; overridden per page */
  --on-c: #ffffff;
  --radius-tile: 22%;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121822; --surface: #1a2230; --ink: #e7ebf0; --muted: #a8b2c0;
    --rule: #2e3848; --link: #8ab8ec; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121822; --surface: #1a2230; --ink: #e7ebf0; --muted: #a8b2c0;
  --rule: #2e3848; --link: #8ab8ec; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header / footer ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 1.6rem; line-height: 1; padding-bottom: 3px; }
.brand-dot { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 72px; padding: 32px 0 48px; color: var(--muted); font-size: 0.95rem; }
.site-foot .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot h2 { font-size: 1rem; color: var(--ink); margin-bottom: 0.4em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0.25em 0; }

/* ---------- home: hero with the plus of icons ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.plus {
  --t: clamp(56px, 9vw, 104px);   /* tile size */
  --g: clamp(8px, 1.2vw, 14px);   /* gap */
  display: grid;
  grid-template-columns: repeat(4, var(--t));
  grid-template-rows: repeat(4, var(--t));
  gap: var(--g);
  justify-content: center;
  margin: 0; padding: 0; list-style: none;
}
/* 4x4 grid; the plus is the middle two columns and middle two rows (12 cells) */
.plus li { position: relative; }
.plus a, .plus span.slot { display: block; width: 100%; height: 100%; border-radius: var(--radius-tile); overflow: hidden; }
.plus a img { width: 100%; height: 100%; object-fit: cover; }
.plus a:hover img { filter: brightness(1.08); }
.plus a:focus-visible { outline-offset: 4px; }
.plus span.slot { border: 2px dashed var(--rule); }
/* a program with no icon yet: its name on its colour */
.tile-text { display: grid !important; place-items: center; background: var(--c); color: #fff; font-weight: 800; text-align: center; line-height: 1.05; font-size: clamp(0.62rem, 1.1vw, 0.9rem); padding: 6px; text-decoration: none; }
.program .tile-text { width: 72px; height: 72px; border-radius: var(--radius-tile); grid-row: span 2; font-size: 0.72rem; }
.band .tile-text { width: clamp(96px, 16vw, 168px); aspect-ratio: 1; border-radius: var(--radius-tile); background: rgba(255,255,255,.16); font-size: clamp(1rem, 2vw, 1.4rem); }
.plus .n1  { grid-area: 1 / 2; } .plus .n2  { grid-area: 1 / 3; }
.plus .n3  { grid-area: 2 / 1; } .plus .n4  { grid-area: 2 / 2; } .plus .n5  { grid-area: 2 / 3; } .plus .n6  { grid-area: 2 / 4; }
.plus .n7  { grid-area: 3 / 1; } .plus .n8  { grid-area: 3 / 2; } .plus .n9  { grid-area: 3 / 3; } .plus .n10 { grid-area: 3 / 4; }
.plus .n11 { grid-area: 4 / 2; } .plus .n12 { grid-area: 4 / 3; }
.plus-caption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .plus li { animation: settle 520ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes settle { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn:hover { text-decoration: underline; }
.store-badge img { height: 56px; width: auto; }

/* ---------- home: programs grouped by what they are for ---------- */
.group { padding: 40px 0 8px; border-top: 1px solid var(--rule); }
.group-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 48px; }
.group-head p { color: var(--muted); max-width: 34ch; }
.programs { list-style: none; margin: 0; padding: 0; }
.program { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.program:last-child { border-bottom: 0; }
.program img { width: 72px; height: 72px; border-radius: var(--radius-tile); grid-row: span 2; }
.program h3 { margin: 0; font-size: 1.3rem; }
.program h3 a { color: var(--ink); text-decoration: none; }
.program h3 a:hover { text-decoration: underline; }
.program h3 a::after { content: ""; position: absolute; inset: 0; } /* whole row is the link */
.program { position: relative; }
.program p { margin: 0; color: var(--muted); grid-column: 2; }
.program .status { grid-column: 3; grid-row: 1 / span 2; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.status-live { color: #1f7a45; }
.status-soon { color: var(--muted); }
:root[data-theme="dark"] .status-live { color: #6fd39a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status-live { color: #6fd39a; } }

/* ---------- about Dr. Ron ---------- */
.about { padding: 56px 0 0; border-top: 1px solid var(--rule); }
.about .wrap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: start; }
.about img { width: 160px; height: 160px; border-radius: 24px; object-fit: cover; }

/* ---------- program pages ---------- */
.band { background: var(--c); color: var(--on-c); padding: clamp(36px, 7vw, 80px) 0; }
.band .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 40px; align-items: center; }
.band img.icon { width: clamp(96px, 16vw, 168px); height: auto; border-radius: var(--radius-tile); box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.band h1 { margin-bottom: 0.2em; }
.band .tagline { font-size: clamp(1.1rem, 2.2vw, 1.4rem); max-width: 44ch; margin: 0; }
.band .facts { margin: 18px 0 0; display: flex; gap: 8px 24px; flex-wrap: wrap; font-weight: 700; }
.band a { color: var(--on-c); }
.crumb { font-size: 0.95rem; margin-bottom: 14px; }
.crumb a { color: inherit; }

.page-body { padding-top: 48px; }
.page-body .wrap > section { padding: 28px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 12px 48px; }
.page-body .wrap > section:last-child { border-bottom: 0; }
.page-body h2 { font-size: 1.35rem; }
.features { margin: 0; padding: 0; list-style: none; }
.features li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px dashed var(--rule); }
.features li:last-child { border-bottom: 0; }
.features li::before { content: "+"; position: absolute; left: 4px; top: 6px; font-weight: 800; font-size: 1.3rem; color: var(--c); }
:root[data-theme="dark"] .features li::before { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .features li::before { color: var(--ink); } }
.shots { display: grid; gap: 24px; }
.shots figure { margin: 0; }
.shots img { border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); }
.shots figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.note { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 18px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero .wrap, .group-head, .page-body .wrap > section { grid-template-columns: minmax(0, 1fr); }
  .about .wrap { grid-template-columns: minmax(0, 1fr); }
  .about img { width: 120px; height: 120px; }
}
@media (max-width: 560px) {
  .program { grid-template-columns: 56px minmax(0, 1fr); }
  .program img { width: 56px; height: 56px; }
  .program .status { grid-column: 2; grid-row: auto; }
  .band .wrap { grid-template-columns: minmax(0, 1fr); }
  .plus { --t: 64px; --g: 8px; }
}
@media (max-width: 560px) {
  .program .tile-text { width: 56px; height: 56px; font-size: 0.6rem; }
}

/* ---------- other projects ---------- */
.hero-small { padding: clamp(32px, 6vw, 64px) 0 clamp(8px, 2vw, 16px); }
.hero-small .wrap { grid-template-columns: minmax(0, 1fr); }
.hero-small h1 { max-width: none; }
.shots-phone { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 680px; }
@media (max-width: 560px) { .shots-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shots-phone img { border-radius: 18px; }
.play-badge img { height: 80px; width: auto; margin-left: -12px; } /* Google's badge has its own padding */
.more-link { margin: 18px 0 0; font-weight: 700; }
