/* Pan Peryskop — design system v2 (EVpin treatment) */

/* --- self-hosted variable Geist Mono (wght + wdth) --- */
@font-face {
  font-family: "Geist Mono VF";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../assets/geist-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono VF";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../assets/geist-mono-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* EVpin palette */
  --paper: #f7f7f7;
  --ink: #1d1d16;            /* EVpin text-[#1d1d16] */
  --ink-soft: #0c0c09;       /* EVpin bg-black / #0c0c09 */
  --muted: rgba(0, 0, 0, 0.55);
  --line: rgba(0, 0, 0, 0.08);

  --dark: #050505;           /* page black behind hero/footer */

  /* accents (brand purple z onboarding iOS) */
  --accent: #7a5cf0;
  --accent-deep: #4b2fb3;
  --link: #0a84ff;

  /* brand gradient — kopiowany z OnboardingView.swift (HSB .55/.68/.82, sat .75, bri .65) */
  --brand-grad: linear-gradient(135deg, #2980a6, #332ba6, #9c29a6);

  --radius-pill: 999px;

  --font-display: "Geist Mono VF", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
select, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 600; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { position: relative; padding: 96px 0; }
.dark { background: var(--dark); color: var(--paper); }

/* --- display typography (EVpin wdth:100 look) --- */
.display {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.06;
  text-wrap: balance;
}
.display-lg { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -0.05em; }
.display-xl { font-size: clamp(2.3rem, 8vw, 6.5rem); letter-spacing: -0.055em; line-height: 0.98; }
.display-md { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.045em; }

/* --- brand accents --- */
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* section header pattern (EVpin: pill eyebrow + heading + sub, centered) */
.sec-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; margin-bottom: 64px; }
.sec-head.left { align-items: flex-start; text-align: left; }
.sec-head .display { max-width: 16ch; }
.sec-head p.sub {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.dark .sec-head p.sub { color: rgba(255, 255, 255, 0.6); }

/* --- scroll reveal --- */
.reveal { opacity: 0; transform: translateY(6px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(6px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.stagger.is-in > * { opacity: 1; transform: none; }
.stagger.is-in > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.is-in > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.is-in > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.is-in > *:nth-child(4) { transition-delay: 0.22s; }
.stagger.is-in > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.is-in > *:nth-child(6) { transition-delay: 0.34s; }

/* --- a11y --- */
.skip {
  position: fixed; top: -100px; left: 16px; z-index: 300;
  background: var(--ink-soft); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; font-size: 13px;
  transition: top 0.2s ease;
}
.skip:focus { top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal, .stagger > * { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 72px 0; }
  .sec-head { margin-bottom: 44px; }
}
