/* The Agentic Apple — project site. No framework, no external requests. */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --link: #0066cc;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --warn: #e98300;
  --crit: #e5281f;
  --code-bg: #f5f5f7;
  --track: rgba(0, 0, 0, 0.12);

  /* the faux desktop */
  --wall: radial-gradient(120% 90% at 12% 8%, #ffd9c2 0%, transparent 55%),
          radial-gradient(90% 80% at 92% 18%, #c9dcff 0%, transparent 60%),
          radial-gradient(110% 90% at 60% 110%, #e3d4ff 0%, transparent 60%),
          linear-gradient(160deg, #f6efe9, #e9eefb);
  --bar-bg: rgba(255, 255, 255, 0.5);
  --bar-fg: #1d1d1f;
  --bar-pressed: rgba(0, 0, 0, 0.1);
  --meter-track: rgba(0, 0, 0, 0.2);
  --panel-bg: rgba(246, 246, 248, 0.82);
  --panel-line: rgba(0, 0, 0, 0.08);
  --panel-edge: rgba(0, 0, 0, 0.12);
  --switch-on: #34c759;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gutter: 16px;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --surface: #161618;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, 0.12);
    --link: #2997ff;
    --accent: #0071e3;
    --accent-text: #ffffff;
    --warn: #ff9f0a;
    --crit: #ff453a;
    --code-bg: #161618;
    --track: rgba(255, 255, 255, 0.16);

    --wall: radial-gradient(120% 90% at 10% 0%, #3a2a5a 0%, transparent 55%),
            radial-gradient(90% 80% at 95% 15%, #123a5c 0%, transparent 60%),
            radial-gradient(110% 90% at 55% 115%, #4a2440 0%, transparent 60%),
            linear-gradient(160deg, #141225, #0b1220);
    --bar-bg: rgba(20, 20, 24, 0.42);
    --bar-fg: #f5f5f7;
    --bar-pressed: rgba(255, 255, 255, 0.2);
    --meter-track: rgba(255, 255, 255, 0.28);
    --panel-bg: rgba(38, 38, 42, 0.8);
    --panel-line: rgba(255, 255, 255, 0.09);
    --panel-edge: rgba(255, 255, 255, 0.16);
    --switch-on: #30d158;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.35em; overflow-wrap: anywhere; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 760px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 5px; }
.site-nav nav { display: flex; gap: 22px; font-size: 13px; }
.site-nav nav a { color: var(--text-2); }
.site-nav nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; }
.eyebrow { color: var(--text-2); font-size: 15px; font-weight: 500; margin-bottom: 10px; }
.hero h1 { font-size: clamp(40px, 8vw, 80px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
.pitch { font-size: clamp(19px, 2.6vw, 26px); color: var(--text-2); line-height: 1.3; margin: 16px auto 28px; max-width: 30ch; letter-spacing: -0.01em; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 52px; }
.btn { display: inline-flex; align-items: center; gap: 4px; font-size: 17px; border-radius: 980px; }
.btn-primary { background: var(--accent); color: var(--accent-text); padding: 10px 22px; font-weight: 500; }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
.btn-link { color: var(--link); }

.caption { font-size: 13px; color: var(--text-3); margin: 14px auto 0; max-width: 60ch; }

/* ---------- faux desktop + menu bar ---------- */
.desktop {
  --mk: 17px;           /* mark height */
  --mw: 19px;           /* meter width */
  --mh: 3px;            /* meter height */
  position: relative;
  height: 560px;
  border-radius: var(--radius);
  background: var(--wall);
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);
}
.menubar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; padding: 0 10px 0 16px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  color: var(--bar-fg);
  font-size: 14px;
  white-space: nowrap;
  box-shadow: inset 0 -0.5px 0 var(--panel-line);
}
.mb-left { display: flex; gap: 18px; min-width: 0; overflow: hidden; }
.mb-app { font-weight: 700; }
.mb-right { display: flex; align-items: center; gap: 14px; height: 100%; }
.mb-ico { width: 18px; height: 15px; flex: none; }
.mb-clock { font-variant-numeric: tabular-nums; }

.status-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 26px; padding: 0 9px;
  border-radius: 6px;
  background: var(--bar-pressed);
}
.bi { display: inline-flex; align-items: center; gap: 4px; }

.mk { display: block; height: var(--mk); width: var(--mk); flex: none; color: currentColor; overflow: visible; }
.mk-or { width: calc(var(--mk) * 1.367); }
.mk-oc { width: calc(var(--mk) * 0.8); }

.meters { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: var(--mw); }
.meters i, .bar {
  position: relative; display: block;
  height: var(--mh); border-radius: 99px;
  background: var(--meter-track);
  overflow: hidden;
}
.meters i::after, .bar::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: calc(var(--p) * 1%);
  border-radius: inherit;
  background: currentColor;
}
.meters i.warn::after, .bar.warn::after { background: var(--warn); }
.meters i.crit::after, .bar.crit::after { background: var(--crit); }

/* the popover */
.panel {
  position: absolute; top: calc(100% + 11px); left: 50%;
  width: 330px; margin-left: -165px;
  padding: 14px 16px 30px;
  color: var(--text);
  background: var(--panel-bg);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border: 0.5px solid var(--panel-edge);
  border-radius: 14px;
  box-shadow: 0 22px 60px -12px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent);
}
.panel::before { /* arrow */
  content: ""; position: absolute; top: -6px; left: 50%;
  width: 12px; height: 12px; margin-left: -6px;
  background: inherit; border-left: inherit; border-top: inherit;
  transform: rotate(45deg); border-top-left-radius: 2px;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.panel .mk { --mk: 18px; }
.p-hero { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 0.5px solid var(--panel-line); }
.p-robot { width: 24px; height: 24px; flex: none; }
.p-title { flex: 1; display: flex; flex-direction: column; }
.p-title b { font-size: 14px; font-weight: 600; }
.p-title small, .p-name small { color: var(--text-2); font-size: 11.5px; }
.p-badge { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.p-refresh { width: 15px; height: 15px; color: var(--text-2); }

.p-agent { padding: 12px 0 6px; border-bottom: 0.5px solid var(--panel-line); }
.p-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-head .mk { width: 22px; height: 18px; }
.p-head .mk-oc { width: 22px; height: 16px; }
.p-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.p-name b { font-weight: 600; font-size: 13.5px; }
.p-pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.sw { position: relative; width: 26px; height: 15px; border-radius: 99px; background: var(--track); flex: none; }
.sw.on { background: var(--accent); }
.sw::after { content: ""; position: absolute; top: 1.5px; left: 1.5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw.on::after { left: 12.5px; }
.grip { width: 13px; height: 10px; color: var(--text-3); flex: none; }

.p-limit { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; margin: 0 0 9px; }
.p-limit > span:nth-child(2) { font-weight: 600; font-variant-numeric: tabular-nums; }
.p-limit .bar { --mh: 4px; grid-column: 1 / -1; margin: 4px 0 3px; color: var(--text); }
.p-limit small { grid-column: 1 / -1; color: var(--text-2); font-size: 11.5px; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section h2 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 14px; }
.lede { font-size: 19px; color: var(--text-2); line-height: 1.45; margin-bottom: 28px; }
.lede.center, #features h2 { text-align: center; }
.lede.center { max-width: 34ch; margin-left: auto; margin-right: auto; margin-bottom: 40px; }
.fine { font-size: 13px; color: var(--text-3); margin-top: 14px; }

#features, #privacy { background: var(--bg-alt); }

/* screenshots */
.shots { padding: 24px 0 56px; }
.shots .wrap { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.shot { margin: 0; text-align: center; }
.shot img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; }
.shot-bar img { max-width: min(100%, 520px); }
.shot-panel img { max-width: min(100%, 408px); }
@media (max-width: 640px) { .shot-panel img { max-width: min(100%, 320px); } }
.shot figcaption { font-size: 13px; color: var(--text-3); margin-top: 12px; }

/* install */
.code { margin: 0 0 22px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.copy {
  font: inherit; font-size: 12px; font-weight: 500;
  color: var(--link); background: transparent;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 11px; cursor: pointer; min-height: 26px;
}
.copy:hover { background: var(--surface); }
.copy.done { color: var(--switch-on); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }

.note { margin-top: 36px; padding: 24px 26px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.note h3 { font-size: 19px; margin-bottom: 8px; }
.note p { color: var(--text-2); }
.author { margin: 20px 0 16px; padding: 0 0 0 16px; border-left: 3px solid var(--accent); }
.author p { color: var(--text); font-size: 19px; line-height: 1.4; letter-spacing: -0.01em; margin: 0; }
.sponsor { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.note p:last-child { margin-bottom: 0; }

/* features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 26px 26px 22px; border: 1px solid var(--line); }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 15.5px; margin-bottom: 0.6em; }
.feature p:last-child { margin-bottom: 0; }
.feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 32px; align-items: center; }
.feature-wide h3 { grid-column: 2; }
.feature-wide p { grid-column: 2; }
.feature-wide > .ficon { grid-row: 1 / span 2; }
.marks-row { grid-row: 1 / span 2; display: flex; align-items: center; gap: 18px; --mk: 30px; color: var(--text); }
.thresholds { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; width: 120px; }
.thresholds .bar { --mh: 6px; color: var(--text); background: var(--track); }
.cli { display: flex; flex-wrap: wrap; gap: 6px; }

/* sources table */
.table-wrap { overflow-x: auto; }
.sources { width: 100%; border-collapse: collapse; font-size: 15px; }
.sources th, .sources td { text-align: left; vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.sources thead th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding-top: 0; }
.sources tbody th { white-space: nowrap; font-weight: 600; }
.sources tbody th .mk { --mk: 15px; display: inline-block; vertical-align: -2px; margin-right: 9px; }
.sources td { color: var(--text-2); }
.sources td:last-child { color: var(--text); min-width: 140px; }
.sources th:first-child, .sources td:first-child { padding-left: 0; }

/* privacy */
.privacy { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; }
.privacy dt { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.privacy dd { margin: 0; color: var(--text-2); font-size: 15.5px; }

.origin { padding: 56px 0; text-align: center; color: var(--text-2); }
.origin p { margin: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 12px; color: var(--text-3); background: var(--bg-alt); }
.site-footer p { max-width: 80ch; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.foot-links a { color: var(--text-2); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .mb-menu { display: none; }
  .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-opt { display: none; }
  .hero { padding: 48px 0 28px; }
  .hero-actions { margin-bottom: 36px; }
  .section { padding: 56px 0; }
  .lede { font-size: 17px; }

  .desktop { --mk: 14px; --mw: 14px; --mh: 2.5px; height: 520px; border-radius: 14px; }
  .menubar { padding: 0 8px; font-size: 13px; height: 30px; }
  .mb-left, .mb-ico, .mb-date { display: none; }
  .mb-right { width: 100%; justify-content: flex-end; gap: 6px; }
  .status-item { position: static; gap: 7px; padding: 0 6px; height: 24px; }
  .panel { left: 10px; right: 10px; width: auto; margin-left: 0; top: 40px; max-width: 360px; margin: 0 auto; }
  .panel::before { display: none; }

  .features { grid-template-columns: 1fr; }
  .feature { padding: 22px 20px 20px; }
  .feature-wide { display: block; }
  .marks-row { --mk: 24px; gap: 14px; margin-bottom: 18px; }

  .privacy { grid-template-columns: 1fr; gap: 22px; }
  .note { padding: 20px 18px; }
  .code pre { font-size: 12.5px; padding: 12px 14px; }

  /* table as stacked cards */
  .sources thead { display: none; }
  .sources, .sources tbody, .sources tr, .sources th, .sources td { display: block; }
  .sources tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .sources th, .sources td { border: 0; padding: 0; }
  .sources tbody th { margin-bottom: 4px; }
  .sources td:last-child { margin-top: 6px; font-size: 14px; min-width: 0; }
  .sources td:last-child::before { content: "Windows: "; color: var(--text-3); }
}

/* ---------- additions ---------- */
.ficon { display: block; width: 28px; height: 28px; color: var(--accent); margin-bottom: 14px; }
.thresholds { height: 28px; justify-content: center; margin-bottom: 14px; }
code.path { overflow-wrap: normal; word-break: normal; }

/* panel is clipped inside the desktop and fades out */
.panel { max-height: 520px; overflow: hidden; }

/* a magnified status item in the empty part of the desktop */
.loupe {
  --mk: 24px; --mw: 26px; --mh: 4px;
  position: absolute; left: 36px; top: 50%; transform: translateY(-20%);
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-radius: 22px;
  color: var(--bar-fg);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid var(--panel-edge);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.3);
}
.loupe .bi { gap: 6px; }
.loupe .meters { gap: 3.5px; }
@media (max-width: 1040px) { .loupe { display: none; } }
@media (max-width: 640px) { .panel { max-height: 490px; } }
