/* ——— Sukiru site — semantic vars flip with color scheme ——— */
:root {
  --blue: #0066cc;
  --blue-focus: #0071e3;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --fg-secondary: #7a7a7a;
  --link: #0066cc;
  --hairline: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --card-border: #e0e0e0;
  --code-bg: #f5f5f7;
  --code-fg: #1d1d1f;
  --code-accent: #0066cc;
  --chip-bg: #f5f5f7;
  --chip-border: rgba(0, 0, 0, 0.08);
  --subnav-bg: rgba(245, 245, 247, 0.8);
  --kbd-bg: #f5f5f7;
  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --fg-secondary: #cccccc;
    --link: #2997ff;
    --hairline: rgba(255, 255, 255, 0.2);
    --card-bg: #1d1d1f;
    --card-border: rgba(255, 255, 255, 0.12);
    --code-bg: #1d1d1f;
    --code-fg: #f5f5f7;
    --code-accent: #2997ff;
    --chip-bg: #1d1d1f;
    --chip-border: rgba(255, 255, 255, 0.16);
    --subnav-bg: rgba(0, 0, 0, 0.7);
    --kbd-bg: #333336;
    color-scheme: dark;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  font-size: 17px; font-weight: 400; line-height: 1.47; letter-spacing: -0.374px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
section { scroll-margin-top: 52px; }
html[lang="zh-Hans"] body, html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] .hero-name, html[lang="zh-Hans"] .mega { letter-spacing: 0; }

/* ——— Language banner (always light, like apple.com region banner) ——— */
#lang-banner {
  background: #f5f5f7; color: #1d1d1f;
  font-size: 14px; line-height: 1.43; letter-spacing: -0.224px;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
}
#lang-banner[hidden] { display: none; }
#lang-banner p { text-align: center; }
#lang-banner .banner-cta {
  background: var(--blue); color: #fff; text-decoration: none;
  border-radius: 9999px; padding: 6px 14px;
  font-size: 14px; line-height: 1.29; white-space: nowrap;
}
#lang-banner .banner-cta:active { transform: scale(0.95); }
#lang-banner .banner-close {
  border: none; background: none; cursor: pointer; color: #1d1d1f;
  font-size: 17px; line-height: 1; padding: 8px;
}

/* ——— Global nav (always black, as on apple.com) ——— */
.global-nav { background: #000000; height: 44px; display: flex; align-items: center; }
.global-nav .wrap {
  width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 32px;
}
.global-nav a {
  color: #ffffff; opacity: 0.8; text-decoration: none;
  font-size: 12px; font-weight: 400; line-height: 1; letter-spacing: -0.12px;
}
.global-nav a:hover { opacity: 1; }
.global-nav .wordmark { opacity: 1; font-weight: 600; }
.global-nav .spacer { flex: 1; }

/* ——— Sub nav (frosted) ——— */
.sub-nav {
  position: sticky; top: 0; z-index: 10;
  height: 52px; display: flex; align-items: center;
  background: var(--subnav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.sub-nav .wrap {
  width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 24px;
}
.sub-nav .name {
  color: var(--fg); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; line-height: 1.19; letter-spacing: 0.231px;
}
.sub-nav .name img { width: 24px; height: 24px; display: block; }
.sub-nav .name .ver { color: var(--fg-secondary); font-weight: 400; letter-spacing: 0; }
html[lang="zh-Hans"] .sub-nav .name { letter-spacing: 0; }
.sub-nav nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.sub-nav nav a {
  color: var(--fg); opacity: 0.8; text-decoration: none;
  font-size: 14px; font-weight: 400; line-height: 1.29; letter-spacing: -0.224px;
}
.sub-nav nav a:hover { opacity: 1; }
.sub-nav .btn { margin-left: 8px; opacity: 1; }

/* ——— Buttons & links ——— */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  border: none; border-radius: 9999px; padding: 11px 22px;
  font-size: 17px; font-weight: 400; line-height: 1.24; letter-spacing: -0.374px;
}
.btn:active { transform: scale(0.95); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue-focus); outline-offset: 3px;
}
.btn-primary { background: var(--blue); color: #ffffff; }
.btn-ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.btn-sm { padding: 6px 14px; font-size: 14px; line-height: 1.29; letter-spacing: -0.224px; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.chevron a::after { content: " ›"; }

/* ——— Sections: one canvas per color scheme, whitespace is the divider ——— */
.section { padding: 96px 24px; text-align: center; }
.section > .inner { max-width: 980px; margin: 0 auto; }
.section .copy { max-width: 680px; margin: 18px auto 0; color: var(--fg-secondary); }
.section .more { margin-top: 24px; }
.section .cta-row { margin-top: 28px; }
.muted { color: var(--fg-secondary); }
.fine-print { font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: -0.12px; }

.display-lg {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.5px;
}
.display-md {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -0.374px;
}
.lead {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 400; line-height: 1.25; letter-spacing: 0;
  margin-top: 14px;
}

/* ——— Hero: a dark stage in both schemes, matching the dark-mode capture ——— */
.hero {
  --fg: #f5f5f7; --fg-secondary: #a1a1a6; --link: #2997ff; --code-bg: #1d1d1f;
  position: relative; overflow: clip;
  padding: 40px 24px 96px; text-align: center;
  background: #000000; color: var(--fg); color-scheme: dark;
}
.hero .muted { color: #86868b; }
/* The stage keeps the capture's aspect ratio, and the intro rows are placed in
   percentages of it so they land exactly on the captured Library rows. */
.hero-stage-wrap {
  width: min(1080px, 100%, max(560px, (100svh - 400px) * 1.508));
  margin: 0 auto; perspective: 1800px;
}
.hero-camera { transform-style: preserve-3d; }
.hero-stage {
  position: relative; aspect-ratio: 2370 / 1572;
  transform-style: preserve-3d; container-type: inline-size;
}
/* alpha window capture floats directly on the canvas — no frame, no CSS shadow */
.hero-shot { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-sheen {
  position: absolute; inset: 4.9% 4.7% 9.4%;
  border-radius: 1.4cqw; overflow: hidden; pointer-events: none; opacity: 0;
}
.hero-sheen::after {
  content: ""; position: absolute; inset: -20% -60%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  transform: translateX(-60%);
}
/* Intro rows: loose skill rows, each with a problem tag that resolves to a fix. */
.hero-row {
  position: absolute; left: 23.34%; width: 30.37%; height: 5.95%;
  padding: 0 0.9cqw; border-radius: 0.7cqw;
  display: grid; grid-template-columns: 1fr auto; align-content: center; column-gap: 1cqw;
  background: #2a2a2c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1.6cqw 3cqw rgba(0, 0, 0, 0.55);
  text-align: left; letter-spacing: 0; line-height: 1.3;
  backface-visibility: hidden; will-change: transform, filter, opacity; opacity: 0;
}
.hero-row .n, .hero-row .d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-row .n { font-size: 1.1cqw; font-weight: 600; color: #f5f5f7; }
.hero-row .d { font-size: 1.05cqw; color: #a1a1a6; }
.hero-row .tag { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; font-size: 0.85cqw; }
.hero-row .bad, .hero-row .ok {
  display: inline-flex; align-items: center; gap: 0.4cqw;
  padding: 0.25cqw 0.7cqw; border-radius: 99px; white-space: nowrap; font-weight: 600;
}
.hero-row .bad { color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.hero-row .bad::before {
  content: ""; width: 0.6cqw; height: 0.6cqw; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0.8cqw var(--c);
}
.hero-row .ok {
  position: absolute; inset: 0; justify-content: center;
  color: #30d158; background: rgba(48, 209, 88, 0.16); opacity: 0;
}
.hero-replay {
  position: absolute; right: 24px; bottom: 24px; width: 36px; height: 36px;
  display: grid; place-items: center; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #f5f5f7;
}
.hero-replay[hidden] { display: none; }
.hero-replay:hover { background: rgba(255, 255, 255, 0.22); }
/* Until site.js plays the intro, the shot and copy wait offstage. */
.js .hero:not(.is-done) .hero-shot, .js .hero:not(.is-done) .hero-meta > * { opacity: 0; }
@supports (animation-timeline: view()) {
  .hero-stage-wrap {
    animation: hero-recede linear both;
    animation-timeline: view(); animation-range: exit 0% exit 80%;
  }
  @keyframes hero-recede { to { transform: scale(0.9) translateY(-4%); opacity: 0.35; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero:not(.is-done) .hero-shot, .js .hero:not(.is-done) .hero-meta > * { opacity: 1; }
  .hero-stage-wrap { animation: none; }
}
.hero-meta { margin-top: -1%; }
.hero-icon { width: 56px; height: 56px; }
.hero-name {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600; line-height: 1.14; letter-spacing: 0.196px;
  margin-top: 16px;
}
.mega {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.5vw, 80px); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em;
  margin-top: 8px;
}
.hero-desc {
  max-width: 700px; margin: 20px auto 0;
  font-size: 19px; line-height: 1.47; color: var(--fg-secondary);
}
.hero .cta-row { margin-top: 28px; }
.hero .fine-print { margin-top: 18px; }

/* ——— Code sample ——— */
.code-block {
  display: inline-block; margin-top: 36px; text-align: left;
  background: var(--code-bg); border-radius: 8px; padding: 24px 32px;
  color: var(--code-fg); font-family: var(--font-mono); font-size: 14px; line-height: 1.8;
  letter-spacing: 0; overflow-x: auto; max-width: 100%;
}
.code-block .t { color: var(--code-accent); }

/* ——— Inline code ——— */
p code, .card code {
  font-family: var(--font-mono); font-size: 0.88em; letter-spacing: 0;
  background: var(--code-bg); border-radius: 5px; padding: 1px 5px;
}

/* ——— Section screenshot ——— */
.section-shot { display: block; margin: 48px auto 0; width: 100%; max-width: 880px; height: auto; }

/* ——— Brew command capsule ——— */
.brew {
  display: inline-block; margin: 28px auto 0;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  border-radius: 9999px; padding: 12px 24px;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0; color: var(--fg);
  user-select: all; -webkit-user-select: all;
}

/* ——— Feature grid ——— */
.grid {
  max-width: 1024px; margin: 52px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  text-align: left;
}
.card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 24px;
}
.card h3 { font-size: 17px; font-weight: 600; line-height: 1.24; letter-spacing: -0.374px; }
html[lang="zh-Hans"] .card h3 { letter-spacing: 0; }
.card p { margin-top: 8px; color: var(--fg-secondary); }
.card kbd {
  font-family: var(--font-text); font-size: 14px; color: var(--fg);
  background: var(--kbd-bg); border: 1px solid var(--card-border);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}

/* ——— Footer (apple.com software-page style: 12px, tight, hairlines) ——— */
footer { border-top: 1px solid var(--hairline); padding: 48px 24px 40px; font-size: 12px; }
footer .cols {
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
footer h4 { font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: 0; color: var(--fg); }
footer ul { list-style: none; margin-top: 4px; }
footer li { margin-top: 8px; }
footer li a { color: var(--fg-secondary); text-decoration: none; font-size: 12px; line-height: 1.5; letter-spacing: 0; }
footer li a:hover { color: var(--fg); text-decoration: underline; }
footer .meta, footer .bottom {
  max-width: 980px; margin: 24px auto 0; padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px; line-height: 1.5; letter-spacing: 0; color: var(--fg-secondary);
}
footer .meta p + p { margin-top: 8px; }
footer .bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; flex-wrap: wrap; }
footer .bottom .pipe { margin-top: 8px; }
footer .bottom a { color: var(--fg-secondary); text-decoration: none; }
footer .bottom a:hover { color: var(--fg); text-decoration: underline; }
footer .locale { white-space: nowrap; }

/* ——— Responsive ——— */
@media (max-width: 1068px) {
  .display-lg { font-size: 34px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 833px) {
  .global-nav .navlinks { display: none; }
  .sub-nav nav a:not(.btn) { display: none; }
  .section { padding: 72px 24px; }
  .hero { padding: 32px 20px 72px; }
}
@media (max-width: 640px) {
  .display-lg { font-size: 30px; }
  .display-md { font-size: 28px; }
  .lead { font-size: 20px; }
  .hero-name { font-size: 22px; }
  .hero-desc { font-size: 17px; }
  .grid { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  footer .cols { grid-template-columns: 1fr; gap: 24px; }
}
