/* ===========================================================
   PerkTrak — shared design tokens
   =========================================================== */

:root {
  /* Surfaces */
  --bg: #f7f4ee;
  --bg-2: #efeae0;
  --surface: #ffffff;
  --surface-2: #fbf9f4;
  --ink: #14201f;
  --ink-2: #2a3837;
  --muted: #5e6b69;
  --muted-2: #8a958f;
  --border: #e3ddcf;
  --border-2: #d2cbb9;

  /* Brand */
  --teal: oklch(40% 0.06 195);
  --teal-ink: oklch(28% 0.05 195);
  --teal-tint: oklch(95% 0.02 195);
  --teal-tint-2: oklch(88% 0.04 195);
  --sand: oklch(82% 0.06 70);
  --sand-deep: oklch(70% 0.09 60);

  /* Type */
  --font-serif: "Instrument Serif", "Newsreader", Georgia, serif;
  --font-sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Density */
  --section-y: clamp(72px, 9vw, 140px);
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1200px;

  /* Radius */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadow */
  --shadow-card: 0 1px 0 rgba(20, 32, 31, 0.04), 0 12px 30px -18px rgba(20, 32, 31, 0.18);
  --shadow-frame: 0 30px 60px -30px rgba(20, 32, 31, 0.35), 0 8px 24px -12px rgba(20, 32, 31, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* ----- type ----- */
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.08; }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----- layout ----- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-tight {
  padding-top: calc(var(--section-y) * 0.7);
  padding-bottom: calc(var(--section-y) * 0.7);
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: #fbf9f4;
  border-color: var(--teal);
}
.btn-primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

.btn-link {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding: 14px 8px;
}
.btn-link:hover { color: var(--teal); }

.btn-sm { padding: 9px 14px; font-size: 13px; }

/* ----- chips ----- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ----- card ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ----- nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.wordmark {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--teal);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 28px;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 6px;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--teal); }
.nav-spacer { flex: 1; }

.aud-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}
.aud-switch a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.aud-switch a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 32, 31, 0.08);
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .nav-cta-login, .nav-cta-login * { white-space: nowrap; } @media (max-width: 820px) { .nav-cta-login { display: none; } }
.nav-cta-login-mobile-hidden { display: none; }
}

/* ----- footer ----- */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-col h5 {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--ink-2); }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* ----- browser frame ----- */
.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.frame-dots {
  display: flex;
  gap: 6px;
}
.frame-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8d2c2;
}
.frame-dots span:nth-child(1) { background: #e8a99a; }
.frame-dots span:nth-child(2) { background: #e8d29a; }
.frame-dots span:nth-child(3) { background: #b1cdb6; }
.frame-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 5px 10px;
  flex: 1;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
}
.frame-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  z-index: 2;
}

/* ----- placeholder striped ----- */
.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-2) 0 8px,
      transparent 8px 16px
    ),
    var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

/* ----- accordion ----- */
details.faq {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--border); }
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .caret {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
details.faq[open] summary .caret { transform: rotate(45deg); background: var(--teal-tint); border-color: var(--teal-tint-2); }
details.faq summary .caret::before { content: "+"; font-size: 18px; color: var(--teal-ink); line-height: 1; }
details.faq .faq-body {
  padding-top: 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 720px;
}

/* ----- forms ----- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.field-error input, .field-error select, .field-error textarea { border-color: #c4604c; }
.field-error .err { color: #c4604c; font-size: 12px; }
.field .err { display: none; }
.field-error .err { display: block; }

/* ----- utility ----- */
.t-muted { color: var(--muted); }
.t-teal { color: var(--teal); }
.bg-surface { background: var(--surface); }
.divider-dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border-2);
  margin: 0 10px;
  vertical-align: middle;
}

/* ----- subtle hero gradient ----- */
.hero-gradient {
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, color-mix(in srgb, var(--sand) 30%, transparent), transparent 60%),
    var(--bg);
}

/* === Additional utility styles === */

/* Pricing toggle (Alpine.js) */
.billing-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}
.billing-toggle button {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.billing-toggle button.active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,32,31,0.08);
}

/* Nav hamburger button — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

/* Mobile nav drawer links */
.nav-mobile-link {
  display: block;
  padding: 13px 0;
  font-size: 16px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}
.nav-mobile-link:hover { color: var(--teal); }

@media (max-width: 820px) {
  .nav-hamburger { display: flex; }
  /* Hide desktop-only nav elements */
  .aud-switch { display: none !important; }
}
@media (min-width: 821px) {
  .nav-hamburger { display: none !important; }
}

/* Hero responsive */
@media (max-width: 820px) {
  .how-row { grid-template-columns: 1fr !important; gap: 24px !important; }
  .how-row > div { order: unset !important; min-width: 0; }
  .how-row .frame { zoom: 0.78; }
  .feat-grid { grid-template-columns: 1fr 1fr !important; }
  .price-grid { grid-template-columns: 1fr !important; }
  .price-grid > div { transform: none !important; }
  .demo-row { grid-template-columns: 1fr !important; }
  .faq-row { grid-template-columns: 1fr !important; gap: 32px !important; }
}
@media (max-width: 600px) {
  .feat-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .how-row .frame { zoom: 0.65; }
}

/* SMB hero responsive */
@media (max-width: 900px) {
  .smb-hero { grid-template-columns: 1fr !important; gap: 24px !important; }
}
@media (max-width: 760px) {
  .get-grid { grid-template-columns: 1fr !important; }
  .smb-how-grid { grid-template-columns: 1fr !important; }
  .single-price { grid-template-columns: 1fr !important; gap: 32px !important; }
}
@media (max-width: 880px) {
  .smb-how-grid { grid-template-columns: 1fr !important; }
}

/* Form name row: collapse to single column on small screens */
@media (max-width: 560px) {
  .form-name-row { grid-template-columns: 1fr !important; }
}

/* Hide the large hero mock on mobile — it doesn't reflow well */
@media (max-width: 820px) {
  .hero-mock { display: none; }
}

/* Scroll anchor offset for sticky nav */
section[id] { scroll-margin-top: 80px; }
