/* Operio vendedores — page styles.
   All values come from the Operio Unified Design Tokens (public/tokens.css, a vendored copy)
   plus the operio.work website parity block below. No shared code with operio.work.
   Theme: [data-theme="light|dark"] on <html>; light is the default, as on the website. */

/* ── 1. Website parity — copied from packages/website/src/app.css (PARITY BLOCK) ── */
:root {
  --radius:    10px;
  --radius-lg: 16px;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
:root,
[data-theme="dark"] {
  --glow-orange:    rgba(245,166,35,0.35);
  --glow-orange-sm: rgba(245,166,35,0.18);
  --text-tertiary:  #7A7A7A;
}
[data-theme="light"] {
  --color-bg:        #F5F4F0;
  --color-surface-2: #F0EEE9;
  --color-border:    #E2DDD6;
  --color-orange:        #E8950F;
  --color-orange-dim:    #B37200;
  --color-orange-strong: #CC7A00;
  --color-orange-bright: #FFF0D4;
  --glow-orange:    rgba(232,149,15,0.25);
  --glow-orange-sm: rgba(232,149,15,0.15);
  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-dim:       #666666;
  --text-tertiary:  #777777;
  --color-green: #1A9E5F;
  --color-info:  #0088B8;
  --nav-scrolled-bg: rgba(245,244,240,0.95);
  --nav-mobile-bg:   rgba(245,244,240,0.98);
}

/* ── 2. Page-level adjustment (the only value not taken from the website) ──
   Canonical light --color-orange-ink (#9A6700) is tuned for the cool zinc light theme;
   on the warm-cream parity background it is 4.42:1, just under WCAG AA for small text.
   #8F6000 is the same hue at 4.97:1 on #F5F4F0. */
[data-theme="light"] { --color-orange-ink: #8F6000; }
:root[data-theme="light"] { --orange-display: var(--color-orange-dim); }

/* ── 3. Page tokens (derived only from the tokens above) ── */
:root {
  /* Orange display text (≥24px bold): brand orange on dark; on light the token's
     darker step, --color-orange-dim, which clears AA large-text 3:1 on cream. */
  --orange-display: var(--color-orange);
  --page-gutter: var(--space-6);
  --section-y: clamp(var(--space-8), 9vw, 120px);
  --on-orange: #0A0A0A;   /* website .btn-primary text */
}

/* ── Base ── */
html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

body { font-size: var(--text-md); text-rendering: optimizeLegibility; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-sans); line-height: var(--leading-tight); letter-spacing: -0.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

/* Keep focused/scrolled-to controls clear of the sticky header (WCAG 2.4.11). */
:where(a, button, input, select, textarea, [tabindex]) {
  scroll-margin-top: calc(var(--nav-h) + var(--space-5));
}

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

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

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--color-orange); color: var(--on-orange);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.accent { color: var(--orange-display); }

/* ── Logo ── */
.logo { display: inline-block; line-height: 0; border-radius: var(--radius-sm); }
.logo img { height: 40px; width: auto; }
.site-footer .logo img { height: 36px; }
[data-theme="dark"] .logo img { filter: brightness(1.9) contrast(.95); }

/* ── Buttons (website .btn / .btn-primary / .btn-ghost) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-3) 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 600 var(--text-md)/1.2 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-primary { background: var(--color-orange); color: var(--on-orange); }
.btn-primary:hover {
  background: var(--color-orange-bright);
  box-shadow: 0 0 28px var(--glow-orange);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.btn-outline { background: var(--color-surface); color: var(--text-primary); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-orange-dim); color: var(--color-orange-ink); }
.btn-sm { min-height: 44px; padding: var(--space-2) 20px; font-size: var(--text-base); }
.btn-icon {
  background: transparent; color: var(--text-secondary); border-color: var(--color-border);
  min-height: 44px; min-width: 44px; padding: var(--space-2);
  font: 500 var(--text-sm)/1 var(--font-mono); letter-spacing: var(--tracking-label);
}
.btn-icon:hover { color: var(--text-primary); background: var(--nav-hover-bg); }
.btn-icon svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-scrolled-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.header-actions { display: flex; align-items: center; gap: var(--space-2); }

/* ── Sections ── */
section { padding-block: var(--section-y); scroll-margin-top: var(--nav-h); }
.section-alt { background: var(--color-surface-2); }

/* website .section-label */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 500 var(--text-xs)/1.2 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-orange-ink);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: ""; width: 20px; height: 1px; background: var(--color-orange); opacity: .6;
}
.h2 { font-size: var(--text-2xl); max-width: 22ch; }
.lead { color: var(--text-secondary); font-size: var(--text-lg); line-height: var(--leading-body); }

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-8), 9vw, 136px) clamp(72px, 9vw, 144px);
}
.hero-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--color-orange);
  pointer-events: none;
}
.hero-circle--lg { width: 720px; height: 720px; top: -300px; right: -240px; opacity: .2; }
.hero-circle--sm { width: 460px; height: 460px; top: -150px; right: -40px; opacity: .12; }
.hero .container { position: relative; }

/* Side by side on desktop; stacked below 960px with the copy first (DOM order). */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 11fr);
  gap: clamp(40px, 5vw, var(--space-8));
  align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--glow-orange);
  background: var(--color-surface);
  color: var(--color-orange-ink);
  font: 500 var(--text-xs)/1.2 var(--font-mono);
  letter-spacing: 0.16em;
}
.pill::before {
  content: ""; width: var(--space-2); height: var(--space-2); border-radius: 50%; background: var(--color-orange);
}

.hero h1 {
  margin-top: var(--space-5);
  font-size: clamp(42px, 3.6vw + 16px, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.hero .lead { margin-top: var(--space-5); max-width: 560px; }
.hero-ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ── Presentation video (as on the operio.work homepage) ── */
.hero-video { margin: 0; min-width: 0; }
.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-video figcaption {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-base);
}

/* ── Offer cards ── */
.section-head { margin-bottom: clamp(40px, 5vw, 56px); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}
.card-icon {
  width: 48px; height: 48px; padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--glow-orange-sm);
  color: var(--color-orange-ink);
  margin-bottom: var(--space-5);
}
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card p { color: var(--text-secondary); }

/* ── Two-column blocks ── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.split .lead { margin-top: var(--space-5); max-width: 460px; }

.traits { list-style: none; }
.trait {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
}
.trait:last-child { border-bottom: 1px solid var(--color-border); }
.check {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--glow-orange-sm); color: var(--color-orange-ink);
  display: grid; place-items: center;
}
.check svg { width: 22px; height: 22px; }
.trait h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.trait p { color: var(--text-secondary); }

/* ── Steps ── */
.steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5);
}
.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}
.step-num {
  display: block;
  font: 800 clamp(52px, 4vw + 20px, 72px)/1 var(--font-sans);
  letter-spacing: -0.05em;
  color: var(--orange-display);
  margin-bottom: var(--space-5);
}
.step h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.step p { color: var(--text-secondary); }

/* ── Form ── */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--space-5), 3.5vw, 40px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: var(--text-base); color: var(--text-primary); }
.optional { color: var(--text-secondary); font-weight: 400; }

.input {
  width: 100%;
  min-height: 50px;
  padding: var(--space-3) 15px;
  background: var(--color-surface);
  color: var(--text-primary);
  border: 1px solid var(--text-tertiary);   /* ≥3:1 for form controls (WCAG 1.4.11) */
  border-radius: var(--radius);
  font: 400 var(--text-md)/1.4 var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--text-tertiary); }
.input:hover { border-color: var(--text-secondary); }
.input:focus { outline: none; border-color: var(--color-orange); box-shadow: 0 0 0 3px var(--glow-orange); }
.input[aria-invalid="true"] { border-color: var(--color-red-ink); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-red-ink) 22%, transparent); }
textarea.input { min-height: 120px; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select.input:invalid { color: var(--text-tertiary); }
select.input option { color: var(--text-primary); background: var(--color-surface); }

.field-meta { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.counter { color: var(--text-secondary); margin-left: auto; font-variant-numeric: tabular-nums; }
.field-error { color: var(--color-red-ink); font-size: var(--text-sm); line-height: 1.4; }
.field-error:empty { display: none; }

.consent {
  display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start;
}
.consent input {
  width: 20px; height: 20px; margin-top: 2px;
  accent-color: var(--color-orange);
  cursor: pointer;
}
.consent label { font-weight: 400; font-size: var(--text-base); color: var(--text-secondary); }
.consent a { color: var(--color-orange-ink); font-weight: 600; text-underline-offset: 3px; }
.consent a:hover { color: var(--text-primary); }
.consent + .field-error { margin-left: 36px; }

.turnstile-box { min-height: 65px; }

.form-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--color-red-ink);
  background: color-mix(in srgb, var(--color-red-ink) 7%, transparent);
  color: var(--color-red-ink);
  font-size: var(--text-base);
}
.form-alert:empty { display: none; }

.form-submit { width: 100%; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-success { padding: var(--space-3) 0; }
.form-success:focus { outline: none; }
.form-success .check { width: 56px; height: 56px; margin-bottom: var(--space-5); }
.form-success .check svg { width: 28px; height: 28px; }
.form-success p { font: 700 clamp(22px, 1.6vw + 14px, 30px)/1.25 var(--font-sans); letter-spacing: -0.02em; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-6); }
.site-footer .container {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
}
.site-footer small { color: var(--text-secondary); font-size: var(--text-base); }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-video { max-width: 720px; }
}
@media (max-width: 760px) {
  :root { --page-gutter: 20px; }
  .logo img { height: 32px; }
  .cards, .steps, .split, .form-grid { grid-template-columns: 1fr; }
  .hero-circle--lg { width: 440px; height: 440px; top: -200px; right: -220px; }
  .hero-circle--sm { width: 280px; height: 280px; top: -110px; right: -110px; }
  .hero-ctas .btn { width: 100%; }
  .card, .step { padding: var(--space-5); }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  :root { --page-gutter: var(--space-4); }
  .logo img { height: 28px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary:hover { transform: none; }
}
