/* Dub-style skin for the Superwall copy. Loaded after the original CSS; no markup is changed.
   Delete the <link> to dub-theme.css in index.html to get the original look back. */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&f[]=rowan@300,400&display=swap");

/* Palette: white page, neutral greys, near-black ink. Same values for light and dark so the page stays light. */
:root,
:root.dark,
:root:not(.light) {
  color-scheme: light;

  --bg: #ffffff;
  --bg-inverse: #171717;
  --surface: #fafafa;
  --fg: #171717;
  --fg-inverse: #ffffff;
  --border: #e5e5e5;
  --border-inverse: #262626;
  --accent: #171717;

  --stats-value: #171717;
  --stats-label: #737373;
  --customer-logo-color: #171717;
  --customer-logo-stat-color: #737373;
  --brand-logo-filter: brightness(0);
  --data-bar-track: #e5e5e5;

  --code-card-bg: #171717;
  --code-card-border: #ffffff1a;
  --code-card-fg: #e5e5e5;
  --code-card-muted: #a3a3a3;

  --hero-pattern-bg: #ffffff;
  --hero-pattern-line: #f0f0f0;
  --pw-accent: #171717;

  /* Superwall's named colours, remapped to neutrals */
  --color-cream-100: #ffffff;
  --color-cream-200: #fafafa;
  --color-cream-300: #f5f5f5;
  --color-cream-400: #e5e5e5;
  --color-cream-500: #d4d4d4;

  --color-black-100: #404040;
  --color-black-200: #262626;
  --color-black-300: #262626;
  --color-black-400: #171717;
  --color-black-500: #0a0a0a;

  --color-gray-100: #e5e5e5;
  --color-gray-200: #a3a3a3;
  --color-gray-300: #737373;
  --color-gray-400: #525252;
  --color-gray-500: #262626;

  --color-orange-100: #e5e5e5;
  --color-orange-200: #a3a3a3;
  --color-orange-300: #171717;
  --color-orange-400: #404040;
  --color-orange-500: #262626;

  --color-teal-100: #f5f5f5;
  --color-teal-200: #f5f5f5;
  --color-teal-300: #e5e5e5;
  --color-teal-400: #a3a3a3;
  --color-teal-500: #171717;

  /* Type: Satoshi for text, Rowan (serif) for the italic accent words, Geist Mono for code */
  --font-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-decorative: "Rowan", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Rounder corners */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-4xl: 2rem;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* Headings: tight, medium weight, dark */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--fg);
}

/* Italic accent words become a light serif */
.font-decorative {
  font-family: var(--font-decorative);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Small caps labels become quiet grey text */
.text-accent {
  color: #737373;
}

/* Buttons: rounded, sentence case, soft border */
a[href*="app.superwall.com"],
.gx-btn {
  border-radius: 0.5rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 500;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
a[href*="app.superwall.com"].uppercase,
.uppercase {
  text-transform: none;
  letter-spacing: -0.01em;
}
.gx-btn--ghost {
  background: #ffffff;
  color: var(--fg);
  border: 1px solid var(--border);
}
.gx-btn--ghost:hover {
  background: #f5f5f5;
}

/* Header and dropdown menus */
header {
  background: rgb(255 255 255 / 0.85);
  border-color: var(--border);
}
.nav-menu {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.06);
}

/* Announcement bar: light grey instead of teal */
aside[aria-label="Announcement"] {
  background: #f5f5f5 !important;
  color: #171717 !important;
  border-bottom: 1px solid var(--border);
}

/* Inputs */
input {
  border-radius: 0.5rem;
  border-color: var(--border);
  background: #ffffff;
}
input:focus {
  outline: none;
  border-color: #a3a3a3;
  box-shadow: 0 0 0 4px #f0f0f0;
}

/* "Start for Free" shader button: flat black, no WebGL swirl.
   Its colours are set inline by the component, hence !important. */
astro-island[component-url*="ShaderPrimaryButton"] > * {
  border-radius: 0.5rem;
  background: #171717;
  min-height: 2.5rem !important;
  padding: 0.5rem 1.25rem !important;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
  transition: background-color 150ms ease;
}
astro-island[component-url*="ShaderPrimaryButton"] > *:hover {
  background: #262626;
}
astro-island[component-url*="ShaderPrimaryButton"] > * > span[aria-hidden="true"] {
  display: none !important;
}
astro-island[component-url*="ShaderPrimaryButton"] > * > span:not([aria-hidden]) {
  color: #ffffff !important;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
/* The email pill around it */
form[class*="rounded-full"][class*="border"] {
  border-radius: 0.75rem;
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
form[class*="rounded-full"] input {
  border-radius: 0.5rem;
}

/* ---------- Top menu: Dub-style floating dropdown ---------- */

/* Top-level items get a soft hover pill */
.nav-summary,
.nav-link {
  border-radius: 0.5rem;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  color: #404040;
  transition: background-color 150ms ease, color 150ms ease;
}
.nav-summary:hover,
.nav-link:hover,
.nav-dropdown[open] > .nav-summary {
  background: #f5f5f5;
  color: #171717;
}
.nav-chevron {
  opacity: 0.5;
}

@media (min-width: 1025px) {
  /* The panel: a rounded card floating under the header instead of a full-width bar */
  .nav-dropdown .nav-menu[data-astro-cid-q55oeftv] {
    width: min(calc(100vw - 3rem), 1120px);
    top: calc(100% + 0.5rem);
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 1.25rem;
    box-shadow: 0 12px 40px rgb(0 0 0 / 0.1), 0 2px 6px rgb(0 0 0 / 0.04);
    overflow: hidden;
  }
  .nav-dropdown .nav-menu-inner[data-astro-cid-q55oeftv] {
    width: 100%;
    max-width: none;
    padding: 0;
    gap: 0;
  }

  /* Columns split by thin lines */
  .nav-menu-inner > section {
    padding: 1.5rem 1.25rem 1.25rem;
    min-width: 0;
  }
  .nav-menu-inner > section + section {
    border-left: 1px solid #ececec;
  }

  /* Column labels: small grey caps */
  .nav-menu p.uppercase,
  .nav-menu a.uppercase {
    text-transform: uppercase !important;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.02em !important;
    color: #737373;
    padding: 0 0.75rem;
  }
  .nav-menu a.uppercase:hover {
    color: #171717;
  }

  /* Links: roomy rows that highlight on hover */
  .nav-menu .mt-4.grid {
    margin-top: 0.75rem;
    gap: 0.125rem;
  }
  .nav-menu-link:not(.uppercase) {
    display: flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #262626;
  }
  .nav-menu-link:not(.uppercase):hover {
    background: #f5f5f5;
    color: #171717;
  }
  .nav-menu-link.font-normal {
    color: #737373;
  }
}

/* ---------- Hero: pill, big light headline, two buttons, product chips ---------- */

/* Drop Superwall's corner brackets; keep the grid but fade it out downward */
.site-frame > section:first-child > div.pointer-events-none {
  display: none;
}
.hero-pattern {
  --hero-pattern-line: #f1f1f1 !important;
}
/* Headline and subtitle */
.site-frame section h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.site-frame section h1 + p {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 0.9rem + 0.7vw, 1.375rem);
  line-height: 1.5;
  color: #525252;
}

/* Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.hero-btn--primary {
  background: #171717;
  border-color: #171717;
  color: #ffffff;
}
.hero-btn--primary:hover {
  background: #262626;
}
.hero-btn--secondary {
  background: #ffffff;
  border-color: #e5e5e5;
  color: #171717;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
.hero-btn--secondary:hover {
  background: #fafafa;
}
.hero-btn:focus-visible,
.hero-chip:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

/* Grey band with a white tab that hangs into it and holds the product chips */
.hero-band {
  position: relative;
  display: flex;
  justify-content: center;
  padding-bottom: 1.5rem;
  background: linear-gradient(180deg, #f4f4f5 0%, #f8f8f8 100%);
  margin: 1rem -24px -24px;
}
.hero-tab {
  position: relative;
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.75rem 1rem 1rem;
  background: #ffffff;
  border-radius: 0 0 2rem 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.hero-tab::-webkit-scrollbar {
  display: none;
}
/* Concave shoulders where the tab meets the band */
@media (min-width: 900px) {
  .hero-tab {
    overflow: visible;
  }
  .hero-tab::before,
  .hero-tab::after {
    content: "";
    position: absolute;
    top: 0;
    width: 2rem;
    height: 2rem;
  }
  .hero-tab::before {
    right: 100%;
    background: radial-gradient(circle at 0 100%, transparent 2rem, #ffffff calc(2rem + 0.5px));
  }
  .hero-tab::after {
    left: 100%;
    background: radial-gradient(circle at 100% 100%, transparent 2rem, #ffffff calc(2rem + 0.5px));
  }
}

.hero-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.875rem 0 0.625rem;
  border: 1px solid transparent;
  border-radius: 0.625rem;
  background: #f4f4f5;
  color: #525252;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.hero-chip:hover {
  background: #ececec;
  color: #171717;
}
.hero-chip--active {
  background: #ffffff;
  border-color: #e5e5e5;
  color: #171717;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.hero-chip-icon {
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.375rem;
  background: var(--icon);
}
.hero-chip-icon svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero lines, closer to Dub: a sparse faint square grid, no dashed rules around the hero */
.hero-pattern .hero-pattern__svg {
  display: none;
}
.site-frame > section:first-child {
  border-top: 0;
}
.site-frame > section:first-child + .section-spacer {
  height: 0;
}
.site-frame > section:first-child + .section-spacer::before,
.site-frame > section:first-child + .section-spacer::after {
  display: none;
}

/* Hero background: the Xee dashboard's shimmering dot field (see dot-field.js) in place of Superwall's grid */
.hero-pattern {
  display: none;
}
.hero-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
  /* clear in the middle so the headline sits on plain ground, fading out toward the bottom */
  -webkit-mask-image:
    radial-gradient(ellipse 70% 100% at 50% 50%, transparent 5%, #000 55%),
    linear-gradient(180deg, #000 40%, transparent 95%);
  mask-image:
    radial-gradient(ellipse 70% 100% at 50% 50%, transparent 5%, #000 55%),
    linear-gradient(180deg, #000 40%, transparent 95%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* XEE wordmark where Superwall's logo was; it scales with the height each logo slot already has */
.superwall-logo {
  width: auto !important;
  aspect-ratio: 50 / 24;
  color: #171717;
}
.xee-wordmark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.xee-wordmark text {
  fill: currentColor;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* ---------- Code cards (npx command, SDK, prompt): light frame, white panel, blue underlined tab, copy icon ---------- */
.code-card {
  --code-card-bg: #ffffff;
  --code-card-bar-bg: transparent;
  --code-card-border: #e5e7eb;
  --code-card-fg: #24292f;
  --code-card-muted: #6e7781;
  padding: 0 0.5rem 0.5rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.code-card__bar,
.code-card__bar--tabs {
  padding: 0 0.25rem 0 0.25rem;
  border-bottom: 0;
  background: transparent;
}
.code-card__chip {
  padding: 0.7rem 0.5rem;
  letter-spacing: 0;
  font-weight: 500;
}
.code-card__chip svg {
  color: #6e7781;
}

/* Tabs: grey text, the open one blue with a blue underline */
.code-card__tab {
  padding: 0.7rem 0.75rem;
  color: #4b5563;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
}
.code-card__tab:hover {
  color: #111827;
}
.code-card__tab[aria-selected="true"] {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}
.code-card__tab-icon {
  opacity: 0.8;
}

/* Copy: just the icon */
.code-card__copy {
  padding: 0.4rem;
  border-color: transparent;
  border-radius: 0.5rem;
  color: #6e7781;
}
.code-card__copy:hover {
  background: #e5e7eb;
  border-color: transparent;
  color: #24292f;
}
.code-card__copy-label {
  display: none;
}

/* The white panel the code sits on */
.code-card [data-code-panel],
.code-card__body {
  background: #ffffff;
  border: 1px solid #eceef1;
  border-radius: 0.625rem;
}
.code-card .astro-code {
  color: #24292f !important;
  font-size: 0.8125rem;
  line-height: 1.7;
}
.code-card .astro-code code {
  font-family: var(--font-code);
}

/* Syntax colours: the dark theme's inline colours mapped to a light set */
.code-card .astro-code span {
  font-style: normal !important;
}
.code-card .astro-code span[style*="637777" i] { color: #6e7781 !important; }
.code-card .astro-code span[style*="C792EA" i] { color: #116329 !important; }
.code-card .astro-code span[style*="C5E478" i] { color: #0550ae !important; }
.code-card .astro-code span[style*="82AAFF" i] { color: #24292f !important; }
.code-card .astro-code span[style*="D6DEEB" i] { color: #24292f !important; }
.code-card .astro-code span[style*="ECC48D" i],
.code-card .astro-code span[style*="D9F5DD" i] { color: #cf222e !important; }
/* The npx line: the command in green, its words in the normal ink */
.code-card [data-code-panel="npx"] span[style*="82AAFF" i] { color: #116329 !important; }
.code-card [data-code-panel="npx"] span[style*="ECC48D" i] { color: #24292f !important; }

/* The prompt card sits on a blue band: its text and link need light-theme colours */
.ai-prompt__text {
  color: #24292f;
}
.ai-prompt__link {
  color: #1d4ed8;
}

/* Open tab: beat the original rule's specificity so it is blue with a blue underline */
.code-card__tab[data-astro-cid-4q7fvy2w][aria-selected="true"] {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}
.code-card__tab[data-astro-cid-4q7fvy2w] {
  color: #4b5563;
}
.code-card__tab[data-astro-cid-4q7fvy2w][aria-selected="true"] .code-card__tab-icon,
.code-card__tab[data-astro-cid-4q7fvy2w]:hover .code-card__tab-icon {
  opacity: 1;
}
/* White agent icons were made for a dark card: turn them dark */
.code-card__tab-icon[src*="codex"],
.code-card__tab-icon[src*="cursor"],
.code-card__tab-icon[src*="copilot"],
.code-card__tab-icon[src*="windsurf"] {
  filter: invert(1) brightness(0.35);
}

/* Prompt card link: beat the original rule's specificity */
.ai-prompt__link[data-astro-cid-kzwm7vff] {
  color: #1d4ed8;
  text-decoration-color: #93aef0;
}

/* Tabs: no underline; the open tab is a filled pill */
.code-card__tabs[data-astro-cid-4q7fvy2w] {
  gap: 0.25rem;
  align-items: center;
}
.code-card__tab[data-astro-cid-4q7fvy2w] {
  margin-block: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-bottom: 0;
  border-radius: 0.5rem;
  transition: background-color 150ms ease, color 150ms ease;
}
.code-card__tab[data-astro-cid-4q7fvy2w]:hover {
  background: #e9ebef;
}
.code-card__tab[data-astro-cid-4q7fvy2w][aria-selected="true"] {
  background: #dbe7ff;
  color: #1d4ed8;
  border-bottom: 0;
}

/* Copy button: a green check for the moment after a copy (set by code-copy.js) */
.code-card__copy[data-copied] svg {
  display: none;
}
.code-card__copy[data-copied]::after {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  background: #15803d;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.code-card__copy[data-copied] {
  background: #dcfce7;
  color: #15803d;
}
