:root {
  --bg: #faf7f2;
  --panel: #ffffff;
  --ink: #231912;
  --muted: #726962;
  --line: #e9e2d9;
  --shadow: 0 12px 32px rgba(35, 25, 18, 0.06);
  --accent: #d4734a;
  --accent-2: #e67e3d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section {
  padding: 72px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 650ms ease, transform 650ms ease;
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Top nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
}

/* Hero typography and components (from slides) */
.banner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.banner.gap-sm { gap: 22px; }
.banner.gap-md { gap: 28px; }
.banner.gap-lg { gap: 36px; }

.title {
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.title.simple { font-size: clamp(40px, 6.2vw, 74px); }

.subtitle {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.35;
  text-wrap: balance;
}

.hero-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}

.type-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 247, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.type-card.math { transform: rotate(-3deg); }
.type-card.code { transform: translateY(8px); }
.type-card.table { transform: rotate(3deg); }

.math-badge {
  min-width: 140px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(212, 115, 74, 0.22);
  font-family: "Source Serif 4", serif;
  font-size: 32px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.code-badge {
  min-width: 166px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #1f2430;
  color: #f5f7fb;
  border: 1px solid rgba(31, 36, 48, 0.2);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.code-badge span { color: #8ad2ff; }

.code-badge svg {
  width: 24px;
  height: 24px;
  display: block;
}

.math-badge img {
  width: 100%;
  height: auto;
  display: block;
}

.table-badge {
  width: 112px;
  height: 74px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(240, 247, 255, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(96, 126, 156, 0.18);
}

.table-badge svg {
  width: 92px;
  height: 56px;
  display: block;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 600;
}

/* Buttons */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-color: rgba(212, 115, 74, 0.18);
}

.btn:hover { transform: translateY(-1px); }

/* Key combo section */
.key-combo { display: flex; align-items: center; gap: 6px; justify-content: center; }

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.key-sep { font-size: 16px; font-weight: 700; color: var(--muted); margin: 0 2px; }

/* Capture stage (AI extract) */
.capture-stage {
  position: relative;
  width: min(920px, 100%);
  aspect-ratio: 900 / 460;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.document-layer {
  width: 100%;
  height: 100%;
  background-image: url('/assets/mathPDF.png');
  background-size: cover;
  background-position: center 20%;
}

.selection-box {
  position: absolute;
  top: 26%;
  left: 5%;
  width: 90%;
  height: 65%;
  border: 3.5px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(45, 36, 22, 0.65);
  z-index: 20;
  animation: selection-pulse 2s ease-in-out infinite;
}

@keyframes selection-pulse {
  0%, 100% {
    border-color: var(--accent);
    box-shadow: 0 0 0 9999px rgba(45, 36, 22, 0.65);
  }
  50% {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 9999px rgba(45, 36, 22, 0.7);
  }
}

.ai-toolbar {
  position: absolute;
  bottom: -35px;
  right: -20px;
  background: var(--ink);
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(35, 25, 18, 0.18);
  border: 1.5px solid rgba(212, 115, 74, 0.2);
  display: flex;
  align-items: center;
}

.extract-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.feature-pill {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 100px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: var(--shadow);
}

/* AI tool grid */
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  max-width: 920px;
}

.tool-chip {
  width: 156px;
  height: 132px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tool-chip img {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
}

/* Promo tile hero (imported from /assets/styles.css) */
.promo-preview {
  display: grid;
  place-items: center;
}

.promo-tile {
  position: relative;
  width: 440px;
  height: 280px;
  padding: 22px 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(212, 115, 74, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(250, 247, 242, 1));
  border: 1px solid transparent;
  box-shadow: none;
  overflow: hidden;
}

.promo-tile.flat {
  background: #faf7f2;
}

.promo-title {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.06em;
}

.promo-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.promo-type-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}

.promo-type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.promo-type-card.math {
  width: 118px;
  height: 62px;
  transform: rotate(-4deg);
}

.promo-type-card.code {
  width: 94px;
  height: 62px;
  background: #1f2430;
  border-color: rgba(31, 36, 48, 0.2);
  transform: translateY(8px);
}

.promo-type-card.table {
  width: 96px;
  height: 64px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
  border-color: rgba(169, 187, 203, 0.45);
  transform: rotate(2.5deg);
}

.promo-math-badge {
  font-family: "Source Serif 4", serif;
  font-size: 31px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.promo-math-badge .katex {
  font-size: 1em;
}

.promo-code-badge {
  width: 24px;
  height: 24px;
  display: block;
  color: #8ad2ff;
}

.promo-code-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.promo-table-badge {
  width: 62px;
  height: 44px;
  display: grid;
  place-items: center;
}

.promo-table-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.promo-editor-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.promo-editor-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(35, 25, 18, 0.06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.promo-editor-chip img {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
}

.promo-hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

/* Make the hero tile/title match the visual weight of the following sections */
.promo-tile {
  width: 560px;
  height: 340px;
  padding: 28px 30px;
}

.promo-title {
  font-size: 54px;
}

@media (max-width: 560px) {
  .promo-tile { width: 100%; height: auto; }
  .promo-title { font-size: 46px; }
}

/* Privacy typography */
.policy {
  max-width: 860px;
  margin: 0 auto;
}

.policy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.055em;
  text-align: center;
}

.policy .last-updated {
  text-align: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 14px 0 44px;
}

.policy h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 44px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 115, 74, 0.22);
}

.policy h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  margin: 22px 0 8px;
  text-transform: none;
}

.policy p {
  line-height: 1.7;
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--ink) 84%, transparent);
  font-size: 16px;
}

.policy ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.policy li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

.policy li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.policy code {
  background: rgba(212, 115, 74, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.policy a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 115, 74, 0.35);
}

.policy a:hover {
  color: var(--accent-2);
  border-bottom-color: rgba(230, 126, 61, 0.6);
}

.policy .table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(35, 25, 18, 0.08);
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.policy th {
  text-align: left;
  background: rgba(212, 115, 74, 0.08);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
}

.policy td {
  padding: 12px 14px;
  border-top: 1px solid rgba(35, 25, 18, 0.06);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 12px;
  margin-top: 72px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 560px) {
  .container { padding: 56px 18px; }
  .section { padding: 58px 0; }
  .type-card.code { transform: none; }

  /* Keep the screenshot tool button safely inside the frame on small screens */
  .ai-toolbar { bottom: 12px; right: 12px; }
  .extract-btn { padding: 12px 16px; border-radius: 12px; }

  .logo-row { gap: 10px; }
  .logo-chip { padding: 10px 14px; font-size: 16px; }
  .logo-chip img { width: 20px; height: 20px; }
}
