/* ==========================================================================
   petrslavik.design / slvk.io — page styles

   Loaded by index.html as an external stylesheet.
   ========================================================================== */

/* --- Fonts ----------------------------------------------------------------
   Newsreader, self-hosted from assets/fonts. The 400 and 500 faces of each
   style share one file; unicode-range lets the browser download only the
   subsets (latin, latin-ext, vietnamese) the page actually uses. */
/* vietnamese */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin-ext.woff2") format('woff2');
  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;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin.woff2") format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin-ext.woff2") format('woff2');
  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;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin.woff2") format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin-ext.woff2") format('woff2');
  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;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin.woff2") format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin-ext.woff2") format('woff2');
  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;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin.woff2") format('woff2');
  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;
}

/* --- Tokens ---------------------------------------------------------------
   Names for values already in use across the page, not new ones. */
:root {
  --bg: #f0eee9;
  --ink: #141414;
  --ink-inverse: #fff;

  /* Text tints, strongest to faintest */
  --ink-muted: rgba(0, 0, 0, .65);
  --ink-subtle: rgba(0, 0, 0, .5);
  --ink-faint: rgba(0, 0, 0, .4);
  --rule: rgba(0, 0, 0, .3);
  --rule-soft: rgba(0, 0, 0, .08);

  --font-body: Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;

  --ease-out: cubic-bezier(.16, .8, .3, 1);
}

/* --- Base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .7; }

/* --- Loader -------------------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
.loader[data-state="hidden"] { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring { position: relative; width: 72px; height: 72px; }
.loader-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* --- Entrance animation ---------------------------------------------------
   .hero-anim elements animate in once the loader clears; .reveal elements
   animate when scrolled into view (see the IntersectionObserver in
   scripts/scripts.js).

   The per-element stagger is passed in as --delay rather than a separate
   transition-delay declaration: the shorthand below would reset any delay
   set earlier in the cascade, so a custom property keeps the stagger
   independent of rule order. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .7s var(--ease-out) var(--delay, 0s),
    transform .7s var(--ease-out) var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

.hero-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease .1s, transform .8s ease .1s;
}
[data-loaded="true"] .hero-fade { opacity: 1; transform: none; }

.hero-anim {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .7s var(--ease-out) var(--delay, 0s),
    transform .7s var(--ease-out) var(--delay, 0s);
}
[data-loaded="true"] .hero-anim { opacity: 1; transform: none; }

@keyframes hero-chevron-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  /* One spacing value above the headline and above the buttons, so the
     eyebrow → headline and body text → buttons gaps always match. Mobile
     overrides it in the 820px block. */
  --hero-gap: 38px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-inner { max-width: 760px; }

.hero-eyebrow {
  --delay: .05s;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: var(--hero-gap);
}

.h1 {
  --delay: .18s;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  /* Fluid size instead of breakpoints: scales linearly from 48px at a 440px
     viewport to 68px at 820px (the sizes the old breakpoints used) and holds
     at those values outside that range.
     Slope 20px / 380px = 5.263vw; offset 48px - 5.263% of 440px = 24.84px. */
  font-size: clamp(48px, 24.84px + 5.263vw, 68px);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.h1-accent { color: var(--ink-faint); font-style: italic; }

.hero-lead {
  --delay: .32s;
  max-width: 600px;
  margin: 20px 0 0;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* The buttons split a 440px row equally (flex: 1), so both come out the same
   width whatever their label length; on phones they stack instead (see the
   440px block). */
.cta {
  --delay: .44s;
  max-width: 440px;
  margin-top: var(--hero-gap);
  display: flex;
  gap: 12px;
}
.cta .btn { flex: 1; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  /* Any radius larger than half the height gives a pill with fully round
     ends; 999px holds regardless of button size, unlike 50% which would
     turn wide buttons into ellipses. */
  border-radius: 999px;
}

.btn-primary { background: var(--ink); color: var(--ink-inverse); }
.btn-secondary { border: 1px solid var(--rule); color: var(--ink); }
.btn-icon { display: inline-block; margin-left: 6px; }

/* --- Navigation ---------------------------------------------------------- */
.burger { display: none; }
.mobile-menu { display: none; }

/* --- Breakpoints ----------------------------------------------------------
   !important is kept only where an element still carries an inline style
   in the template (.wrap, [data-menu]); the hero rules no longer need it. */
@media (max-width: 820px) {
  .wrap { padding: 0 28px !important; }
  [data-menu] { padding: 16px 0 !important; }

  .hero { min-height: 100dvh; --hero-gap: 28px; }
  .hero-lead { font-size: 15px; margin-top: 12px; }

  .nav { display: none !important; }
  .burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 36px;
    margin-right: -10px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
  }
  .burger span { width: 18px; height: 1.5px; border-radius: 2px; background: var(--ink); }

  .sec { grid-template-columns: 1fr !important; gap: 18px !important; padding: 40px 0 !important; }
  #contact.sec { padding: 40px 0 !important; }
  .sec h2 { font-size: 26px !important; margin-bottom: 16px !important; }
  .role { grid-template-columns: 1fr !important; gap: 8px !important; }
  .quote-text { font-size: 21px !important; line-height: 1.5 !important; margin-bottom: 20px !important; }
  .carousel-nav { margin-top: 20px !important; }
  .foot { gap: 14px !important; }
  .mobile-menu[data-menu="open"] { display: flex; }
}

@media (max-width: 440px) {
  .wrap { padding: 0 22px !important; }
  .soon-btn { display: none !important; }
  /* Too narrow for two buttons side by side: stack them full-width. */
  .cta { flex-direction: column; }
  .mobile-menu { padding-left: 22px !important; padding-right: 22px !important; }
}

/* --- Mobile menu --------------------------------------------------------- */
.mobile-menu {
  position: fixed !important;
  inset: 0;
  z-index: 70;
  background: var(--bg);
  flex-direction: column;
  padding: 16px 28px !important;
}
.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.mobile-menu .mm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.mobile-menu .mm-close {
  width: 44px;
  height: 36px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}
