/* =========================================================================
   Cardora — Marketing site styles
   Premium, Apple-native dark aesthetic. Dependency-free.
   ========================================================================= */

/* ---- Design tokens --------------------------------------------------- */
:root {
  --bg: #0a0a0c;
  --bg-elev: #121216;
  --surface: #17171c;
  --surface-2: #1e1e24;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f5f7;
  --text-secondary: #b4b4bd;
  --text-tertiary: #85858f;

  --gold: #e5b94e;
  --gold-bright: #f3cd6b;
  --gold-deep: #c69833;
  --gold-tint: rgba(229, 185, 78, 0.12);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 20px 60px -20px rgba(0, 0, 0, 0.7);

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ----------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
picture {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--gold);
  color: #14110a;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ---- Layout helpers -------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(64px, 12vw, 128px);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-lede {
  margin-top: 18px;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

.text-center {
  text-align: center;
}

.text-center .section-lede {
  margin-inline: auto;
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), opacity 0.18s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #17120a;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #f7d783, var(--gold));
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Header / navigation -------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand .club {
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.98rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links .nav-cta {
  color: var(--gold-bright);
  font-weight: 600;
}

/* ---- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(72px, 14vw, 150px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(229, 185, 78, 0.14), transparent 60%),
    radial-gradient(80% 60% at 50% 120%, rgba(229, 185, 78, 0.06), transparent 55%);
  pointer-events: none;
}

.hero-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 30px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1c1c22, #101014);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.hero-mark span {
  font-size: 44px;
  line-height: 1;
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 24ch;
  margin: 0 auto;
}

.hero-lede {
  margin: 22px auto 0;
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* App Store badge button */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 26px 12px 22px;
  border-radius: 14px;
  background: #f5f5f7;
  color: #0a0a0c;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.appstore-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  text-decoration: none;
}

.appstore-badge svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.appstore-badge .badge-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.appstore-badge .badge-small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
}

.appstore-badge .badge-big {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.appstore-badge[aria-disabled="true"] {
  opacity: 0.9;
}

/* ---- Compliance strip ----------------------------------------------- */
.compliance {
  border-block: 1px solid var(--border);
  background: var(--bg-elev);
}

.compliance-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: center;
  padding-block: 22px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.compliance-inner span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compliance-inner .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ---- Feature sections ----------------------------------------------- */
.features {
  display: grid;
  gap: clamp(56px, 9vw, 96px);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.feature:nth-child(even) .feature-media {
  order: -1;
}

.feature-body h3 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.feature-body p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.stat-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.stat-chip dt {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.stat-chip dd {
  margin: 4px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature-list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
}

.feature-list .check {
  color: var(--gold);
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}

.feature-media {
  display: grid;
  place-items: center;
}

/* ---- Device / phone frame ------------------------------------------- */
.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #24242b, #101014);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.phone::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 24px;
  background: #050506;
  border-radius: var(--radius-pill);
  z-index: 3;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--bg);
  display: block;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder screen content when no real screenshot exists */
.screen-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(229, 185, 78, 0.12), transparent 60%),
    var(--bg-elev);
}

.screen-placeholder .club {
  font-size: 40px;
  color: var(--gold);
}

.screen-placeholder .label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.screen-placeholder .hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* ---- Screenshot showcase -------------------------------------------- */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 62vw);
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.shots::-webkit-scrollbar {
  height: 8px;
}

.shots::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}

.shot {
  scroll-snap-align: center;
}

.shot .phone {
  width: 100%;
}

.shot figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* ---- CTA band -------------------------------------------------------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(229, 185, 78, 0.1), transparent 60%),
    var(--bg-elev);
  border-block: 1px solid var(--border);
}

.cta-band h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 16px auto 32px;
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ---- Article / legal + support pages -------------------------------- */
.page-hero {
  padding-block: clamp(56px, 10vw, 96px) clamp(24px, 5vw, 40px);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.page-hero .meta {
  margin-top: 14px;
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

.prose {
  max-width: 72ch;
  margin-inline: auto;
  padding-block: clamp(40px, 8vw, 72px);
}

.prose h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 48px;
  scroll-margin-top: 80px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 28px;
}

.prose p,
.prose li {
  color: var(--text-secondary);
  font-size: 1.06rem;
}

.prose p {
  margin-top: 16px;
}

.prose ul,
.prose ol {
  margin-top: 16px;
  padding-left: 24px;
  display: grid;
  gap: 8px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose strong {
  color: var(--text);
}

.callout {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--gold-tint);
  border: 1px solid rgba(229, 185, 78, 0.28);
  border-radius: var(--radius);
  color: var(--text);
}

.callout p {
  color: var(--text);
  margin-top: 0;
}

/* Table of contents on legal/support pages */
.toc {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.toc ul {
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.toc a:hover {
  color: var(--gold-bright);
}

/* Support FAQ steps */
.steps {
  counter-reset: step;
  margin-top: 18px;
  display: grid;
  gap: 12px;
  padding-left: 0;
}

.steps li {
  position: relative;
  list-style: none;
  padding-left: 44px;
  min-height: 30px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-tint);
  border: 1px solid rgba(229, 185, 78, 0.4);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

.path {
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.95em;
  white-space: nowrap;
}

/* ---- Footer ---------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding-block: 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.footer-brand .club {
  color: var(--gold);
}

.footer-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-legal {
  margin-top: 22px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  max-width: 70ch;
}

.footer-copy {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* ---- 404 ------------------------------------------------------------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.notfound .code {
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(even) .feature-media {
    order: 0;
  }

  .feature-media {
    margin-top: 8px;
  }

  .nav-links .nav-secondary {
    display: none;
  }
}

@media (max-width: 420px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Light appearance (respect system, keep brand dark-first) -------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --surface-2: #ececef;
    --border: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.18);
    --text: #1d1d1f;
    --text-secondary: #4a4a4f;
    --text-tertiary: #6e6e73;
    --gold: #b8862b;
    --gold-bright: #a2751f;
    --gold-deep: #8f6415;
    --gold-tint: rgba(184, 134, 43, 0.12);
    --shadow-card: 0 20px 50px -24px rgba(0, 0, 0, 0.35);
  }

  .appstore-badge {
    background: #000;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .hero-mark {
    background: linear-gradient(160deg, #ffffff, #ececef);
  }

  .phone {
    background: linear-gradient(160deg, #d9d9de, #b8b8bf);
  }
}
