/* newi tools: light in light mode, dark in dark mode (follows the system, no toggle). */
:root {
  --bg: #f4f4f6; --bg2: #fafafb; --card: #ffffff; --ink: #121214; --soft: #6c6c74; --line: rgba(0,0,0,.08);
  --pill: #ffffff; --accent: #121214; --on-accent: #ffffff; --blue: #2563eb; --grey: #8a8a93;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0e10; --bg2: #121215; --card: #19191d; --ink: #f3f3f5; --soft: #9c9ca5; --line: rgba(255,255,255,.09);
          --pill: #1c1c20; --accent: #f3f3f5; --on-accent: #0e0e10; --blue: #74a3ff; --grey: #75757e;
          --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.35); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg);
       font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; position: sticky; top: 0; z-index: 10;
       background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.left { display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.markbox { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.back { color: var(--soft); font-size: 14.5px; font-weight: 550; }
.back:hover { color: var(--ink); }
.links { display: flex; gap: 26px; font-size: 15px; }
.links a { color: var(--soft); } .links a:hover, .links a.on { color: var(--ink); }
.cta { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
       font-weight: 600; font-size: 15px; box-shadow: var(--shadow); white-space: nowrap; }

/* type */
.eyebrow { color: var(--soft); font: 600 12.5px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
h1.big { font-size: clamp(44px, 8.6vw, 104px); line-height: .98; letter-spacing: -.055em; font-weight: 800; margin: 22px auto 22px; }
h2 { font-size: clamp(32px, 4.8vw, 54px); letter-spacing: -.045em; line-height: 1.04; margin: 14px 0 14px; font-weight: 780; }
h2 .grey, h1 .grey { color: var(--grey); }
.sub { font-size: clamp(17px, 2vw, 20px); color: var(--soft); max-width: 620px; margin: 0 auto; }
.center { text-align: center; }

/* buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 14px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 999px; background: var(--pill); border: 1px solid var(--line);
       font-weight: 600; font-size: 16px; box-shadow: var(--shadow); transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.dark { background: var(--accent); color: var(--on-accent); border: 0; padding-right: 7px; }
.btn.dark .arrow { width: 38px; height: 38px; border-radius: 999px; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; }
.meta { color: var(--soft); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; }
.meta span + span::before { content: "·"; margin-right: 12px; }

/* screenshots: <picture> picks light or dark from the system */
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.18), 0 8px 20px rgba(0,0,0,.06); }

/* account pills, as in the app */
.accounts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.acct { display: inline-flex; align-items: center; gap: 7px; background: var(--pill); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; }
.acct i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }

/* sections */
section { padding: 120px 0 0; }
.lead { color: var(--soft); font-size: 18px; max-width: 640px; margin: 0 0 32px; }
.center .lead { margin-left: auto; margin-right: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); text-align: left; }
.card h3 { margin: 0 0 6px; font-size: 17.5px; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--soft); font-size: 15px; }
.steps { counter-reset: s; }
.steps h3::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px;
                    background: var(--accent); color: var(--on-accent); font-size: 13px; margin-right: 10px; vertical-align: 1px; }

/* feature tabs */
.tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 5px; border-radius: 999px; background: var(--line); margin: 14px auto 44px; }
.tabs button { border: 0; background: transparent; color: var(--soft); font: inherit; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.feature { display: grid; grid-template-columns: 0.8fr 1.7fr; gap: 48px; align-items: center; text-align: left; }
.feature[hidden] { display: none; }
.feature .q { color: var(--blue); font-weight: 600; margin-bottom: 6px; }
.feature h3 { font-size: 34px; letter-spacing: -.035em; margin: 0 0 14px; line-height: 1.1; }
.feature p { color: var(--soft); font-size: 17px; margin: 0 0 12px; }
.feature ul { padding-left: 18px; color: var(--soft); margin: 0; } .feature li { margin: 4px 0; }
.feature .shot { animation: rise .45s ease both; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; text-align: left; overflow: hidden; }
/* The padding lives on the summary so the whole box toggles, not just the text line. */
summary { font-weight: 600; cursor: pointer; font-size: 16.5px; list-style: none; padding: 18px 22px; display: block; }
summary:hover { background: color-mix(in srgb, var(--line) 35%, transparent); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--soft); font-weight: 400; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-left: 22px; margin-right: 22px; }
details p { color: var(--soft); margin-top: 10px; margin-bottom: 0; }
details[open] > summary { padding-bottom: 8px; }  /* keeps the hover shade above the answer */
details > :last-child:not(summary) { padding-bottom: 18px; }
details a { color: var(--blue); }
.faq { max-width: 820px; margin: 0 auto; }

/* changelog */
.release { padding: 44px 0; border-bottom: 1px solid var(--line); max-width: 860px; margin: 0 auto; }
.release h2 { font-size: 42px; margin: 0; display: inline-block; }
.release .date { color: var(--soft); margin-left: 14px; font-size: 17px; }
.release .latest { display: inline-block; margin-left: 12px; font-size: 13px; font-weight: 650; color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); padding: 3px 10px; border-radius: 999px; vertical-align: 6px; }
.release .summary { margin: 14px 0 22px; font-size: 17px; }
.change { display: grid; grid-template-columns: 110px 1fr; gap: 20px; margin: 16px 0; }
.kind { justify-self: start; font-size: 13.5px; font-weight: 650; padding: 4px 14px; border-radius: 999px; height: fit-content; }
.kind.new { color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, transparent); }
.kind.better { color: #16a34a; background: color-mix(in srgb, #16a34a 13%, transparent); }
.kind.fixed { color: #d97706; background: color-mix(in srgb, #d97706 14%, transparent); }
.change p { margin: 0; color: var(--soft); } .change b { color: var(--ink); }
@media (max-width: 640px) { .change { grid-template-columns: 1fr; gap: 6px; } }

/* home */
.home-hero { text-align: center; padding: 60px 0 0; }
.orbit { position: relative; height: 170px; max-width: 820px; margin: 0 auto; }
.orbit img { position: absolute; border-radius: 22%; filter: drop-shadow(0 12px 20px rgba(0,0,0,.18)); animation: float 7s ease-in-out infinite; }
.featured { display: grid; grid-template-columns: 1fr 1.5fr; gap: 44px; align-items: center; background: var(--card); border: 1px solid var(--line);
            border-radius: 28px; padding: 44px; box-shadow: var(--shadow); text-align: left; }
.featured .appicon { width: 72px; height: 72px; border-radius: 17px; }
.featured h3 { font-size: 38px; letter-spacing: -.04em; margin: 16px 0 10px; line-height: 1.05; }
.featured p { color: var(--soft); font-size: 17px; margin: 0 0 22px; }
.featured .buttons { justify-content: flex-start; margin: 0; }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; padding: 26px; } }
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.appcard { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); text-align: left; }
.appcard img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.appcard h3 { margin: 2px 0 4px; font-size: 18px; letter-spacing: -.02em; }
.appcard p { margin: 0; color: var(--soft); font-size: 15px; }
.soon.out { background: color-mix(in srgb, #34c759 18%, transparent); color: #1f8f3a; }
@media (prefers-color-scheme: dark) { .soon.out { color: #5fd47a; } }
.soon { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; background: var(--line); color: var(--soft); }

/* prose (privacy) */
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin-top: 36px; letter-spacing: -.02em; }
.prose code { background: var(--line); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.prose a { color: var(--blue); }

/* footer */
.foot { margin-top: 140px; padding: 56px 0 26px; border-top: 1px solid var(--line); background: var(--bg2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 14px; font-size: 15px; }
.foot a { display: block; color: var(--soft); font-size: 15px; margin-bottom: 10px; }
.foot a:hover { color: var(--ink); }
.foot a.logo { display: flex; margin: 0; color: var(--ink); font-size: 17px; }
.foot .blurb { color: var(--soft); font-size: 15px; max-width: 340px; margin: 14px 0 0; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--soft); font-size: 13.5px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .links { display: none; } }

/* scroll-in */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .orbit img, .feature .shot { animation: none; }
  html { scroll-behavior: auto; }
}
.foot-bottom a { display: inline; }

/* home portfolio sections */
.home-workshop { margin-top: 72px; }
.home-subhead { font-size: 24px; letter-spacing: -.025em; margin: 0 0 6px; }
.home-app { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.home-app img { width: 72px; height: 72px; border-radius: 22%; flex: none; }
.home-app > div { flex: 1 1 320px; }
.home-app h3 { font-size: 22px; }
.home-lab .card { display: flex; flex-direction: column; }
.home-lab img, .home-bars { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-bottom: 16px; background: var(--bg); }
.home-bars { color: var(--ink); padding: 10px 14px; }
.home-bars text { fill: currentColor; font: 600 17px/1 system-ui, sans-serif; }
.home-bars .muted { opacity: .6; font-weight: 500; }
.home-links { display: flex; gap: 18px; margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 600; }
.home-links a { color: var(--blue); }
.home-hero { overflow-x: clip; } /* the orbit icons nearest the edge would otherwise widen phone viewports */

/* home: More Mac apps tiles (a picture of each app over its name) */
.wtiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.wtile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.wtile:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.wtile-pic { aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.wtile-pic img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform .6s ease; }
.wtile:hover .wtile-pic img { transform: scale(1.04); }
.wtile-body { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 18px; }
.wtile-icon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.wtile h3 { margin: 0 0 4px; font-size: 17px; }
.wtile p { margin: 0; color: var(--soft); font-size: 14.5px; line-height: 1.45; }
@media (max-width: 960px) { .wtiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wtiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .wtile, .wtile-pic img { transition: none; } .wtile:hover { transform: none; } .wtile:hover .wtile-pic img { transform: none; } }

/* Phones: the logo already links home, so the back link would only wrap the header. */
@media (max-width: 440px) { .nav .back { display: none; } }
