@import url("https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&display=swap");

:root {
  --ink: #070707;
  --ink-2: #101214;
  --panel: rgba(16, 18, 22, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 236, 179, 0.35);
  --text: #f3f1ec;
  --muted: #9a958c;
  --accent: #d8f36b;
  --accent-2: #7dd3fc;
  --warm: #f0c27a;
  --font-display: "Syne", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: rgba(216, 243, 107, 0.28); color: #fff; }

body.site {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  background: var(--ink);
  overflow-x: clip;
  min-height: 100vh;
}

/* Atmosphere: film grain + soft light, not flat black */
body.site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(240, 194, 122, 0.14), transparent 55%),
    radial-gradient(900px 600px at 100% 20%, rgba(125, 211, 252, 0.1), transparent 50%),
    radial-gradient(800px 500px at 0% 80%, rgba(216, 243, 107, 0.06), transparent 45%),
    linear-gradient(180deg, #0c0c0c 0%, #070707 40%, #050505 100%);
}
body.site::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.site a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
body.site a:hover { color: var(--accent); }

/* Decorative orbs injected by JS */
.site-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.site-fx__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 22s var(--ease) infinite alternate;
}
.site-fx__orb--a {
  width: 42vw; height: 42vw; max-width: 520px; max-height: 520px;
  top: -8%; left: -10%;
  background: rgba(240, 194, 122, 0.22);
}
.site-fx__orb--b {
  width: 36vw; height: 36vw; max-width: 440px; max-height: 440px;
  bottom: 10%; right: -8%;
  background: rgba(125, 211, 252, 0.16);
  animation-delay: -8s;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 50px, 0) scale(1.12); }
}

/* ——— Header: floating capsule ——— */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: min(calc(100% - 28px), var(--max));
  margin: 14px auto 0;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.site-header .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
}
.site-header .brand:hover { color: var(--accent); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
  flex: 1 1 16rem;
}
.site-nav a {
  color: #bdb8ae;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent);
  font-weight: 600;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 28px 0 100px;
}
.crumbs {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 8px 0 28px;
  color: var(--muted);
}
body.site .crumbs a { color: #c9c4b8; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 0 0 18px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--warm), transparent);
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  text-wrap: balance;
  color: #fff;
}
h1 span, .grad {
  background: linear-gradient(105deg, #fff 10%, var(--accent) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 300;
  color: #d5d0c6;
  max-width: 22em;
  margin: 0 0 22px;
  line-height: 1.5;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 64px 0 18px;
  color: #fff;
}
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: #fff;
}

.note {
  border-left: 3px solid var(--accent);
  border-radius: 0 18px 18px 0;
  padding: 16px 18px;
  background: linear-gradient(90deg, rgba(216, 243, 107, 0.08), transparent);
  color: #e8e4da;
  margin: 0 0 28px;
}

/* ——— Homepage hero: cinematic ——— */
.hero {
  position: relative;
  min-height: min(88vh, 920px);
  display: grid;
  align-content: end;
  padding: 40px 0 20px;
  margin: 0 0 20px;
}
.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-bottom: 12px;
}
.hero__brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 16vw, 11rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  margin: 0 0 8px;
  user-select: none;
  pointer-events: none;
}
.hero p:not(.lead):not(.kicker) {
  max-width: 34em;
  color: #b8b3a8;
  font-size: 1.02rem;
}

/* Marquee — decorative; primary content remains above */
.ticker {
  margin: 36px -16px 48px;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker 36s linear infinite;
  padding: 16px 0;
}
.ticker span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.04em;
  color: #6f6a62;
  padding: 0 1.6rem;
  white-space: nowrap;
}
.ticker span em {
  font-style: normal;
  color: var(--accent);
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Phone stage */
.shots {
  --stage-pad: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 48px 0 12px;
  perspective: 1400px;
  position: relative;
}
.shots::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8%;
  height: 40%;
  background: radial-gradient(ellipse at center, rgba(216, 243, 107, 0.12), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.shots figure {
  margin: 0;
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}
.shots figure:nth-child(1) { transform: rotateY(8deg) translateY(24px); }
.shots figure:nth-child(2) { transform: translateY(0) scale(1.04); z-index: 2; }
.shots figure:nth-child(3) { transform: rotateY(-8deg) translateY(24px); }
.shots .phone-shell {
  border-radius: 28px;
  padding: 10px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), transparent 40%),
    #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.shots img,
.pair img,
.card img {
  width: 100%;
  display: block;
  border-radius: 20px;
  background: #0a0a0a;
}
.shots figcaption,
.pair figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0 8px;
}
.pair figure {
  margin: 0;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  color: var(--ink) !important;
  background: var(--accent);
  text-decoration: none !important;
  box-shadow: 0 0 0 0 rgba(216, 243, 107, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s;
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(216, 243, 107, 0.28);
  color: var(--ink) !important;
  background: #e6ff8a;
}
.btn.ghost {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: rgba(216, 243, 107, 0.06);
  box-shadow: none;
}

/* Link cards — editorial, not SaaS boxes */
.links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.links .card {
  margin: 0;
  padding: 28px 8px 28px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 28px;
  align-items: start;
  transition: background 0.3s;
}
.links .card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(216, 243, 107, 0.04), transparent);
}
.links .card::before {
  content: counter(link, decimal-leading-zero);
  counter-increment: link;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 6px;
}
.links { counter-reset: link; }
.links .card h3 { margin: 0 0 8px; font-size: 1.5rem; }
.links .card h3 a {
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.links .card h3 a:hover { color: var(--accent); }
.links .card p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  max-width: 40em;
}

.card, .entry {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  padding: 22px;
  margin: 16px 0;
  backdrop-filter: blur(12px);
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.card:hover, .entry:hover {
  border-color: rgba(216, 243, 107, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.entry p, .card p { margin: 0 0 10px; color: #d4cfc4; }
.entry p:last-child, .card p:last-child { margin-bottom: 0; }
.use {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px !important;
}

.shot-nav {
  display: flex;
  gap: 8px;
  margin: 8px 0 4px;
}
.shot-nav button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: #cfc9bd;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.shot-nav button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(216, 243, 107, 0.06);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 40px 0 56px;
  background: #050505;
}
.site-footer .wrap {
  width: min(100% - 32px, var(--max));
  padding: 0;
}
.site-footer a {
  color: #cfc9bd;
  margin-right: 16px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 10px 0; }

/* Inner page section rhythm */
main > section { margin: 36px 0 48px; }
main > section > h2 {
  margin-top: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.plain-list {
  margin: 0 0 18px;
  padding: 0 0 0 1.15em;
  color: #d4cfc4;
  line-height: 1.65;
}
.plain-list li { margin: 0 0 8px; }
.plain-list strong { color: #fff; font-weight: 600; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
  min-width: 520px;
}
table.compare th,
table.compare td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.compare th {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
  background: rgba(216, 243, 107, 0.04);
}
table.compare td { color: #d4cfc4; }
table.compare tr:last-child td { border-bottom: 0; }
table.compare tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Cases page: App Store phone screenshots */
.cases-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 22px 18px;
  justify-content: start;
  margin: 8px 0 8px;
}
.cases-phones--more {
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  gap: 18px 14px;
}
.case-phone {
  margin: 0;
  max-width: 220px;
}
.cases-phones--more .case-phone { max-width: 180px; }
.case-phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.case-phone figcaption {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.case-phone p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 820px) {
  .cases-phones {
    grid-template-columns: repeat(2, minmax(0, 180px));
    justify-content: center;
  }
  .cases-phones--more {
    grid-template-columns: repeat(2, minmax(0, 160px));
    justify-content: center;
  }
  .case-phone { max-width: 180px; }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal="scale"] { transform: scale(0.94) translateY(16px); }
[data-reveal="scale"].is-in { transform: none; }

@media (max-width: 820px) {
  .site-header {
    top: 8px;
    border-radius: 22px;
    width: calc(100% - 16px);
  }
  .hero { min-height: auto; padding-top: 20px; }
  .hero__brand-mark { font-size: clamp(3.2rem, 18vw, 5rem); }
  .shots {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .shots figure:nth-child(1),
  .shots figure:nth-child(2),
  .shots figure:nth-child(3) {
    transform: none;
  }
  .pair { grid-template-columns: 1fr; }
  .links .card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .links .card::before { padding-top: 0; }
  .links .card p { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .site-fx, .ticker__track { animation: none !important; }
  .ticker__track { width: auto; flex-wrap: wrap; justify-content: center; }
}
