:root {
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --fill: rgba(0, 0, 0, 0.04);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --radius: 18px;
  --radius-lg: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --nav-h: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
button, input { font: inherit; }
.hidden { display: none !important; }

/* —— Gate (Apple ID–like) —— */
#gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 24px;
}
.gate-card {
  width: min(400px, 100%);
  text-align: center;
}
.gate-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #e8e8ed;
}
.gate-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gate-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.gate-card .sub {
  margin: 0 0 32px;
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
}
.gate-card form {
  display: grid;
  gap: 12px;
  text-align: left;
}
.gate-card label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 2px;
}
.gate-field {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.gate-card input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  padding: 0;
}
.gate-card button {
  margin-top: 8px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.gate-card button:hover { background: var(--blue-hover); }
.gate-card button:active { transform: scale(0.98); }
.gate-error {
  min-height: 1.2em;
  margin-top: 14px;
  color: #bf4800;
  font-size: 14px;
  text-align: center;
}
.gate-foot {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* —— App —— */
#app { opacity: 0; transition: opacity 0.4s ease; }
#app.ready { opacity: 1; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 980px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 12px;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

/* Hero — product billboard */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero-kicker {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.07;
}
.nickname {
  display: inline-block;
  min-width: 2ch;
  outline: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.15s ease;
}
.nickname:hover,
.nickname:focus {
  border-bottom-color: rgba(0, 113, 227, 0.35);
}
.nickname:empty::before {
  content: attr(data-placeholder);
  color: var(--text-tertiary);
}
.hero .tagline {
  margin: 0 auto 36px;
  max-width: 34em;
  font-size: 21px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.011em;
  line-height: 1.38;
}
.hero-portrait {
  width: min(320px, 72vw);
  margin: 0 auto 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #e8e8ed;
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--fill);
  padding: 6px 12px;
  border-radius: 980px;
}
.hero-blurb {
  margin: 0 auto;
  max-width: 38em;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hero-blurb strong { color: var(--text); font-weight: 600; }
.hero-note {
  margin: 20px auto 0;
  max-width: 36em;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Sections */
.section {
  margin-top: 72px;
}
.section-head {
  text-align: center;
  margin-bottom: 36px;
}
.section-head h2 {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-head p {
  margin: 0;
  font-size: 19px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Spec cards — like Apple tech specs strip */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 840px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card .k {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: none;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.card .v {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* Photo grid — clean Apple gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.photo-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8e8ed;
  cursor: zoom-in;
  aspect-ratio: 1;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.25s ease;
}
.photo-item:hover {
  transform: scale(1.015);
  box-shadow: var(--shadow-md);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-item .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.photo-item:hover .cap { opacity: 1; }

.empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.video-card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.video-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
}
.video-card .meta {
  padding: 14px 16px 16px;
}
.video-card .meta strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.video-card .meta small {
  color: var(--text-tertiary);
  font-family: var(--mono);
  font-size: 11px;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 32px;
  cursor: zoom-out;
}
#lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  cursor: default;
}
#lightbox .close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
#lightbox .close:hover { background: rgba(255, 255, 255, 0.22); }

.footer {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}
.footer code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--fill);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}
