/* MacTidy site styles.
   Tokens come straight from brand/GUIDELINES.md section 3. Azure is the only
   brand blue that may carry white text (5.2:1); Sky fails AA at 2.8:1, so it is
   for graphics and glows only. Shadows are #0A2E63, never black. */

:root {
  --sky-bright: #8CF2FF;
  --sky: #22A0FF;
  --azure: #0A66E8;
  --deep: #083CB4;
  --navy: #05236C;
  --glass: #EAF8FF;
  --band: #3FA6EE;
  --shadow: #0A2E63;
  --ink: #0B0D18;
  --mist: #C7D0EA;

  --success: #4CD787;
  --warning: #FF9A38;
  --danger: #FF5A5A;

  --bg: var(--ink);
  --surface: #12162a;
  --surface-2: #171c33;
  --line: rgba(199, 208, 234, 0.14);
  --text: #F2F5FF;
  --text-dim: var(--mist);

  /* System stack on purpose. The brand's web faces are Nunito and Public Sans,
     but loading them from Google would send every visitor's IP to a third party
     on a site whose whole argument is that nothing tracks you. On a Mac,
     ui-rounded resolves to SF Pro Rounded, which is what the brand is built on
     anyway. Self-host the webfonts if you want them; do not hotlink them. */
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, "Public Sans", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --wrap: 1120px;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

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

/* The brand gradient: diagonal, cyan top right to deep navy bottom left.
   Fixed direction, per the guidelines. Never vertical, never a third hue. */
.grad-bg {
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(34, 160, 255, 0.30), transparent 62%),
    radial-gradient(900px 560px at 6% 8%, rgba(10, 102, 232, 0.24), transparent 60%),
    linear-gradient(160deg, #0d1226 0%, var(--ink) 58%);
}

img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ---------- type ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.14; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-dim); }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;   /* guidelines: uppercase labels get +0.16em */
  font-size: .74rem;
  font-weight: 700;
  color: var(--sky);
  margin: 0 0 .9rem;
}
.dim { color: var(--text-dim); }
.mono { font-family: var(--font-mono); font-size: .92em; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(14px);
  background: rgba(11, 13, 24, 0.82);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text-dim); font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: .98rem; font-family: var(--font-body);
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--azure); color: #fff; box-shadow: 0 10px 26px -10px var(--shadow); }
.btn-primary:hover { background: var(--deep); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: rgba(199,208,234,.34); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- layout blocks ---------- */

section { padding: clamp(52px, 8vw, 96px) 0; }
.section-sm { padding: clamp(36px, 5vw, 60px) 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.split { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.wide-right { grid-template-columns: 0.85fr 1.15fr; } }

/* ---------- screenshots ---------- */

.shot {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -32px var(--shadow);
  overflow: hidden;
  background: var(--surface);
}
/* Screenshots are tall app screens. Show the top and crop the rest rather than
   squashing them. */
.shot.crop { height: clamp(320px, 46vw, 520px); }
.shot.crop img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--text-dim); margin-top: .7rem; }

/* ---------- misc ---------- */

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .72rem; border-radius: 999px;
  background: rgba(34,160,255,.13); border: 1px solid rgba(34,160,255,.3);
  color: var(--sky-bright); font-size: .8rem; font-weight: 600;
}
.pill.warn { background: rgba(255,154,56,.13); border-color: rgba(255,154,56,.34); color: var(--warning); }
.pill.ok { background: rgba(76,215,135,.13); border-color: rgba(76,215,135,.32); color: var(--success); }

ul.ticks, ul.crosses { list-style: none; padding: 0; margin: 0 0 1.1em; }
ul.ticks li, ul.crosses li { padding-left: 1.9rem; position: relative; margin-bottom: .6rem; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
ul.crosses li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 800; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
th, td { text-align: left; padding: .72rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--text); }
td { color: var(--text-dim); }

.note {
  border-left: 3px solid var(--azure);
  background: rgba(10,102,232,.08);
  padding: 16px 20px; border-radius: 0 12px 12px 0;
}
.note.warn { border-left-color: var(--warning); background: rgba(255,154,56,.08); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 58px; margin-bottom: 28px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--azure); color: #fff;
  font-family: var(--font-display); font-weight: 800;
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 46px 0 60px; color: var(--text-dim); font-size: .92rem; }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text); margin-bottom: .9rem; font-family: var(--font-body); }
.site-footer a { color: var(--text-dim); display: block; margin-bottom: .45rem; }
.site-footer a:hover { color: var(--text); }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 34px; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 22px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- legal documents ---------- */

.doc { max-width: 780px; }
.doc h2 { margin-top: 2.2em; font-size: 1.5rem; }
.doc h3 { margin-top: 1.6em; font-size: 1.12rem; }
.doc li { margin-bottom: .5rem; }
.doc table { font-size: .9rem; }
.doc-meta { font-size: .9rem; color: var(--text-dim); border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; margin-bottom: 2rem; }
.placeholder {
  background: rgba(255,154,56,.16);
  border-bottom: 1px dashed var(--warning);
  color: #ffd9ab; padding: 0 .28rem; border-radius: 3px;
  font-family: var(--font-mono); font-size: .88em;
}
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: var(--text-dim); }

@media (max-width: 760px) {
  /* One scrollable row rather than three wrapped ones. Six links and a button
     wrapped to 300px of header on a phone, which is most of the first screen
     before any of the page showed up. */
  .site-header .wrap { min-height: 56px; gap: 12px; }
  .brand { flex: 0 0 auto; }
  .nav {
    flex: 1 1 auto;
    min-width: 0;            /* without this the row refuses to shrink and the
                                links ride over the wordmark */
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    margin-left: 0;
    justify-content: flex-start;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: .88rem; white-space: nowrap; }
  .nav .btn { padding: .52rem 1rem; font-size: .88rem; }
  .brand { font-size: 1.02rem; }
  .brand img { width: 26px; height: 26px; }
}
