/* ALink site — shared styles (index.html + privacy.html). No build step. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --bg-2: #f1f3f8;
  --fg: #1d1d1f;
  --muted: #5b5f66;
  --line: rgba(0, 0, 0, .09);
  --card: rgba(255, 255, 255, .72);
  --card-solid: #fff;
  --accent: #1a68e0;
  --accent-2: #4fb0ff;
  --accent-3: #7b61ff;
  --on-accent: #fff;
  --shadow: 0 30px 60px -20px rgba(20, 40, 90, .25), 0 10px 20px -10px rgba(20, 40, 90, .12);
  --glass-blur: saturate(180%) blur(20px);
  --orb-a: rgba(79, 160, 255, .35);
  --orb-b: rgba(123, 97, 255, .22);
  --frame: #15161a;
  --radius: 1.75rem;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #05070c;
    --bg-2: #0c1019;
    --fg: #f5f5f7;
    --muted: #a3a8b3;
    --line: rgba(255, 255, 255, .1);
    --card: rgba(255, 255, 255, .055);
    --card-solid: #11151f;
    --accent: #5aa2ff;
    --accent-2: #7cc4ff;
    --accent-3: #a18cff;
    --on-accent: #04101f;
    --shadow: 0 30px 70px -20px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .6);
    --orb-a: rgba(40, 110, 255, .28);
    --orb-b: rgba(120, 80, 255, .2);
    --frame: #2a2c33;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  /* Fluid root size: 16px on phones/laptops, grows to 22px on very wide (4K @1x) screens */
  font-size: clamp(16px, 0.35vw + 11.5px, 22px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: .06em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: .4rem; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; text-wrap: balance; word-break: keep-all; overflow-wrap: break-word; }
p, li, summary { text-wrap: pretty; }
p { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: .6rem;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }
.grad-text {
  background: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 45%, var(--accent-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--muted); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}
.nav { display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.brand img { width: 1.75rem; height: 1.75rem; border-radius: 22%; }
.nav-links { display: flex; gap: 1.6rem; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.nav-links a:hover { color: var(--fg); }
.lang-btn {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  color: var(--fg); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: .35rem .85rem; min-height: 2.25rem; min-width: 2.75rem;
}
.lang-btn:hover { border-color: var(--accent); }
@media (max-width: 47.99em) {
  .nav-links { display: none; }
  .lang-btn { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  border-radius: 999px; padding: .85rem 1.5rem; min-height: 3rem;
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-store { background: var(--fg); color: var(--bg); box-shadow: var(--shadow); }
.btn-store svg { width: 1.4rem; height: 1.4rem; flex: none; }
.btn-store small { display: block; font-size: .7rem; font-weight: 500; opacity: .8; letter-spacing: .02em; }
.btn-ghost { color: var(--fg); border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(3rem, 8vw, 7rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
@supports (overflow: clip) { .hero { overflow: visible; overflow-x: clip; } }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.hero::before { width: 46rem; height: 46rem; right: -12rem; top: -14rem; background: radial-gradient(circle, var(--orb-a), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { width: 40rem; height: 40rem; left: -16rem; bottom: -18rem; background: radial-gradient(circle, var(--orb-b), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-4rem, 3rem, 0) scale(1.12); } }

.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 60em) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.series { font-size: clamp(1rem, .9rem + .5vw, 1.25rem); color: var(--muted); margin-bottom: 1.25rem; }
.series strong { color: var(--fg); }
.hero-title { font-size: clamp(2.5rem, 1.2rem + 4.2vw, 4.75rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.hero-title span { display: inline-block; padding-bottom: .06em; }
.hero-app { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1rem; }
.hero-app img { width: 4.5rem; height: 4.5rem; border-radius: 22.5%; box-shadow: var(--shadow); }
.hero-app h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
.hero-app p { color: var(--muted); font-size: .95rem; }
.hero-lead { font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem); color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }
.hero-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

/* ---------- Device frames (pure CSS) ---------- */
.phone {
  position: relative; width: 100%; max-width: 20rem;
  padding: 3.2%; border-radius: 13% / 6%;
  background: var(--frame);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone img { width: 100%; aspect-ratio: 1284 / 2778; border-radius: 10.5% / 4.9%; object-fit: cover; background: #f2f2f7; }
.phone::before { /* dynamic-island style pill */
  content: ""; position: absolute; left: 50%; top: 4.4%; width: 30%; height: 3.2%;
  transform: translateX(-50%); background: #000; border-radius: 999px; z-index: 1;
}
.hero-devices { position: relative; isolation: isolate; display: flex; justify-content: center; }
.hero-devices .phone { width: clamp(13.5rem, 24vw, 21rem); max-width: none; flex: none; }
.hero-devices .phone.back {
  position: absolute; left: 50%; top: 7%; z-index: -1;
  transform: translateX(-92%) rotate(-7deg) scale(.86); transform-origin: 50% 100%;
}
.hero-devices .phone.front { transform: translateX(20%) rotate(2deg); }
@media (max-width: 30em) {
  .hero-devices .phone.back { display: none; }
  .hero-devices .phone.front { transform: none; width: min(15rem, 70vw); }
}

.fold {
  position: relative; width: 100%;
  padding: 1.6%; border-radius: 4.5% / 6.4%;
  background: var(--frame); box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.fold img { width: 100%; aspect-ratio: 2853 / 2007; border-radius: 3.2% / 4.6%; object-fit: cover; background: #f2f2f7; }
.fold::after { /* hinge */
  content: ""; position: absolute; top: 1.6%; bottom: 1.6%; left: 50%; width: 2px; transform: translateX(-50%);
  background: linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .14));
}
.fold-closed { max-width: 13rem; padding: 3.5%; border-radius: 12% / 8.5%; }
.fold-closed::after { display: none; }
.fold-closed img { aspect-ratio: 1398 / 2034; border-radius: 9% / 6.2%; }

/* ---------- Quick highlights strip ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; padding: 0; margin: 0; list-style: none; }
.chips li {
  padding: .5rem 1rem; border-radius: 999px; font-size: .9rem;
  background: var(--card); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 10vw, 9rem) 0; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(3rem, 6vw, 5rem); }
.section-head h2 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.25rem); font-weight: 800; margin: .6rem 0 1rem; }
.section-head p { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: var(--muted); }

.feature { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature + .feature { margin-top: clamp(5rem, 10vw, 9rem); }
@media (min-width: 48em) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature.reverse .feature-media { order: -1; }
}
.feature-text h3 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem); font-weight: 800; margin: .5rem 0 1.1rem; }
.feature-text > p { font-size: clamp(1.05rem, 1rem + .45vw, 1.35rem); color: var(--muted); max-width: 30em; }
.feature-media { display: flex; justify-content: center; position: relative; isolation: isolate; }
.feature-media::before {
  content: ""; position: absolute; inset: -5% 0; z-index: -1;
  background: radial-gradient(closest-side, var(--orb-a), transparent);
}
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; }
.ticks li { display: flex; gap: .7rem; align-items: flex-start; }
.ticks li::before {
  content: ""; flex: none; width: 1.3rem; height: 1.3rem; margin-top: .2rem; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}

/* Duo / foldable */
.duo { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: end; }
@media (min-width: 48em) { .duo { grid-template-columns: 3fr 1fr; } }
.duo figure { margin: 0; }
.duo figcaption { margin-top: 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.duo .closed { display: flex; flex-direction: column; align-items: center; }

/* Bento grid */
.bento { display: grid; gap: 1.25rem; }
@media (min-width: 48em) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .bento { grid-template-columns: repeat(3, 1fr); } .bento .wide { grid-column: span 2; } }
.card {
  position: relative; overflow: hidden;
  padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); margin: 1.1rem 0 .6rem; }
.card p { color: var(--muted); }
.card .ticks { margin-top: 1.1rem; font-size: .95rem; }
.icon-badge {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.icon-badge svg { width: 1.6rem; height: 1.6rem; }
.card.dark-card {
  background: radial-gradient(120% 120% at 100% 0%, #1b3b7a 0%, #0a0f1d 60%); color: #f5f5f7; border-color: rgba(255,255,255,.08);
}
.card.dark-card p, .card.dark-card .ticks { color: #c3cad6; }

/* Pro banner */
.pro {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--radius) * 1.3); padding: clamp(2.5rem, 6vw, 5rem);
  background: linear-gradient(120deg, #0b1630 0%, #173c8a 45%, #5a3fd6 100%);
  color: #fff; text-align: center;
}
.pro::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; aspect-ratio: 1; z-index: -1;
  background: radial-gradient(circle, rgba(120, 190, 255, .45), transparent 65%); filter: blur(30px);
}
.pro .eyebrow { color: #a9cdff; }
.pro h2 { font-size: clamp(2.2rem, 1.3rem + 4vw, 4.5rem); font-weight: 800; margin: .6rem 0 1rem; }
.pro p { color: #d5e1f7; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 36rem; margin-inline: auto; }
.pill { display: inline-block; margin-top: 1.6rem; padding: .45rem 1.1rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-weight: 600; font-size: .9rem; }

/* Products */
.products { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.product { display: flex; flex-direction: column; gap: 1rem; }
.product-head { display: flex; align-items: center; gap: 1rem; }
.product-head img { width: 4rem; height: 4rem; border-radius: 22.5%; }
.product-head h3 { margin: 0; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; background: color-mix(in srgb, #22a559 18%, transparent); color: #148043; }
@media (prefers-color-scheme: dark) { .status { color: #4fd68a; } }
.status.soon { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.product .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .6rem; }
.product .actions .btn { padding: .6rem 1.1rem; min-height: 2.75rem; font-size: .9rem; }
.product.placeholder { border-style: dashed; align-items: flex-start; justify-content: center; }
.ph-icon { width: 4rem; height: 4rem; border-radius: 22.5%; display: grid; place-items: center; border: 2px dashed var(--line); color: var(--muted); font-size: 1.8rem; font-weight: 300; }

/* Support */
.support-grid { display: grid; gap: 1.25rem; }
@media (min-width: 56em) { .support-grid { grid-template-columns: 1fr 1.6fr; align-items: start; } }
.contact-card a.mail { font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); font-weight: 700; word-break: break-all; }
.contact-card ul { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .6rem; }
.faq { display: grid; gap: .75rem; }
.faq details {
  border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.3rem; position: relative; font-weight: 600;
  border-radius: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.3rem; top: 50%; width: .6rem; height: .6rem; margin-top: -.4rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -.1rem; }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--fg); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.disclaimer { margin-top: 1rem; max-width: 46rem; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(2.5rem); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .1s; }
.js .reveal[data-delay="2"] { transition-delay: .2s; }
.js .reveal[data-delay="3"] { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Document pages (privacy.html) ---------- */
.doc { max-width: 46rem; padding: clamp(2.5rem, 6vw, 5rem) 0 4rem; }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 800; margin: 0 0 .4rem; }
.doc h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; }
.doc p, .doc ul { margin: 0 0 1rem; }
.doc li { margin: .35rem 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 3.5rem 0; }

@media print {
  .site-header, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
