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

:root {
  --bg: #08090e;
  --bg-raised: #111318;
  --bg-card: #161921;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e4e7ec;
  --text-muted: #8a8f9c;
  --text-dim: #5a5f6b;
  --accent: #3d7a72;
  --accent-bright: #7da79f;
  --accent-glow: rgba(125,167,159,0.16);
  --accent-glow-strong: rgba(125,167,159,0.32);
  --warm: #e5a142;
  --warm-dim: rgba(229,161,66,0.12);
  --radius: 14px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,9,14,0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
#nav.scrolled { background: rgba(8,9,14,0.92); }

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.nav-brand span { color: var(--accent-bright); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow-strong);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-hover);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== HERO ===== */
.hero {
  padding: 160px 40px 100px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.hero-brand {
  grid-template-columns: 1fr;
  text-align: center;
  padding-bottom: 48px;
}
.hero-brand .hero-content { max-width: 720px; margin: 0 auto; }
.hero-brand p { max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-brand .hero-actions { justify-content: center; }

.hero-content { max-width: 520px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--warm-dim);
  border: 1px solid rgba(229,161,66,0.18);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--warm);
  border-radius: 50%;
}

.pronounce {
  display: block;
  margin-top: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

.hero h1 {
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 24px;
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-bright), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 440px;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 16px; align-items: center; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-frame {
  width: 420px;
  height: 560px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 3px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 25px 80px rgba(0,0,0,0.5),
    0 0 60px var(--accent-glow);
}
.device-frame img,
.device-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ===== STORY ===== */
.story {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}
.story-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.story-inner h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.035em;
  color: #fff;
}
.story-inner > p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

.timeline {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 64px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 2px;
  background: linear-gradient(90deg, var(--text-dim), var(--accent), var(--text-dim));
  opacity: 0.4;
}
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 200px;
  position: relative;
}
.timeline-dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  color: var(--text-dim);
}
.timeline-item:last-child .timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow-strong);
}
.timeline-year {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.timeline-label {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
}

/* ===== FEATURES / PRODUCTS ===== */
.features {
  padding: 120px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.features-header {
  text-align: center;
  margin-bottom: 64px;
}
.features-header h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  color: #fff;
}
.features-header p {
  font-size: 17px;
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

.feature-card,
.product-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  transition: all 0.3s ease;
}
.feature-card:hover,
.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}
.product-card {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.feature-card h3,
.product-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  color: #fff;
}
.product-card h3 { font-size: 22px; }
.feature-card p,
.product-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}
.product-card .product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 20px 0 24px;
}
.product-card .product-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}
.product-card .btn { margin-top: auto; }

.section-note {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ===== SHOWCASE ===== */
.showcase {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}
.showcase-header {
  text-align: center;
  margin-bottom: 64px;
}
.showcase-header h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  color: #fff;
}
.showcase-header p {
  font-size: 17px;
  color: var(--text-muted);
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.showcase-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s ease;
}
.showcase-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.showcase-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.showcase-item .showcase-caption {
  padding: 20px 24px;
}
.showcase-caption h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.showcase-caption p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== PRICING ===== */
.pricing {
  padding: 120px 40px;
}
.pricing-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.pricing-inner h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  color: #fff;
}
.pricing-inner > p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.price-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.price-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.price-tag {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 8px;
}
.price-currency {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-muted);
}
.price-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
}
.price-period {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.price-period strong {
  color: var(--accent-bright);
  font-weight: 600;
}
.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}
.price-features li {
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }
.price-features li::before {
  content: '';
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-glow);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6L5 9L10 3' stroke='%237da79f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ===== SIGNUP ===== */
.signup {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  text-align: center;
}
.signup-inner {
  max-width: 580px;
  margin: 0 auto;
}
.signup h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  color: #fff;
}
.signup > .signup-inner > p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.email-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.email-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--border-hover);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  background: var(--bg-card);
  color: var(--text);
}
.email-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.email-form input::placeholder { color: var(--text-dim); }
.form-message {
  margin-top: 16px;
  font-size: 14px;
  color: var(--accent-bright);
  min-height: 20px;
}
.privacy-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== FOOTER ===== */
footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.footer-brand img {
  width: 20px; height: 20px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.footer-brand span { color: var(--accent-bright); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}
.footer-note {
  max-width: 760px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-dim);
}
.footer-note a { color: inherit; text-decoration: underline; }
.footer-note a:hover { color: var(--text); }

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #nav { padding: 14px 20px; }
  .nav-links a:not(.btn) { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding: 130px 24px 72px;
    gap: 48px;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-visual { order: -1; }
  .device-frame {
    width: 90vw;
    max-width: 360px;
    height: auto;
    aspect-ratio: 3/4;
  }

  .story, .features, .pricing, .signup, .showcase,
  .brand-block, .compare, .flow-wrap, .eco { padding: 80px 24px; }

  .timeline {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .timeline::before {
    width: 2px; height: 70%;
    top: 15%; left: 50%;
  }

  .features-grid,
  .showcase-grid,
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .feature-card,
  .product-card { padding: 28px 24px; }
  .showcase-item img { height: 220px; }

  .price-card { padding: 36px 24px; }
  .price-amount { font-size: 48px; }

  .email-form { flex-direction: column; }

  footer { padding: 32px 24px; }
  .footer-main {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-note { margin-top: 24px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ===== BRAND PORTAL ===== */
.hero-brand h1 {
  font-size: clamp(52px, 8vw, 88px);
  margin-bottom: 12px;
}
.hero-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 24px;
}
.hero-tagline em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-bright), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-block {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
}
.brand-block.raised { background: var(--bg-raised); }
.brand-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.brand-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 20px;
}
.brand-inner h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #fff;
  margin-bottom: 20px;
}
.brand-inner h2 em {
  font-style: normal;
  color: var(--accent-bright);
}
.brand-inner > p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 620px;
  margin: 0 auto;
}

.compare {
  padding: 0 40px 120px;
  max-width: 920px;
  margin: 0 auto;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.compare-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: left;
}
.compare-card.accent {
  border-color: rgba(125,167,159,0.28);
  background: linear-gradient(180deg, rgba(125,167,159,0.08), var(--bg-card));
}
.compare-card .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.compare-card.accent .label { color: var(--accent-bright); }
.compare-card h3 {
  font-size: 26px;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.compare-card p { color: var(--text-muted); font-size: 15px; }

.flow-wrap {
  padding: 0 40px 120px;
  max-width: 720px;
  margin: 0 auto;
}
.flow {
  list-style: none;
  text-align: left;
}
.flow li {
  position: relative;
  padding: 16px 20px 16px 56px;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
}
.flow li:first-child { padding-top: 0; }
.flow li:last-child {
  border-left-color: transparent;
  color: #fff;
  font-weight: 600;
}
.flow li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
}
.flow li:first-child::before { top: 6px; }
.flow li:last-child::before {
  background: var(--accent-bright);
  box-shadow: 0 0 16px var(--accent-glow-strong);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.pill {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.eco {
  padding: 0 40px 40px;
  max-width: 920px;
  margin: 0 auto;
}
.eco-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.eco-list li {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}
.eco-list li:last-child { border-bottom: none; }
.eco-list strong {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-size: 16px;
}
.eco-list span { color: var(--text-muted); font-size: 14px; }
.eco-status {
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eco-status.now { color: var(--accent-bright); }

.reading-shots {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  max-width: 920px;
  margin: 48px auto 0;
}
.reading-shots img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .compare-grid,
  .reading-shots { grid-template-columns: 1fr; }
  .eco-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}


/* ===== HERO DEVICE (brand page: the iPad loop under the hero buttons) ===== */
.hero-device {
  grid-column: 1 / -1;
  max-width: 760px;
  width: 100%;
  margin: 56px auto 0;
}
.device-frame-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;          /* the video is the screen; the frame is the bezel */
  border-radius: 28px;
  border: 10px solid #1a1d24;
  background: #1a1d24;
}
.device-frame-hero img,
.device-frame-hero video { border-radius: 18px; }

/* ===== PRODUCT CARD MEDIA (the sync loop inside the for-Zotero card) ===== */
.product-media {
  position: relative;
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);  /* #111318 — the video's own background, so it sits flush */
  border: 1px solid var(--border);
}
.product-media img,
.product-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-device { margin-top: 40px; }
  .device-frame-hero { border-width: 7px; border-radius: 22px; }
  .device-frame-hero img,
  .device-frame-hero video { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-hero-media] video { display: none !important; }
  [data-hero-media] .hero-fallback { display: block !important; }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
}
.lang-switch:hover { color: #fff; }
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  font: inherit;
  padding: 6px 26px 6px 10px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a8f9c' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.lang-switch select:focus { outline: none; border-color: var(--accent); }
.lang-switch select option { color: #111; }
footer .lang-switch { margin-left: 8px; }
@media (max-width: 768px) {
  #nav .lang-switch { display: none; }   /* the footer keeps one for phones */
  footer .lang-switch { margin: 8px 0 0; }
}
[dir="rtl"] .lang-switch select {
  padding: 6px 10px 6px 26px;
  background-position: left 10px center;
}
[dir="rtl"] footer .lang-switch { margin-left: 0; margin-right: 8px; }

/* Headline font has no CJK / Arabic / Devanagari glyphs — let the system fill in. */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { font-family: 'Space Grotesk', -apple-system, 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; }
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3 { font-family: 'Space Grotesk', -apple-system, 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif; }
:lang(zh-Hant) h1, :lang(zh-Hant) h2, :lang(zh-Hant) h3 { font-family: 'Space Grotesk', -apple-system, 'PingFang TC', 'Noto Sans TC', system-ui, sans-serif; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { font-family: 'Space Grotesk', -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; }
:lang(ja) h1, :lang(zh-Hans) h1, :lang(zh-Hant) h1, :lang(ko) h1 { letter-spacing: 0; }

/* ===== HEADLINE WRAPPING ===== */
h1, h2, h3, .hero-tagline { text-wrap: balance; }
.ph { display: inline-block; }          /* phrase unit — never broken inside (CJK) */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .hero-tagline,
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3, :lang(zh-Hans) .hero-tagline,
:lang(zh-Hant) h1, :lang(zh-Hant) h2, :lang(zh-Hant) h3, :lang(zh-Hant) .hero-tagline,
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) .hero-tagline { line-break: strict; word-break: auto-phrase; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { word-break: keep-all; }

/* ===== BLOG ===== */
.blog-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 150px 40px 40px;
}
.blog-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
}

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.post-card-grid-index {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 40px 100px;
  grid-template-columns: 1fr;
}
.post-card {
  display: block;
  padding: 28px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.post-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-raised);
  transform: translateY(-2px);
}
.post-card-date {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.post-card h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
}
.post-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.post-card-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-bright);
}
.post-empty { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* --- article --- */
.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 40px 0;
}
.crumbs {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent-bright); }

.post-draft {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--warm-dim);
  border: 1px solid rgba(229,161,66,0.3);
  color: var(--warm);
  font-size: 13px;
  font-weight: 500;
}

.post-header h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #fff;
  margin-bottom: 20px;
}
.post-lede {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.post-meta {
  font-size: 14px;
  color: var(--text-dim);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.post-updated { color: var(--accent-bright); margin-left: 6px; }

.post-toc {
  margin: 36px 0 8px;
  padding: 24px 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.post-toc p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.post-toc ol { list-style: none; counter-reset: toc; }
.post-toc li { counter-increment: toc; margin: 7px 0; font-size: 15px; }
.post-toc li::before { content: counter(toc) '. '; color: var(--text-dim); }
.post-toc a { color: var(--text); text-decoration: none; }
.post-toc a:hover { color: var(--accent-bright); }

.post-body { font-size: 17.5px; line-height: 1.85; color: var(--text); }
.post-body h2 {
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 56px 0 18px;
  scroll-margin-top: 90px;
}
.post-body h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 36px 0 12px;
  scroll-margin-top: 90px;
}
.post-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-bright);
  margin: 28px 0 8px;
}
.post-body p { margin-bottom: 22px; }
.post-body a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: #fff; }
.post-body ul, .post-body ol { margin: 0 0 22px 24px; }
.post-body li { margin-bottom: 10px; padding-left: 4px; }
.post-body li::marker { color: var(--text-dim); }
.post-body strong { color: #fff; font-weight: 600; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-bright);
}
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 12px 0 24px; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }
.post-body blockquote {
  margin: 0 0 24px;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}
.post-body blockquote p { margin: 0; }

.table-wrap { overflow-x: auto; margin-bottom: 26px; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.post-body th, .post-body td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.post-body th {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  border-bottom-color: var(--border-hover);
}
.post-body td { color: var(--text-muted); }

.post-cta {
  margin: 64px 0 0;
  padding: 40px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.post-cta-kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.post-cta h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 12px;
}
.post-cta p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 24px;
}
.post-cta .btn { margin: 0 6px 8px; }

.post-related {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 40px 100px;
}
.post-related h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .blog-hero { padding: 120px 24px 32px; }
  .post-card-grid-index { padding: 16px 24px 72px; }
  .post-card { padding: 24px; }
  .post { padding: 118px 24px 0; }
  .post-body { font-size: 17px; }
  .post-toc { padding: 20px 22px; }
  .post-cta { padding: 32px 24px; }
  .post-related { padding: 56px 24px 72px; }
}

/* Alternate-language link on blog pages (only the languages an article actually exists in). */
.lang-alt {
  font-size: 13px !important;
  color: var(--text-dim) !important;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  transition: color 0.2s, border-color 0.2s;
}
.lang-alt:hover { color: #fff !important; border-color: var(--border-hover); }
.footer-links .lang-alt { padding: 4px 12px; }
