/*
  Caroufy — trycaroufy.com
  Dark-only, high-contrast product site. One accent (amber), tight grid,
  hairline dividers, monospace used for structural/data labels.
*/

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4,
p, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0d;
  --panel: #141318;
  --panel-2: #1b1a20;
  --line: #2b2a31;
  --text: #f4f2ed;
  --muted: #aba9b2;
  --muted-2: #837f8a;

  --accent: #ffb627;
  --accent-ink: #14110a;
  --accent-dim: #c98a12;

  --radius: 6px;
  --radius-sm: 3px;
  --radius-full: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  --fs-hero: clamp(2.6rem, 1.8rem + 4.2vw, 6.1rem);
  --fs-h2: clamp(1.9rem, 1.55rem + 1.8vw, 2.9rem);
  --fs-h3: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  --fs-lede: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: 0.9rem;
  --fs-mono: 0.8rem;
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

p {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease,
    border-color 0.12s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-accent:hover {
  background: #ffc453;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-text {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.btn-text:hover {
  color: var(--text);
  border-color: var(--muted-2);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 13, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.wordmark-mark {
  width: 26px;
  height: 22px;
  flex-shrink: 0;
}

.primary-nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.95rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.12s ease;
}

.primary-nav a:hover {
  color: var(--text);
}

.header-cta {
  display: none;
}

@media (min-width: 640px) {
  .primary-nav {
    display: flex;
  }
  .header-cta {
    display: inline-flex;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-8) var(--space-9);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-7);
  }
}

.hero-copy h1 {
  font-size: var(--fs-hero);
  max-width: 14ch;
}

.hero-lede {
  margin-top: var(--space-5);
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 460px;
}

.stack-svg {
  width: 100%;
  height: auto;
}

/* ---------- Section shell ---------- */
section {
  padding-block: var(--space-8);
}

.section-head {
  max-width: 56ch;
  margin-bottom: var(--space-7);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section-intro {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--fs-lede);
  max-width: 52ch;
}

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

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(5, 1fr);
  }
  .step {
    border-top: none;
  }
  .step + .step {
    border-left: 1px solid var(--line);
  }
}

.step {
  padding: var(--space-6) var(--space-5) var(--space-6) 0;
  border-top: 1px solid var(--line);
}

.steps > .step:first-child {
  border-top: none;
}

@media (min-width: 860px) {
  .step {
    padding: 0 var(--space-5);
    border-top: none !important;
  }
  .steps > .step:first-child {
    padding-left: 0;
  }
  .steps > .step:last-child {
    padding-right: 0;
  }
}

.step-index {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
  margin-bottom: var(--space-4);
}

.step-index .num {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
}

.step-index .of {
  font-size: var(--fs-mono);
  color: var(--muted-2);
}

.step h3 {
  margin-bottom: var(--space-2);
}

.step p {
  font-size: 0.95rem;
}

/* ---------- Editor mock (wide product surface) ---------- */
.surface-section {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.editor-mock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.editor-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}

.chrome-path {
  margin-left: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted-2);
}

.editor-body {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .editor-body {
    grid-template-columns: 120px 1fr;
  }
}

.editor-rail {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .editor-rail {
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid var(--line);
    overflow-x: visible;
  }
}

.thumb {
  flex-shrink: 0;
  width: 46px;
  height: 60px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: transparent;
}

.thumb-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--panel);
}

.editor-canvas {
  position: relative;
  padding: 2.75rem var(--space-6) var(--space-6);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
}

.canvas-chip {
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted-2);
}

.canvas-tag {
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.canvas-headline {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-top: var(--space-4);
}

.canvas-line {
  height: 10px;
  border-radius: 2px;
  background: var(--panel-2);
}

.canvas-line-a {
  width: 78%;
}
.canvas-line-b {
  width: 64%;
}
.canvas-line-c {
  width: 46%;
}

.editor-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.kit-swatches {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.swatch-a { background: #ffb627; }
.swatch-b { background: #f4f2ed; }
.swatch-c { background: #2b2a31; }
.swatch-d { background: #5b8cff; }

.kit-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted-2);
  margin-left: var(--space-2);
}

.export-chips {
  display: flex;
  gap: var(--space-2);
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  color: var(--muted);
}

/* ---------- Brand kit prose ---------- */
.prose-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 860px) {
  .prose-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-8);
  }
}

.prose p + p {
  margin-top: var(--space-4);
}

.prose p {
  max-width: 62ch;
  font-size: 1.02rem;
  color: var(--muted);
}

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

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  gap: var(--space-5);
  border-top: 1px solid var(--line);
  padding-top: var(--space-7);
}

@media (min-width: 860px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.plan-featured {
  border-color: var(--accent-dim);
  background: var(--panel);
  position: relative;
}

.plan-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.plan-name {
  font-size: 1.3rem;
  font-weight: 650;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.plan-price .amount {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-price .period {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
}

.plan-desc {
  font-size: 0.95rem;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
  margin-top: auto;
}

.plan-features li {
  font-size: 0.92rem;
  color: var(--muted);
  padding-left: var(--space-5);
  position: relative;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--accent-dim);
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-5);
}

.faq-list summary {
  cursor: pointer;
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list .faq-answer {
  margin-top: var(--space-4);
  max-width: 64ch;
  font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-8) var(--space-6);
}

.footer-grid {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-brand p {
  margin-top: var(--space-3);
  max-width: 34ch;
  font-size: 0.95rem;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.12s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-legal {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  font-size: 0.85rem;
  color: var(--muted-2);
}

/* ---------- Simple/legal page shell ---------- */
.doc {
  padding-block: var(--space-8) var(--space-9);
}

.doc-head {
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.doc-head p {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted-2);
}

.doc h1 {
  font-size: clamp(2rem, 1.7rem + 1.4vw, 2.9rem);
}

.doc section {
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--line);
  max-width: 72ch;
}

.doc section:last-of-type {
  border-bottom: none;
}

.doc h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-3);
}

.doc p {
  font-size: 1rem;
}

.doc p + p {
  margin-top: var(--space-3);
}

.doc ul {
  margin-top: var(--space-3);
  padding-left: 1.2em;
  color: var(--muted);
}

.doc li + li {
  margin-top: var(--space-2);
}

.doc li::marker {
  color: var(--accent-dim);
}

/* ---------- Unsubscribe (deliberately plain) ---------- */
.confirm {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-9);
}

.confirm-box {
  max-width: 42rem;
}

.confirm-box .eyebrow {
  margin-bottom: var(--space-4);
}

.confirm-box h1 {
  font-size: clamp(1.8rem, 1.6rem + 1vw, 2.4rem);
  margin-bottom: var(--space-5);
}

.confirm-box p {
  font-size: 1.05rem;
  max-width: 54ch;
}

.confirm-box p + p {
  margin-top: var(--space-4);
}

.confirm-box a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
