/* pesito — landing styles. Mobile-first iOS-feel with editorial pesito DNA. */

:root {
  /* Palette — warm cream paper aesthetic */
  --bg:        oklch(0.97 0.012 70);
  --surface:   oklch(0.99 0.005 70);
  --surface-2: oklch(0.94 0.014 70);
  --surface-3: oklch(0.91 0.018 70);
  --ink:       oklch(0.22 0.028 60);
  --ink-soft:  oklch(0.46 0.02 60);
  --char:      oklch(0.30 0.022 60);
  --char-2:    oklch(0.38 0.018 60);
  --line:      oklch(0.88 0.012 70);
  --line-soft: oklch(0.92 0.010 70);
  --brand:     oklch(0.62 0.16 28);
  --brand-deep:oklch(0.54 0.17 28);
  --brand-soft:oklch(0.93 0.04 28);
  --brand-wash:oklch(0.95 0.025 28);
  --sun:       oklch(0.84 0.16 92);
  --green:     oklch(0.55 0.13 155);
  --danger:    oklch(0.58 0.18 25);

  /* Antonio is Latin-only; Oswald sits right after it as Cyrillic-capable
     fallback so RU text stays in the same condensed-display family
     instead of falling through to system Impact (which renders larger). */
  --font-display: 'Antonio', 'Oswald', 'Helvetica Neue Condensed', Impact, sans-serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-input: 10px;
  --radius-sharp: 4px;

  /* Spacing scale (4pt) — for legal/long-form layouts that need named tokens. */
  --s-xs: 4px; --s-sm: 8px; --s-md: 12px; --s-lg: 16px;
  --s-xl: 24px; --s-2xl: 32px; --s-3xl: 48px; --s-4xl: 64px;
  --s-5xl: 96px; --s-6xl: 128px;

  --shadow-soft: 0 1px 2px rgba(63, 38, 24, 0.04), 0 8px 24px rgba(63, 38, 24, 0.06);
  --shadow-card: 0 1px 1px rgba(63, 38, 24, 0.05), 0 4px 14px rgba(63, 38, 24, 0.05);
  --shadow-pop:  0 2px 4px rgba(63, 38, 24, 0.06), 0 16px 40px rgba(63, 38, 24, 0.10);
  --shadow-ios:  0 0.5px 0 rgba(255,255,255,0.6) inset, 0 1px 2px rgba(63,38,24,0.04), 0 8px 24px rgba(63,38,24,0.07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.5;
}

/* paper texture — extremely subtle */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 13% 22%, rgba(180, 110, 60, 0.025) 0px, transparent 1.5px),
    radial-gradient(circle at 78% 67%, rgba(120, 70, 30, 0.02) 0px, transparent 1.2px),
    radial-gradient(circle at 42% 88%, rgba(140, 80, 40, 0.018) 0px, transparent 1px);
  background-size: 7px 9px, 11px 13px, 5px 8px;
  opacity: 0.7;
  mix-blend-mode: multiply;
}

/* type */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--brand);
}
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--font-mono); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  transition: transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background 160ms ease,
              box-shadow 160ms ease;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.3) inset,
              0 1px 2px rgba(127, 50, 24, 0.18),
              0 8px 22px rgba(127, 50, 24, 0.22);
}
.btn-primary:hover { background: var(--brand-deep); }

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

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

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card-flat {
  background: var(--surface-2);
  border-radius: var(--radius-card);
}
.card-ink {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-card);
}

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

/* iOS-style sheet that pops in */
@keyframes sheetIn {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.4; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin360 {
  to { transform: rotate(360deg); }
}

/* iOS-style segmented control */
.seg {
  display: inline-flex;
  background: var(--surface-3);
  border-radius: 10px;
  padding: 2px;
  gap: 0;
  position: relative;
}
.seg button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 160ms ease;
}
.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(63,38,24,0.08);
}

/* iOS-style range slider */
input[type="range"].ios {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  cursor: pointer;
}
input[type="range"].ios::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right,
    var(--brand) 0%,
    var(--brand) var(--p, 50%),
    var(--surface-3) var(--p, 50%),
    var(--surface-3) 100%);
  border-radius: 999px;
}
input[type="range"].ios::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  margin-top: -11px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04),
              0 3px 8px rgba(63,38,24,0.18),
              0 0 0 0.5px rgba(63,38,24,0.12);
  cursor: grab;
  transition: transform 120ms ease;
}
input[type="range"].ios::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.08);
}
input[type="range"].ios::-moz-range-track {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
}
input[type="range"].ios::-moz-range-thumb {
  width: 28px; height: 28px;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(63,38,24,0.18), 0 0 0 0.5px rgba(63,38,24,0.12);
  cursor: grab;
}

/* chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--char);
}
.chip-brand {
  background: var(--brand-wash);
  border-color: oklch(0.85 0.06 28);
  color: var(--brand-deep);
}
.chip-green {
  background: oklch(0.95 0.04 155);
  border-color: oklch(0.85 0.06 155);
  color: oklch(0.40 0.13 155);
}

/* link */
.tlink {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* topbar blur (iOS materials) */
.glass {
  background: oklch(0.97 0.012 70 / 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--line);
}

/* subtle entrance for everything in viewport */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* container */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .wrap { padding: 0 40px; }
}

/* mobile-tight section spacing */
.section { padding: 56px 0; }
@media (min-width: 768px) {
  .section { padding: 96px 0; }
}

/* visually hidden */
.sr { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; }

/* number rolling */
.num-roll {
  display: inline-block;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Tailwind-style utility helpers (only the ones I use repeatedly) */
.f { display: flex; }
.fc { display: flex; flex-direction: column; }
.ai-c { align-items: center; }
.jc-sb { justify-content: space-between; }
.jc-c { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
