/* ==========================================================================
   Trevantodes — site.css
   Hand-written layer on top of Tailwind. Holds design tokens, typography
   defaults, component classes, scroll-reveal and the cookie-consent UI.
   No drop shadows anywhere by design: depth comes from 1px hairlines.
   ========================================================================== */

:root {
  --ink: #0e1116;
  --ink-soft: #1b2028;
  --ink-line: #2a2f38;
  --amber: #f5a524;
  --amber-dark: #d98c0f;
  --warm: #fafaf7;
  --metric: #1e9e6a;
  --metric-deep: #14764e;
  --muted: #6b7280;
  --muted-ink: #4b5563;
  --line: #e2e2db;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background-color: var(--warm);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.2; }

p { text-wrap: pretty; }

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

/* --------------------------------------------------------------------------
   Focus + skip link
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-dark :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: var(--amber);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--ink);
  color: var(--warm);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Scroll reveal — opt-in, and completely inert for reduced-motion users.
   Content is visible by default so it never depends on JavaScript.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Typographic helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-ink);
}

.on-dark .eyebrow {
  color: #b9bec7;
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--muted-ink);
}

.on-dark .lead {
  color: #cfd3d9;
}

.metric-figure {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5.2vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--metric);
  font-variant-numeric: tabular-nums;
}

.step-number {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.75rem, 6vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--line);
  font-variant-numeric: tabular-nums;
}

/* Placeholder tokens such as [CLIENT] or [+X% ROAS] are wrapped in <span
   class="ph"> so they are visually obvious before launch. */
.ph {
  font-variant-numeric: tabular-nums;
  border-bottom: 1px dashed rgba(107, 114, 128, 0.6);
  white-space: nowrap;
}

.link-inline {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(14, 17, 22, 0.35);
  transition: text-decoration-color 0.2s ease;
}

.link-inline:hover {
  text-decoration-color: var(--amber);
}

.on-dark .link-inline {
  color: var(--warm);
  text-decoration-color: rgba(250, 250, 247, 0.4);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.btn--primary:hover {
  background-color: var(--amber-dark);
  border-color: var(--amber-dark);
}

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

.btn--ink:hover {
  background-color: var(--ink-soft);
  border-color: var(--ink-soft);
}

.btn--outline {
  background-color: transparent;
  border-color: rgba(14, 17, 22, 0.25);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--ink);
  background-color: rgba(14, 17, 22, 0.04);
}

.btn--outline-light {
  background-color: transparent;
  border-color: rgba(250, 250, 247, 0.35);
  color: var(--warm);
}

.btn--outline-light:hover {
  border-color: var(--warm);
  background-color: rgba(250, 250, 247, 0.08);
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Cards + hairline structures
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.card--flat {
  background-color: transparent;
}

a.card:hover,
.card--interactive:hover {
  border-color: rgba(14, 17, 22, 0.42);
}

.on-dark .card {
  border-color: var(--ink-line);
  background-color: transparent;
}

.on-dark a.card:hover {
  border-color: rgba(250, 250, 247, 0.45);
}

.hairline-t { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }
.on-dark .hairline-t { border-top-color: var(--ink-line); }
.on-dark .hairline-b { border-bottom-color: var(--ink-line); }

.accent-rule {
  width: 3rem;
  height: 2px;
  background-color: var(--amber);
  border: 0;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-ink);
  transition: color 0.18s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link[aria-current='page'] {
  color: var(--ink);
}

.nav-link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.125rem;
  height: 2px;
  background-color: var(--amber);
}

.burger-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Progressive enhancement: without JavaScript the mobile panel is simply
   always open and the toggle button is removed, so navigation never breaks. */
html:not(.js) [data-nav-toggle] { display: none; }
html:not(.js) [data-nav-panel].is-hidden { display: block !important; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4375rem;
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--muted-ink);
}

.input {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  background-color: #fff;
  border: 1px solid rgba(14, 17, 22, 0.22);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.18s ease;
}

.input::placeholder {
  color: var(--muted-ink);
  opacity: 0.75;
}

.input:hover {
  border-color: rgba(14, 17, 22, 0.4);
}

.input:focus {
  border-color: var(--ink);
}

textarea.input {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.6;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234B5563' stroke-width='1.5'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
  padding-right: 2.5rem;
}

.input[aria-invalid='true'] {
  border-color: #b42318;
  border-width: 1px;
  background-color: #fffafa;
}

.field-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #b42318;
}

.field-error.is-shown {
  display: block;
}

.checkbox {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
  margin-top: 0.1875rem;
  accent-color: var(--ink);
}

.form-status {
  display: none;
  padding: 1rem 1.125rem;
  border: 1px solid var(--line);
  font-size: 0.9375rem;
}

.form-status.is-shown { display: block; }
.form-status.is-success { border-color: var(--metric-deep); color: var(--metric-deep); background-color: #f3fbf7; }
.form-status.is-error { border-color: #b42318; color: #b42318; background-color: #fffafa; }

/* --------------------------------------------------------------------------
   Legal / long-form prose
   -------------------------------------------------------------------------- */

.legal { font-size: 1rem; color: var(--muted-ink); }
.legal > * + * { margin-top: 1.125rem; }
.legal h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--ink);
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.legal h3 {
  font-size: 1.0625rem;
  color: var(--ink);
  margin-top: 1.75rem;
}
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(14, 17, 22, 0.35); }
.legal a:hover { text-decoration-color: var(--amber); }
.legal ul, .legal ol { padding-left: 1.25rem; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li + li { margin-top: 0.5rem; }
.legal li::marker { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal dl > dt { color: var(--ink); font-weight: 600; margin-top: 1rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background-color: #fff;
}

.data-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.data-table caption {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--muted-ink);
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td {
  padding: 0.8125rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table thead th {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table code {
  font-size: 0.875rem;
  background-color: #f4f4ef;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--line);
}

.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-ink);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Click-to-load embed (map). Nothing third-party loads until the visitor asks.
   -------------------------------------------------------------------------- */

.embed-frame {
  position: relative;
  border: 1px solid var(--line);
  background-color: #fff;
  background-image:
    linear-gradient(to right, rgba(107, 114, 128, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(107, 114, 128, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
}

.embed-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Cookie consent UI (markup injected by site.js)
   -------------------------------------------------------------------------- */

.cc-root {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  padding: 0.75rem;
  display: flex;
  justify-content: center;
}

.cc-panel {
  width: 100%;
  max-width: 60rem;
  background-color: var(--ink);
  color: var(--warm);
  border: 1px solid var(--ink-line);
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .cc-panel { padding: 1.75rem; }
}

.cc-title {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cc-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #cfd3d9;
}

.cc-body a {
  color: var(--warm);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-actions {
  display: grid;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .cc-actions { grid-auto-flow: column; grid-auto-columns: 1fr; }
}

/* Reject and accept are deliberately identical in size, weight and padding.
   Only the fill colour differs, so neither choice is nudged. */
.cc-choice {
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.cc-choice--reject {
  background-color: var(--warm);
  border-color: var(--warm);
  color: var(--ink);
}

.cc-choice--reject:hover { background-color: #e9e9e2; border-color: #e9e9e2; }

.cc-choice--accept {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.cc-choice--accept:hover { background-color: var(--amber-dark); border-color: var(--amber-dark); }

.cc-choice--save {
  background-color: transparent;
  border-color: rgba(250, 250, 247, 0.4);
  color: var(--warm);
}

.cc-choice--save:hover { border-color: var(--warm); background-color: rgba(250, 250, 247, 0.08); }

.cc-toggle-list { border-top: 1px solid var(--ink-line); }

.cc-toggle {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ink-line);
}

.cc-toggle input[type='checkbox'] {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
  margin-top: 0.25rem;
  accent-color: var(--amber);
}

.cc-toggle input[type='checkbox']:disabled { opacity: 0.6; }

.cc-toggle-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--warm);
}

.cc-toggle-desc {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #b9bec7;
}

.cc-link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  color: #cfd3d9;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-link-btn:hover { color: var(--warm); }

.is-hidden { display: none !important; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .cc-root, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.75em; }
}
