/* Academic Blue Book — site styles. Blue and white, matching the app. */

:root {
  --ink: #0B2447;
  --text: #1C2B42;
  --muted: #5A6A82;
  --accent: #1A56B8;
  --brand: #1A4FA8;
  --band: #0B2447;
  --on-brand: #FFFFFF;
  --on-brand-soft: #DCE8FB;
  --on-brand-muted: #A9C4F0;
  --page: #FFFFFF;
  --subtle: #F3F6FB;
  --hairline: rgba(11, 36, 71, 0.12);
  --bezel: #0B2447;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EAF0FA;
    --text: #D3DCEA;
    --muted: #8E9DB4;
    --accent: #80B0FF;
    --brand: #123D86;
    --band: #0C1A30;
    --page: #090E17;
    --subtle: #0F1726;
    --hairline: rgba(214, 226, 245, 0.14);
    --bezel: #1B2940;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- Navigation ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: inherit; opacity: 0.78; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links a[aria-current="page"] { opacity: 1; font-weight: 600; }
.nav-links .lang {
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0.7;
}

.site-header { border-bottom: 1px solid var(--hairline); color: var(--ink); }

/* ---------- Hero ---------- */

.hero { background: var(--brand); color: var(--on-brand); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: end;
  padding-top: 32px;
}

.hero-copy { align-self: center; padding-bottom: 72px; }
.hero .eyebrow { color: var(--on-brand-muted); }

.hero h1 {
  margin: 14px 0 22px;
  font-size: clamp(40px, 6.2vw, 66px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lede { margin: 0; max-width: 29em; font-size: 18px; color: var(--on-brand-soft); }

.hero-facts {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 15px;
  color: var(--on-brand);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--on-brand-muted);
}

.hero-meta { margin: 18px 0 0; font-size: 14px; color: var(--on-brand-muted); }

.hero-devices { position: relative; height: 560px; }
.hero-devices .phone { position: absolute; width: 252px; }
.hero-devices .back { left: 0; top: 0; }
.hero-devices .front { right: 0; top: 72px; }

/* ---------- Phone frame ---------- */

.phone {
  margin: 0;
  padding: 8px;
  border-radius: 42px;
  background: var(--bezel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 28px 56px -24px rgba(4, 16, 40, 0.55);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: 34px;
  background: #FFFFFF;
}

/* ---------- Sections ---------- */

.section { padding: 104px 0; }
.section.tint { background: var(--subtle); }

.section h2 {
  margin: 12px 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}

.section-lede { margin: 0; max-width: 36em; font-size: 18px; color: var(--muted); }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}
.features article { padding-top: 22px; border-top: 1px solid var(--hairline); }
.features h3 { margin: 10px 0 8px; font-size: 19px; line-height: 1.4; color: var(--ink); }
.features p { margin: 0; font-size: 15.5px; color: var(--muted); }

.num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.gallery figure { margin: 0; }
.gallery .phone { box-shadow: 0 18px 36px -24px rgba(4, 16, 40, 0.35); }
.gallery figcaption { margin-top: 18px; text-align: center; }
.gallery figcaption strong { display: block; font-size: 16px; color: var(--ink); }
.gallery figcaption span { font-size: 14px; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.stat { padding: 36px 24px 34px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--hairline); }
.stat b {
  display: block;
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.modes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.modes li { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.modes strong { display: block; font-size: 17px; color: var(--ink); }
.modes span { font-size: 15px; color: var(--muted); }

.band .modes { border-top-color: rgba(255, 255, 255, 0.16); }
.band .modes li { border-bottom-color: rgba(255, 255, 255, 0.16); }
.band .modes strong { color: var(--on-brand); }
.band .modes span { color: var(--on-brand-muted); }

.band { background: var(--band); color: var(--on-brand); }
.band .eyebrow { color: var(--on-brand-muted); }
.band h2 { color: var(--on-brand); }
.band .section-lede { color: var(--on-brand-soft); }
.band a { color: var(--on-brand); border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.band a:hover { text-decoration: none; border-bottom-color: var(--on-brand); }
.more { display: inline-block; margin-top: 28px; font-size: 16px; font-weight: 600; }

.note { max-width: 44em; font-size: 15px; color: var(--muted); }
.note h2 { font-size: 19px; margin: 0 0 8px; color: var(--ink); letter-spacing: 0; }
.note p { margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0 56px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-row nav a { color: var(--muted); }
.footer-row nav a:hover { color: var(--ink); }
.site-footer .brand { color: var(--ink); font-size: 15px; }
.site-footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
.copyright { margin: 18px 0 0; }

/* ---------- Documents (privacy, terms, support) ---------- */

.doc { max-width: 736px; margin: 0 auto; padding: 72px 24px 104px; }

.doc h1 {
  margin: 12px 0 10px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.doc .meta { margin: 0; font-size: 14px; color: var(--muted); }

.summary {
  margin: 36px 0 8px;
  padding: 20px 24px;
  background: var(--subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 16.5px;
  color: var(--ink);
}
.summary p { margin: 0; }

.doc h2 {
  margin: 44px 0 10px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}
.doc h2 .n { margin-right: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.doc h3 { margin: 28px 0 6px; font-size: 17px; line-height: 1.5; color: var(--ink); }
.doc p, .doc li { font-size: 16px; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 1.2em; }
.doc li { margin: 4px 0; }
.doc code { font-size: 0.92em; }

.path {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--subtle);
  color: var(--ink);
  font-size: 0.94em;
  white-space: nowrap;
}

.contact {
  margin: 36px 0 8px;
  padding: 28px 28px 24px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
.contact .eyebrow { margin-bottom: 6px; }
.contact .email {
  display: inline-block;
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-all;
}
.contact p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.contact ul { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.contact li { font-size: 15px; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise.d1 { animation-delay: 0.08s; }
  .rise.d2 { animation-delay: 0.16s; }
  .rise.d3 { animation-delay: 0.28s; }
  .rise.d4 { animation-delay: 0.4s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; padding-top: 24px; }
  .hero-copy { padding-bottom: 12px; }
  .hero-devices { height: 420px; }
  .hero-devices .phone { width: 220px; }
  .hero-devices .back { left: calc(50% - 208px); top: 16px; }
  .hero-devices .front { right: auto; left: calc(50% - 12px); top: 64px; }
  .features { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .gallery {
    display: flex;
    gap: 16px;
    margin: 40px -24px 0;
    padding: 0 24px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery figure { flex: 0 0 58%; max-width: 260px; scroll-snap-align: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 26px 16px 24px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--hairline); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav { height: 60px; }
  .nav-links { gap: 14px; font-size: 14px; }
  .brand span { font-size: 15px; }
  .lede, .section-lede { font-size: 16.5px; }
  .hero-devices { height: 360px; }
  .hero-devices .phone { width: 184px; border-radius: 32px; padding: 6px; }
  .hero-devices .phone img { border-radius: 26px; }
  .hero-devices .back { left: calc(50% - 178px); }
  .hero-devices .front { left: calc(50% - 6px); top: 52px; }
  .gallery { margin: 36px -16px 0; padding: 0 16px 12px; }
  .gallery figure { flex-basis: 66%; }
  .section { padding: 68px 0; }
  .doc { padding: 48px 16px 80px; }
  .contact { padding: 22px 20px 20px; }
}

@media (max-width: 380px) {
  .nav-links a:not(.lang) { display: none; }
}
