/* Xdrive — Apple-style marketing site (shared visual language with xmac.xox.vn). */
:root {
  --bg: #fbfbfd;
  --bg-elevated: #ffffff;
  --bg-gray: #f5f5f7;
  --tile: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.1);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --success: #1d9b4f;
  --mint: #2fbf8f;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius-tile: 28px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --bg-gray: #101012;
    --tile: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --hairline: rgba(255, 255, 255, 0.14);
    --accent-text: #2997ff;
    --success: #30d158;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1024px, 100% - 44px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 44px); }

/* ---------- Typography ---------- */
.display, .headline, h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif; margin: 0; }
.display { font-size: clamp(56px, 11vw, 112px); font-weight: 700; line-height: 1.02; letter-spacing: -0.045em; }
.headline { font-size: clamp(36px, 6vw, 64px); font-weight: 700; line-height: 1.06; letter-spacing: -0.035em; text-align: center; }
.headline-small { font-size: clamp(32px, 4.5vw, 48px); }
.eyebrow { margin: 0 0 10px; text-align: center; font-size: 19px; font-weight: 600; letter-spacing: 0.01em; color: var(--text-2); }
.eyebrow-accent { background: linear-gradient(90deg, #5ee6b8, #4fc3f7 45%, #2997ff 75%, #7a8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin: 24px auto 0; text-align: center; font-size: clamp(19px, 2vw, 21px); line-height: 1.43; color: var(--text-2); letter-spacing: 0.004em; }
.lead-left { text-align: left; margin-left: 0; }
.muted { color: var(--text-2); }

/* ---------- Global nav (translucent material) ---------- */
.globalnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.globalnav-inner { display: flex; align-items: center; gap: 24px; width: min(1024px, 100% - 32px); height: 48px; margin: 0 auto; font-size: 13px; letter-spacing: -0.01em; }
.globalnav-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 15px; }
.globalnav-brand:hover { text-decoration: none; }
.globalnav-links { display: flex; gap: 28px; margin: 0 auto; padding: 0; list-style: none; }
.globalnav-links a { color: var(--text); opacity: 0.8; transition: opacity 150ms var(--ease); }
.globalnav-links a:hover { opacity: 1; text-decoration: none; }
.globalnav-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.globalnav-lang { color: var(--text); opacity: 0.8; font-weight: 500; }
@media (max-width: 720px) { .globalnav-links { display: none; } }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 980px;
  background: var(--accent); color: #fff; font: inherit; font-size: 17px; font-weight: 400;
  cursor: pointer; transition: background 150ms var(--ease), transform 100ms var(--ease);
}
.pill:hover { background: var(--accent-hover); text-decoration: none; }
.pill:active { transform: scale(0.97); }
.pill[disabled] { opacity: 0.5; cursor: default; }
.pill-small { min-height: 28px; padding: 0 12px; font-size: 12px; }
.pill-large { min-height: 50px; padding: 0 28px; font-size: 17px; }
.pill-secondary { background: transparent; color: var(--accent-text); box-shadow: inset 0 0 0 1px currentColor; }
.pill-secondary:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.link-arrow { font-size: 19px; }
.link-arrow::after { content: " ›"; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms ease; }
  .meter-fill, .badge-up { animation: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 0; text-align: center; overflow: hidden; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 148px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.22)); margin-bottom: 20px; }
.hero-subtitle { margin: 14px 0 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; line-height: 1.18; letter-spacing: -0.02em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; margin-top: 32px; }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--text-2); }

.mac-screen {
  position: relative; margin: 64px auto -1px; max-width: 980px; aspect-ratio: 16 / 9;
  border-radius: 22px 22px 0 0; overflow: hidden; box-shadow: var(--shadow);
  background: radial-gradient(120% 90% at 80% 0%, #8ff0cf 0%, #4fb8f0 28%, #2f63c9 60%, #14254f 100%);
}
.menubar { display: flex; align-items: center; gap: 18px; height: 28px; padding: 0 16px; font-size: 13px; color: #fff; background: rgba(0, 0, 0, 0.18); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.menubar-apple { width: 13px; height: 15px; background: #fff; border-radius: 50% 50% 45% 45%; }
.menubar-app { font-weight: 700; }
.menubar-spacer { flex: 1; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section-dark { background: #000; color: #f5f5f7; --text-2: #a1a1a6; }
.section-gray { background: var(--bg-gray); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 64px 0 0; text-align: center; }
.stat { display: flex; flex-direction: column-reverse; }
.stat dd { margin: 0; font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -0.03em; }
.stat dt { color: #a1a1a6; font-size: 15px; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.tile { display: flex; flex-direction: column; gap: 8px; min-height: 280px; padding: 32px; border-radius: var(--radius-tile); background: var(--tile); overflow: hidden; }
.tile h3 { font-size: 24px; font-weight: 700; line-height: 1.17; letter-spacing: -0.02em; }
.tile p { margin: 0; color: var(--text-2); font-size: 17px; }
.tile-icon { width: 48px; height: 48px; margin-bottom: auto; padding-bottom: 20px; box-sizing: content-box; fill: none; stroke: var(--accent-text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tile-wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 32px; }
.tile-text { flex: 1; display: grid; gap: 8px; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; flex-direction: column; align-items: stretch; }
  .volume, .search-panel, .providers { flex-basis: auto; }
  .tile { min-height: 0; padding: 28px; }
}


/* Privacy */
.section-privacy { text-align: center; }
.privacy-icon { display: block; width: 64px; height: 64px; margin: 0 auto 20px; fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 32px 0 0; padding: 0; list-style: none; font-weight: 600; }
.checks li::before { content: "✓"; margin-right: 8px; color: var(--success); }
.checks-left { flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; font-weight: 400; }

/* Pricing */
.price-card { display: flex; flex-direction: column; align-items: center; margin-top: 48px; padding: 48px clamp(24px, 6vw, 56px); border-radius: 32px; background: var(--bg-elevated); box-shadow: var(--shadow); text-align: center; }
.price { margin: 16px 0 0; font-size: clamp(56px, 9vw, 80px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.price-alt { margin: 8px 0 0; color: var(--text-2); }
.pay-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.price-try { margin: 24px 0 0; color: var(--text-2); }
.price-try .link-arrow { font-size: inherit; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 19px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 26px; line-height: 0.9; color: var(--text-2); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 22px; color: var(--text-2); }

/* Footer */
.footer { padding: 40px 0 56px; background: var(--bg-gray); font-size: 12px; color: var(--text-2); border-top: 1px solid var(--hairline); }
.footer-inner { display: grid; gap: 12px; }
.footer-tagline { margin: 0; color: var(--text); font-weight: 600; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--text-2); }
.footer-copy { margin: 8px 0 0; }

/* ---------- Plain pages (terms) ---------- */
.page-plain { background: var(--bg-gray); }
.page-main { padding: 64px 0 96px; min-height: 70vh; }
.page-main .headline { text-align: left; margin-bottom: 24px; }
.prose h2 { margin: 36px 0 8px; font-size: 22px; letter-spacing: -0.02em; }
.prose p { color: var(--text-2); }
@media (prefers-reduced-transparency: reduce) {
  .globalnav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dashboard { background: #f6f6f8; }
}
.headline, .lead { text-wrap: balance; }

/* ---------- Hero mockup: Finder showing the Xdrive volume + menu bar popover ---------- */
.menubar-app-icon img { display: block; border-radius: 4px; }
.finder { position: absolute; left: 5%; top: 16%; width: min(470px, 50%); border-radius: 14px; overflow: hidden; text-align: left; color: #1d1d1f; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); font-size: 13px; }
.finder-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.finder-bar span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.finder-bar span:nth-child(2) { background: #febc2e; }
.finder-bar span:nth-child(3) { background: #28c840; }
.finder-bar strong { margin-left: 10px; }
.finder-body { display: grid; grid-template-columns: 120px 1fr; }
.finder-side { margin: 0; padding: 10px 8px; list-style: none; background: rgba(0, 0, 0, 0.035); font-size: 12px; }
.finder-side li { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; }
.finder-side .side-head { color: #86868b; font-size: 11px; font-weight: 600; }
.finder-side .is-active { background: rgba(0, 0, 0, 0.07); font-weight: 600; }
.side-disk { width: 12px; height: 9px; border-radius: 2px; background: #2f63c9; }
.finder-list { margin: 0; padding: 6px; list-style: none; }
.finder-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; }
.finder-list li.is-uploading { background: rgba(0, 113, 227, 0.1); }
.fi { width: 18px; height: 22px; border-radius: 3px; background: #8e8e93; flex: none; }
.fi-folder { height: 15px; border-radius: 3px; background: #5ac8fa; }
.fi-video { background: #af52de; } .fi-img { background: #34c759; } .fi-doc { background: #ff3b30; } .fi-zip { background: #8e8e93; }
.badge { margin-left: auto; width: 16px; height: 16px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 10px; line-height: 1; color: #fff; }
.badge-synced { background: #34c759; } .badge-synced::after { content: "✓"; }
.badge-cloud { background: none; color: #86868b; font-size: 14px; } .badge-cloud::after { content: "☁︎"; }
.badge-pin { background: #2f63c9; } .badge-pin::after { content: "↓"; }
.badge-up { border: 2px solid rgba(0, 113, 227, 0.25); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dashboard {
  position: absolute; top: 36px; right: 16px; width: min(320px, 44%);
  padding: 14px; border-radius: 18px; text-align: left; color: #1d1d1f;
  background: rgba(246, 246, 248, 0.8); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
  font-size: 13px; display: grid; gap: 8px;
}
.dash-row { display: flex; align-items: center; gap: 8px; }
.dash-badge { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: var(--mint); color: #fff; font-size: 11px; font-weight: 600; }
.dash-tile { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.72); }
.dash-label { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-meta { font-size: 11px; color: #6e6e73; }
.dash-ok { color: #1d9b4f; font-weight: 600; }
.dash-big { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.dash-mint { color: var(--mint); }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dash-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.dash-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dash-drive { grid-template-columns: 1fr auto; align-items: center; }
@media (max-width: 600px) {
  .finder { display: none; }
  .dashboard { left: 12px; right: 12px; width: auto; font-size: 12px; }
  .mac-screen { aspect-ratio: 4 / 5; }
  .menubar span:nth-child(n+4):not(.menubar-spacer):not(.menubar-app-icon):not(.menubar-clock) { display: none; }
}

/* ---------- Space section: cloud vs SSD meter ---------- */
.meter { display: grid; gap: 18px; max-width: 760px; margin: 56px auto 0; padding: 28px 32px; border-radius: 24px; background: linear-gradient(180deg, #1c1c1e, #111113); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(47, 191, 143, 0.45); }
.meter-row { display: grid; grid-template-columns: 130px 1fr 80px; align-items: center; gap: 16px; font-size: 15px; }
.meter-name { color: #a1a1a6; }
.meter-value { text-align: right; font-weight: 700; font-size: 19px; }
.meter-track { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1600ms var(--ease); }
.meter-cloud { width: 100%; background: linear-gradient(90deg, #2997ff, #4fc3f7); }
.meter-mac { width: 1.2%; min-width: 6px; background: #5ee6b8; }
.meter.is-visible .meter-fill { transform: none; }
@media (max-width: 600px) { .meter { padding: 22px; } .meter-row { grid-template-columns: 1fr auto; } .meter-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Feature tile visuals ---------- */
.volume { flex: 0 0 44%; display: grid; justify-items: center; gap: 12px; padding: 24px; border-radius: 20px; background: var(--bg-elevated); box-shadow: 0 1px 0 var(--hairline); }
.volume-disk img { display: block; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2)); }
.volume code { font: 600 15px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0; }
.volume-apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.volume-apps span { padding: 5px 10px; border-radius: 8px; background: var(--tile); font-size: 12px; color: var(--text-2); }
.tile-menu { justify-content: flex-end; }
.ctx-menu { display: grid; gap: 2px; margin-bottom: auto; padding: 6px; width: max-content; max-width: 100%; border-radius: 10px; background: var(--bg-elevated); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 0.5px var(--hairline); font-size: 14px; }
.ctx-menu span { padding: 5px 12px; border-radius: 6px; }
.ctx-menu span:first-child { background: var(--accent); color: #fff; }
.search-panel { flex: 0 0 48%; padding: 12px; border-radius: 16px; background: var(--bg-elevated); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 0 0 0.5px var(--hairline); font-size: 14px; }
.search-field { padding: 8px 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 19px; color: var(--text-2); }
.search-field span { color: var(--text); }
.search-panel ul { margin: 6px 0 0; padding: 0; list-style: none; }
.search-panel li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.search-panel li:first-child { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.search-panel em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-2); }

/* ---------- Privacy match code ---------- */
.match-code { display: inline-grid; gap: 6px; margin: 36px auto 0; padding: 18px 28px; border-radius: 18px; background: var(--tile); }
.section-privacy .container { display: flex; flex-direction: column; align-items: center; }
.match-label { font-size: 13px; color: var(--text-2); }
.match-digits { font: 700 clamp(30px, 5vw, 40px)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; }

/* ---------- Storage tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 48px; }
.tier { position: relative; display: grid; gap: 4px; padding: 28px 20px; border-radius: 24px; background: var(--bg-elevated); text-align: center; box-shadow: 0 1px 0 var(--hairline); }
.tier-size { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.tier-price { margin: 8px 0 0; font-size: 21px; font-weight: 600; }
.tier-note { margin: 0; font-size: 13px; color: var(--text-2); }
.tier-free .tier-price { color: var(--mint); }
.section-gray .price-try { text-align: center; font-size: 14px; max-width: 640px; margin: 24px auto 0; }
@media (max-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tiers { grid-template-columns: repeat(2, 1fr); } .tier-free { grid-column: 1 / -1; } }
.providers { flex: 0 0 44%; display: grid; gap: 12px; }
.provider { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-radius: 16px; background: var(--bg-elevated); box-shadow: 0 1px 0 var(--hairline); font-weight: 600; border-left: 5px solid #f38020; }
.provider-gd { border-left-color: #34a853; }
.provider em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--text-2); }
.tiers-label { margin: 72px 0 0; text-align: center; font-size: 19px; font-weight: 600; color: var(--text-2); }
.tiers-label + .tiers { margin-top: 24px; }
