/* Pymble Software - site styles. Colours are tokens so light/dark is one switch. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2330;
  --muted: #5b6676;
  --line: #dfe3ea;
  --brand: #124989;          /* the original site's blue */
  --brand-strong: #0d3768;
  --accent: #e8a33d;
  --on-brand: #ffffff;
  --banner: linear-gradient(120deg, #0d3768 0%, #124989 55%, #2a6fb8 100%);
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --surface: #171e28;
    --text: #e6eaf0;
    --muted: #9aa5b4;
    --line: #2a3442;
    --brand: #6ea8ec;
    --brand-strong: #9cc4f3;
    --on-brand: #0f141b;
    --banner: linear-gradient(120deg, #081a31 0%, #0d2c52 55%, #16457c 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b;
  --surface: #171e28;
  --text: #e6eaf0;
  --muted: #9aa5b4;
  --line: #2a3442;
  --brand: #6ea8ec;
  --brand-strong: #9cc4f3;
  --on-brand: #0f141b;
  --banner: linear-gradient(120deg, #081a31 0%, #0d2c52 55%, #16457c 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* Header: logo + banner + theme switch */
.banner {
  background: var(--banner);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.banner.has-image {
  /* darken the left side so the logo text stays readable over the photo */
  background-image: linear-gradient(90deg, rgba(5, 18, 38, .82) 0%, rgba(5, 18, 38, .45) 45%, rgba(5, 18, 38, .15) 100%), var(--banner-image);
  background-position: center 45%;
}
.banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 120px; }
.banner.has-image .banner-inner { min-height: 190px; }
.logo-text { text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.logo { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo img { max-height: 80px; width: auto; }
.logo-mark {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 14px;
  background: #fff; color: #124989; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em;
  overflow: hidden; flex: none;
}
.logo-mark img { width: 100%; height: 100%; display: block; }
.banner.has-image .logo-mark { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.banner.has-image .logo-text { font-size: 1.9rem; }
.logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }

.theme-switch { display: flex; gap: .4rem; }
.theme-switch button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .55); background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, .22); border-color: #fff; }
.theme-switch svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-switch button[data-set-theme="dark"] svg { fill: currentColor; stroke: none; }

/* Menu */
.menu { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.menu ul { list-style: none; margin: 0; padding: 0; }
#menu-list { display: flex; gap: .25rem; }
#menu-list > li { position: relative; }
#menu-list > li > a {
  display: block; padding: .9rem 1rem; color: var(--text); text-decoration: none; font-weight: 600;
  border-bottom: 3px solid transparent;
}
#menu-list > li > a:hover, #menu-list > li.current > a { color: var(--brand); border-bottom-color: var(--brand); }
.sub {
  position: absolute; left: 0; top: 100%; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow); padding: .4rem 0; display: none;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { display: block; padding: .45rem 1rem; color: var(--text); text-decoration: none; }
.sub a:hover { background: var(--bg); color: var(--brand); }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .banner-inner, .banner.has-image .banner-inner { min-height: 110px; }
  .banner.has-image .logo-mark { width: 52px; height: 52px; border-radius: 12px; }
  .banner.has-image .logo-text { font-size: 1.2rem; }
  .logo-mark { width: 44px; height: 44px; font-size: 1.05rem; }
  .logo-text { font-size: 1.15rem; }
  .menu-toggle {
    display: block; margin: .5rem 0; padding: .5rem .9rem; font: inherit; font-weight: 600;
    background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  #menu-list { display: none; flex-direction: column; padding-bottom: .5rem; }
  .menu.open #menu-list { display: flex; }
  #menu-list > li > a { padding: .6rem 0; border-bottom: 0; }
  .sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 .4rem .9rem; min-width: 0; background: transparent; }
  .sub a { padding: .3rem 0; color: var(--muted); }
}

/* Page content */
main { padding: 2rem 16px 3rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card h3 a { text-decoration: none; }
.button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--brand); color: var(--on-brand); border: 0;
}
.button:hover { background: var(--brand-strong); color: var(--on-brand); }
.button.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.button.ghost:hover { background: var(--brand); color: var(--on-brand); }
.notice { border-left: 4px solid var(--accent); background: var(--surface); padding: .8rem 1rem; border-radius: 6px; }

/* Apps */
.platform { margin-top: 2.5rem; }
.platform h2 { display: flex; align-items: baseline; gap: .6rem; border-bottom: 2px solid var(--line); padding-bottom: .4rem; }
.platform h2 small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.app-list { list-style: none; padding: 0; margin: 0; }
.app {
  display: grid; align-items: center; gap: 1rem 1.25rem;
  grid-template-columns: 72px 1fr auto auto;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.app-icon img { width: 72px; height: 72px; border-radius: 16px; display: block; box-shadow: var(--shadow); }
.app-name { font-weight: 700; font-size: 1.05rem; margin: 0; }
.app-name a { color: var(--text); text-decoration: none; }
.app-name a:hover { color: var(--brand); }
.app-blurb { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }
.app-links { display: flex; gap: .9rem; font-size: .95rem; }
.app-store { justify-self: end; }
.store-badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 10px;
  background: #000; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap;
  border: 1px solid #555;
}
.store-badge:hover { color: #fff; background: #222; }
.store-badge svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 720px) {
  .app { grid-template-columns: 56px 1fr; align-items: start; }
  .app-icon img { width: 56px; height: 56px; border-radius: 13px; }
  .app-links, .app-store { grid-column: 2; justify-self: start; }
}

/* Books */
.book { display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem; align-items: start; }
.book-cover {
  width: 140px; aspect-ratio: 3 / 4; border-radius: 6px; background: var(--banner); color: #fff;
  display: grid; place-items: center; text-align: center; padding: .75rem; font-weight: 700; box-shadow: var(--shadow);
}
.book-cover img { border-radius: 6px; }
.book .links { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 560px) { .book { grid-template-columns: 1fr; } }

/* Steps (consulting) */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-weight: 700; margin-bottom: .5rem;
}
.calendly-inline-widget { min-width: 300px; height: 700px; border-radius: var(--radius); overflow: hidden; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; padding: 1.5rem 0; }
.site-footer p { margin: .2rem 0; }

/* App support pages */
.crumbs { margin: 0 0 1rem; font-size: .95rem; }
.crumbs a { text-decoration: none; }
.app-hero { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.app-hero-icon { width: 112px; height: 112px; border-radius: 24px; box-shadow: var(--shadow); flex: none; }
.app-hero h1 { margin-bottom: .25rem; }
.app-hero .lede { margin-bottom: .9rem; }
.app-hero .links { display: flex; flex-wrap: wrap; gap: .5rem; }
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.2rem; }
.video { position: relative; max-width: 720px; aspect-ratio: 16 / 9; margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 560px) {
  .app-hero { flex-direction: column; align-items: flex-start; }
  .app-hero-icon { width: 88px; height: 88px; border-radius: 20px; }
}
.app-meta { margin: .6rem 0 0; font-size: .9rem; }
.prose h3 { margin-top: 1.4rem; }
.prose h3.caps { font-size: .85rem; letter-spacing: .08em; color: var(--brand); margin-bottom: .3rem; }
