/* iPss — shared stylesheet
 * Covers: reset, tokens, base, layout, buttons, topbar, header,
 *         hamburger, mobile menu, page-hero, footer, animations, breakpoints.
 * Every page links this file; page-specific CSS stays inline.
 */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === DESIGN TOKENS === */
:root {
  --ink:        #0a0a0a;
  --surface:    #161616;
  --surface-2:  #202020;
  --surface-3:  #2a2a2a;
  --border:     rgba(255,255,255,0.08);
  --accent:     #E8FF00;
  --accent-dim: rgba(232,255,0,.12);
  --text:       #F0EDE6;
  --text-muted: #6e6e73;
  --ff-display: 'Clash Display', sans-serif;
  --ff-body:    'Instrument Sans', sans-serif;

  /* Emil Kowalski easing curves — strong, intentional, not weak CSS defaults */
  --ease:        cubic-bezier(0.23, 1, 0.32, 1);   /* strong ease-out for UI interactions */
  --ease-io:     cubic-bezier(0.77, 0, 0.175, 1);  /* strong ease-in-out for on-screen motion */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* iOS-like for menus/drawers */
  --spring:      cubic-bezier(0.34, 1.56, 0.64, 1);

  --r:           16px;
  --r-lg:        22px;
}

/* === BASE === */
html { scroll-behavior: smooth; }
body { font-family: var(--ff-body); background: var(--ink); color: var(--text); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--ff-body); }

/* === LAYOUT === */
.container        { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px;  margin: 0 auto; padding: 0 32px; }

/* === REVEAL ANIMATION ===
 * translateY(10px) not 18px — subtle movement, Emil principle: less is more.
 * Strong ease-out: fast start creates instant perceived responsiveness.
 */
.reveal         { opacity: 0; transform: translateY(10px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* Stagger delay classes — 60ms increments feel natural without dragging */
.d1 { transition-delay: 60ms; }
.d2 { transition-delay: 120ms; }
.d3 { transition-delay: 180ms; }
.d4 { transition-delay: 240ms; }
.d5 { transition-delay: 300ms; }

/* === BUTTONS ===
 * Specify exact properties — never transition-all.
 * scale(0.97) on :active gives instant tactile feedback.
 * Hover transforms gated behind pointer media query — touch devices
 * trigger :hover on tap and it gets stuck. Gate it.
 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; border-radius: 100px;
  padding: 11px 24px; border: none; cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease),
              background 150ms ease, border-color 150ms ease;
}
.btn:active     { transform: scale(0.97) !important; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-y          { background: var(--accent); color: #0a0a0a; font-weight: 700; box-shadow: 0 4px 20px rgba(232,255,0,.18); }
.btn-o          { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-call       { background: var(--accent); color: #0a0a0a; font-weight: 700; box-shadow: 0 4px 20px rgba(232,255,0,.18); }
.btn-lg         { font-size: 16px; padding: 14px 32px; }
.btn-sm         { font-size: 13px; padding: 8px 18px; }
.btn-full       { width: 100%; justify-content: center; }

@media (hover: hover) and (pointer: fine) {
  .btn-y:hover    { background: #f5ff33; box-shadow: 0 6px 32px rgba(232,255,0,.32); transform: translateY(-2px); }
  .btn-o:hover    { background: var(--surface); border-color: rgba(255,255,255,.2); transform: translateY(-2px); }
  .btn-call:hover { background: #f5ff33; box-shadow: 0 6px 32px rgba(232,255,0,.32); transform: translateY(-2px); }
}

/* === TOPBAR === */
.topbar           { background: #131313; border-bottom: 1px solid rgba(255,255,255,.12); padding: 10px 0; font-size: 12.5px; color: rgba(255,255,255,.72); position: relative; z-index: 110; }
.topbar .container{ display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tb-item          { display: flex; align-items: center; gap: 6px; }
.tb-item svg      { opacity: .65; flex-shrink: 0; }
.tb-center        { display: flex; align-items: center; gap: 10px; }
.tb-sep           { opacity: .3; color: rgba(255,255,255,.5); }
.tb-right         { display: flex; align-items: center; gap: 20px; }
.tb-right a       { color: rgba(255,255,255,.72); transition: color 150ms ease; font-weight: 500; }

@media (hover: hover) and (pointer: fine) {
  .tb-right a:hover { color: var(--accent); }
}

/* === HEADER ===
 * Specify background + box-shadow separately — don't animate all.
 */
.header           { position: sticky; top: 0; z-index: 100; background: rgba(10,10,10,.65); border-bottom: 1px solid var(--border); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); transition: background 200ms ease, box-shadow 200ms ease; }
.header.scrolled  { background: rgba(10,10,10,.94); box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 4px 24px rgba(0,0,0,.4); }
.header .container{ display: flex; align-items: center; justify-content: space-between; height: 96px; }
.logo             { display: flex; align-items: center; gap: 4px; }
.logo img         { height: 80px; width: auto; }
.nav              { display: flex; align-items: center; gap: 2px; }
.nav a            { font-size: 14px; font-weight: 500; color: var(--text-muted); padding: 7px 13px; border-radius: 8px; transition: color 150ms ease, background 150ms ease; }
.nav a.active     { color: var(--accent); background: rgba(255,255,255,.05); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
}

/* === HAMBURGER ===
 * 200ms feels crisp for the morph — not so fast it's jarring.
 * Strong ease-out gives immediate visual response on press.
 */
.hamburger                        { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.hamburger span                   { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 200ms var(--ease), opacity 160ms ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === MOBILE MENU ===
 * @starting-style enables CSS entry animation without JS (Chrome 117+, Firefox 129+).
 * Older browsers fall back to instant display — acceptable.
 * ease-drawer matches iOS feel for full-screen overlays.
 */
.mob-menu { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(10,10,10,.97); backdrop-filter: blur(24px); padding: 110px 28px 32px; flex-direction: column; gap: 0; overflow-y: auto; }
.mob-menu.open {
  display: flex;
  opacity: 1;
  transition: opacity 250ms var(--ease-drawer);
  @starting-style { opacity: 0; }
}
.mob-menu a        { font-family: var(--ff-display); font-size: 16px; font-weight: 600; color: var(--text-muted); padding: 14px 0; border-bottom: 1px solid var(--border); transition: color 150ms ease; }
.mob-menu .mob-cta { color: var(--accent) !important; margin-top: 8px; border-bottom: none !important; font-size: 16px; }

@media (hover: hover) and (pointer: fine) {
  .mob-menu a:hover { color: var(--accent); }
}

/* === PAGE HERO (inner pages) === */
.page-hero            { padding: 72px 0 60px; border-bottom: 1px solid var(--border); }
.page-hero-eyebrow    { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.page-hero h1         { font-family: var(--ff-display); font-size: clamp(36px, 5vw, 60px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; color: #fff; margin-bottom: 16px; }
.page-hero p, .page-hero-sub { font-size: 16px; color: var(--text-muted); max-width: 520px; line-height: 1.7; }

/* === FOOTER ===
 * Only transition color — not width, height, or other layout-triggering properties.
 */
.footer          { background: #070707; border-top: 1px solid var(--border); padding: 64px 0 0; }
.foot-grid       { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.foot-logo img   { height: 68px; width: auto; margin-bottom: 14px; }
.foot-desc       { font-size: 13px; color: var(--text-muted); line-height: 1.7; max-width: 260px; }
.foot-col h4     { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.foot-col a, .foot-col span { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; transition: color 150ms ease; }

@media (hover: hover) and (pointer: fine) {
  .foot-col a:hover { color: var(--text); }
}

.foot-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); gap: 12px; flex-wrap: wrap; }

/* === ZAPRTJE BANNER === */
#zaprtje-banner { position: relative; z-index: 200; }

/* === SKIP LINK === */
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--accent); color: #0a0a0a; padding: 10px 20px; font-size: 13px; font-weight: 700; border-radius: 0 0 8px 8px; z-index: 99999; transition: top 150ms var(--ease); }
.skip-link:focus { top: 0; outline: none; }

/* === KEYFRAMES === */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === REDUCED MOTION ===
 * Keep opacity transitions (they aid comprehension).
 * Remove all movement — users with vestibular disorders need this.
 */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: opacity 200ms ease;
    transform: none !important;
  }
  .d1, .d2, .d3, .d4, .d5 { transition-delay: 0ms; }
  .btn {
    transition: background 100ms ease, border-color 100ms ease;
  }
  .hamburger span {
    transition: opacity 100ms ease;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 20px; }
  .topbar .container             { flex-direction: column; gap: 5px; text-align: center; }
  .tb-center                     { flex-direction: column; gap: 3px; }
  .tb-sep                        { display: none; }
  .nav, .header .btn-call        { display: none; }
  .hamburger                     { display: flex; }
  .foot-grid                     { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-bottom                   { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}
