/* CubTime marketing site — shared styles (loaded after the Tailwind Play CDN script) */

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base ---------- */
/* Fallback if the Tailwind CDN fails: unsized inline icons stay icon-sized. Zero specificity, so Tailwind's w-/h- utilities still win. */
:where(svg:not([width])) { width: 1.25em; height: 1.25em; }
html { color-scheme: dark; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.font-serif-italic { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Anchored sections clear the fixed header */
[id] { scroll-margin-top: 5rem; }

/* Skip link + screen-reader-only helper */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; border-radius: .6rem;
  background: #fff; color: #05070f; font-weight: 600; font-size: .875rem;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

/* Consistent keyboard focus ring */
:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }
input:focus-visible { outline-offset: 2px; }
/* <main> is a programmatic focus target for the skip link, not an interactive control */
main:focus { outline: none; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(5, 7, 15, 0.7);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color .3s ease, border-color .3s ease;
}
html.js .site-header:not(.is-scrolled):not(.is-open):not(.header-solid) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Sub-pages have no hero behind the header: .header-solid keeps the blurred state from the start */
.site-header [aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #60a5fa;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.mobile-menu [aria-current="page"] { text-underline-offset: 6px; }
/* creative.html: on phones the long back link shortens (full text stays for screen readers) so the wordmark can stay */
.back-short { display: none; }
@media (max-width: 639px) {
  .back-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .back-short { display: inline; }
}

/* ---------- Hero / CTA backdrop fade ----------
   Decorative layers fade out over their last 160px so the section edge leaves no visible step. */
.fade-bottom, .fade-y, .fade-bottom-section {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent 100%);
}
.fade-y {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
}
.hero-fade-host::after {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent 100%);
}
.fade-both-host::after {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
}

/* ---------- Grain, glow, borders ---------- */
.grain { position: relative; }
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: overlay;
}

.hero-glow {
  background: radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.08) 30%, transparent 60%);
  filter: blur(60px);
}

.gradient-border {
  position: relative;
  background: linear-gradient(180deg, #0a0f1e, #0f1b2e);
  border-radius: 24px;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
/* Gradient starts at #2b6be8 so white label text keeps >= 4.5:1 (AA) */
.btn-primary {
  position: relative;
  background: linear-gradient(180deg, #2b6be8, #1d4ed8);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 0 0 1px rgba(59, 130, 246, 0.5),
    0 10px 30px -10px rgba(59, 130, 246, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(59, 130, 246, 0.6),
    0 16px 40px -10px rgba(59, 130, 246, 0.7);
}
.btn-ghost {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

/* ---------- Scroll reveal (hidden state only when JS is on) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Feature (bento) cards ---------- */
.feature-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
}
.feature-card::before {
  /* faint top-edge highlight */
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
}
/* .reveal sets its own transition; keep hover responsive once visible */
html.js .feature-card.reveal.is-visible {
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.vignette {
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
}

.popular-ring {
  box-shadow: 0 0 0 1.5px rgba(59, 130, 246, 0.5), 0 30px 60px -20px rgba(59, 130, 246, 0.35);
}

/* ---------- FAQ ---------- */
details > summary { list-style: none; cursor: pointer; border-radius: 1rem; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; flex: none; }
details:focus-within { border-color: rgba(96, 165, 250, 0.35); }

/* ---------- Mobile menu ---------- */
.mobile-menu[hidden] { display: none; }
/* Header row is h-16 (4rem) + 1px border; the open menu scrolls inside what is left */
.mobile-menu {
  max-height: calc(100vh - 4.0625rem);
  max-height: calc(100dvh - 4.0625rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.menu-open, html.menu-open body { overflow: hidden; }

/* ---------- "Testers wanted!" nav CTA ----------
   Deliberately amber, not the site's blue: the primary CTA is already blue, and
   a second blue button beside it competes instead of standing out. */
.nav-cta {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .85rem; border-radius: 9999px;
  font-weight: 600; white-space: nowrap; line-height: 1.2;
  color: #fcd34d;
  background: rgba(251, 191, 36, .12);
  border: 1px solid rgba(251, 191, 36, .35);
  transition: all .2s;
}
.nav-cta:hover { background: rgba(251, 191, 36, .20); color: #fde68a; border-color: rgba(251, 191, 36, .55); }
.nav-cta::before {
  content: ''; width: .45rem; height: .45rem; border-radius: 9999px;
  background: #fbbf24; flex: none;
  animation: cta-pulse 2s ease-in-out infinite;
}
@keyframes cta-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

/* ---------- Hero product preview ---------- */
.preview-panel {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
}
.preview-glow { box-shadow: 0 40px 120px -30px rgba(59, 130, 246, 0.35); }
.preview-card { box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 60px -20px rgba(59, 130, 246, 0.35); }
.float-soft { animation: float-soft 7s ease-in-out infinite; }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Reduced motion: switch off everything animated ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-float, .animate-ping, .animate-pulse-soft, .animate-fade-up, .animate-fade-in,
  .float-soft, .nav-cta::before { animation: none !important; }
  .animate-fade-up, .animate-fade-in { opacity: 1 !important; }
  html.js .reveal, html.js .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .feature-card, .btn-primary, .btn-ghost, .faq-icon, .site-header, .nav-cta, .skip-link { transition: none !important; }
  .feature-card:hover, .btn-primary:hover { transform: none; }
}

/* FAQ summary: inset focus ring so overflow-hidden on <details> doesn't clip it */
details > summary:focus-visible { outline-offset: -2px; }

/* Decorative step numerals: intentionally faint (cub-500 @ 30%). Painted as a
   gradient clipped to the glyphs so they are not treated as informational text. */
.numeral {
  background-image: linear-gradient(rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.3));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}


/* =====================================================================
   Shared components used by the sub-pages
   ===================================================================== */

/* Static card with the same top-edge highlight as the home bento cards */
.surface-card { position: relative; }
.surface-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}

/* Status chip (downloads): a state, not a button, so nobody taps it. Android builds
   are withheld while the Play closed test runs. */
.badge-soon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  cursor: default;
}

/* Numbered steps for <ol class="steps"> (downloads Quick Setup) */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; min-height: 1.75rem; display: block; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.2rem; width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem;
  background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Text links inside running copy are always underlined (not colour alone) */
.link-inline { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Landing pages (testers, creative) ---------- */
.field {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  min-height: 3rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.field:focus { border-color: #60a5fa; background: rgba(255, 255, 255, 0.10); }
.step-num {
  flex: none; width: 2rem; height: 2rem; border-radius: 9999px;
  display: grid; place-items: center; font-weight: 700; font-size: 0.875rem;
  background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3);
}
.progress-track { background: rgba(255, 255, 255, 0.08); border-radius: 9999px; overflow: hidden; }
.progress-fill {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  height: 100%; border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }

/* ---------- Legal pages (privacy, terms, delete-account) ---------- */
.legal-wrap { margin: 0 auto; padding-inline: 1.5rem; max-width: calc(68ch + 3rem); }
@media (min-width: 1280px) {
  .legal-wrap { max-width: calc(68ch + 3rem + 15rem + 4rem); }
  .legal-grid { display: grid; grid-template-columns: minmax(0, 68ch) 15rem; gap: 4rem; }
}
.legal-toc { position: sticky; top: 6rem; align-self: start; }
.legal-toc ul { margin-top: 0.75rem; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.legal-toc a {
  display: block; margin-left: -1px; padding: 0.35rem 0 0.35rem 0.9rem;
  font-size: 0.8125rem; line-height: 1.4; color: rgba(255, 255, 255, 0.65);
  border-left: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.legal-toc a:hover { color: #fff; }
.legal-toc a[aria-current="location"] { color: #fff; border-left-color: #60a5fa; }

.prose-policy { font-size: 1rem; }
.prose-policy > :first-child { margin-top: 0; }
.prose-policy h2 {
  font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
  margin-top: 3.5rem; margin-bottom: 1rem; padding-top: 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.prose-policy h3 { font-size: 1.0625rem; font-weight: 600; color: rgba(255, 255, 255, 0.88); margin-top: 2rem; margin-bottom: 0.6rem; }
.prose-policy p, .prose-policy li { color: rgba(255, 255, 255, 0.68); line-height: 1.75; }
.prose-policy p { margin-bottom: 1.1rem; }
.prose-policy ul, .prose-policy ol { margin-bottom: 1.25rem; padding-left: 1.6rem; }
.prose-policy ul li { list-style: disc; margin-bottom: 0.5rem; padding-left: 0.25rem; }
.prose-policy ol li { list-style: decimal; margin-bottom: 0.5rem; padding-left: 0.25rem; }
.prose-policy li::marker { color: #60a5fa; }
.prose-policy a { color: #60a5fa; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(96, 165, 250, 0.45); }
.prose-policy a:hover { color: #93c5fd; text-decoration-color: currentColor; }
.prose-policy strong { color: rgba(255, 255, 255, 0.94); font-weight: 600; }
.prose-policy em { color: rgba(255, 255, 255, 0.8); }
.prose-policy code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.875em; color: #bfdbfe;
}
.prose-policy table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.92rem; }
.prose-policy th, .prose-policy td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; }
.prose-policy th { color: rgba(255, 255, 255, 0.65); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.prose-policy td { color: rgba(255, 255, 255, 0.75); }

/* "The Short Version" callout: tinted bento-style card */
.prose-policy .tldr {
  position: relative; margin: 0 0 1rem; padding: 1.5rem 1.75rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 1rem;
}
.prose-policy .tldr::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.45), transparent);
}
.prose-policy .tldr h2 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: #93c5fd; margin: 0 0 0.9rem; padding: 0; border: 0;
}
.prose-policy .tldr ul { margin: 0; padding-left: 1.3rem; }
.prose-policy .tldr li { color: rgba(255, 255, 255, 0.82); margin-bottom: 0.5rem; line-height: 1.65; }
.prose-policy .tldr li:last-child { margin-bottom: 0; }
/* delete-account: primary mail button */
.prose-policy a.cta {
  display: inline-block; background: linear-gradient(180deg, #2b6be8, #1d4ed8); color: #fff;
  font-weight: 600; padding: 0.8rem 1.6rem; border-radius: 0.75rem; text-decoration: none;
  margin: 0.5rem 0 1.5rem; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5), 0 10px 30px -10px rgba(59, 130, 246, 0.6);
}
.prose-policy a.cta:hover { color: #fff; filter: brightness(1.1); }
/* Tables scroll sideways inside their own region on narrow screens; words stay whole */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.75rem;
}
.table-scroll table { margin: 0; min-width: 36rem; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll:focus-visible { outline-offset: 0; }
@media (max-width: 639px) {
  .prose-policy table { font-size: 0.85rem; }
  .prose-policy th, .prose-policy td { padding: 0.65rem 0.5rem; }
}
