/* =========================================================
   Ice Ice Bejby — style.css
   Mobile-first. Base = ~390px, then 768px+, then 1100px+.
   See DESIGN.md for the source-of-truth design system.
   ========================================================= */

/* ---------- 1. Design tokens (DESIGN §1) ---------- */
:root {
  --bg:        #04070B;
  --surface:   #0A1018;
  --line:      #16222E;
  --ice:       #38B6FF;
  --ice-light: #8FE0FF;
  --text:      #EAF4FB;
  --muted:     #8CA2B3;
  --glow:      rgba(56, 182, 255, 0.35);

  /* layout */
  --pad-x: 20px;          /* horizontal padding, mobile */
  --maxw: 1080px;
  --topbar-h: 64px;
  --radius: 14px;

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea {
  font: inherit;
}

button { color: inherit; }

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 750;
  font-stretch: 125%;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid var(--ice-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  padding-block: clamp(72px, 14vw, 140px);
}

/* anchor jumps land below the fixed topbar */
[id] { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* smooth anchor scrolling (e.g. hero arrow, topbar logo) — motion only */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* =========================================================
   BUTTONS (DESIGN §6)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-family: var(--ff-display);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.btn--primary {
  background: var(--ice);
  color: #04070B;
  box-shadow: 0 0 24px var(--glow);
}
.btn--secondary {
  background: transparent;
  color: var(--ice-light);
  border-color: var(--ice);
}

@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(56,182,255,0.5); }
  .btn--secondary:hover { background: rgba(56,182,255,0.08); }
}
.btn:active { transform: translateY(0); }

/* =========================================================
   TOPBAR (DESIGN §4.1)
   ========================================================= */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 250ms ease, backdrop-filter 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.topbar__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 8px;
}
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  color: var(--ice-light);
  font-family: var(--ff-display);
  font-weight: 600;
  font-stretch: 110%;
  letter-spacing: 0.04em;
}
.topbar__phone-icon { display: block; }
.topbar__phone-text { display: none; }   /* mobile: icon only */

/* WhatsApp lives next to the phone — always visible, both breakpoints */
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--ice-light);
}
.topbar__wa svg { display: block; }
@media (hover: hover) {
  .topbar__wa:hover { color: var(--ice); }
}

/* scrolled state — added by JS after 40px */
.topbar.is-scrolled {
  background: rgba(10, 16, 24, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 0 24px var(--glow);
}

/* =========================================================
   HERO (DESIGN §4.2 + §7)
   The client's neon logo is the centerpiece — it must ALWAYS
   be shown whole, never cropped.

   Mobile intro: the first 100svh "stage" shows only the logo +
   CTAs + a scroll arrow. The headline (.hero__text) sits below
   the fold and is revealed on scroll (JS, behind reduced-motion).
   Base CSS keeps the headline visible so the site is fully usable
   with JS off / reduced motion. Desktop reassembles via grid.
   ========================================================= */
.hero {
  --hero-heading-gap: clamp(48px, 7vh, 76px);
  --hero-reveal-overlap: 0px;
  position: relative;
}
.hero__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* first screen — logo + CTAs centered, arrow pinned bottom */
.hero__stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(18px, 3vh, 30px);
  /* balanced first paint (the glowing logo centered in dark space = the
     "neon sign in a dark room" thesis). A slight downward bias trims the
     space below the buttons; the headline reveal then rises to meet them. */
  padding-top: calc(var(--topbar-h) + 32px);
  padding-bottom: clamp(40px, 8vh, 60px);
}
.hero__img {
  width: 100%;
  max-width: 420px;
  max-height: 56svh;          /* portrait artwork incl. its reflection */
  height: auto;
  object-fit: contain;        /* never crop the logo */
  /* feather the artwork's pure-black canvas into the page bg (top + sides);
     the lower reflection already fades within the art itself */
  -webkit-mask-image: radial-gradient(125% 120% at 50% 42%, #000 78%, transparent 100%);
  mask-image: radial-gradient(125% 120% at 50% 42%, #000 78%, transparent 100%);
}
/* three actions: primary "Nahlásit závadu" full-width, then Zavolat + WhatsApp */
.hero__cta {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__cta-report { width: 100%; }
.hero__cta-row {
  display: flex;
  gap: 10px;
}
.hero__cta-row .btn { flex: 1 1 0; }

/* scroll-down hint, anchored to the bottom of the first screen */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 3.5vh, 28px);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ice-light);
}

/* headline + sub — below the fold on mobile, revealed on scroll.
   The top padding keeps the CTA-to-heading gap clean and repeatable. */
.hero__text {
  text-align: center;
  padding-block: var(--hero-heading-gap) clamp(8px, 3vh, 24px);
}
.hero__title {
  font-size: clamp(2.2rem, 8.5vw, 4.2rem);
  font-weight: 800;
}
.hero__accent { color: var(--ice); }
.hero__sub {
  margin: 14px auto 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* intro/motion enhancement — only mobile + motion-OK, only when JS
   has added .hero--motion. Without it everything stays visible. */
@media (prefers-reduced-motion: no-preference) {
  .hero__scroll svg { animation: hero-bob 1.8s ease-in-out infinite; }
  @keyframes hero-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  /* Keep the reveal close enough to feel connected, with enough air under
     the CTAs that the headline never collides visually with the controls. */
  .hero--motion .hero__text {
    opacity: 0;
    transform: translateY(28px);
    margin-top: calc(var(--hero-reveal-overlap) * -1);
    pointer-events: none;   /* hidden headline must not block the arrow */
  }
  .hero--motion .hero__img,
  .hero--motion .hero__text { will-change: transform, opacity; }
}

/* =========================================================
   SECTION HEADS — eyebrow + h2 (DESIGN §2)
   ========================================================= */
.section__head {
  position: relative;
  margin-bottom: clamp(36px, 7vw, 56px);
}
/* very subtle radial blue glow behind headings (DESIGN §1, 4–6 %) */
.section__head::before {
  content: "";
  position: absolute;
  left: -90px;
  top: -70px;
  width: 360px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(56, 182, 255, 0.05), transparent);
  pointer-events: none;
}
.eyebrow {
  font-family: var(--ff-display);
  font-weight: 600;
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8125rem;
  color: var(--ice-light);
}
.section__title {
  margin-top: 12px;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
}

/* =========================================================
   PROMISE STRIP (DESIGN §4.3) — huge type on black, no decor
   ========================================================= */
.promise__text {
  font-family: var(--ff-display);
  font-weight: 750;
  font-stretch: 125%;
  letter-spacing: 0.01em;
  line-height: 1.16;
  text-transform: uppercase;
  /* Mobile: a smaller, vw-tracked size keeps the block at ~6 lines, which is
     where text-wrap:balance engages — so the left-aligned lines come out even
     (~2 words each) with no ragged "staircase". Desktop restores the big type
     (few lines, balance still evens them). */
  font-size: clamp(1rem, 4.85vw, 1.4rem);
  max-width: 30ch;
  text-wrap: balance;
}
.promise__accent { color: var(--ice); }

/* =========================================================
   FROST DIVIDER (DESIGN §4 motif) — line + emphasized snowflake.
   Placed between every section; the glow flake is the separator.
   ========================================================= */
.frost-divider {
  width: 160px;
  margin-inline: auto;
  margin-block: clamp(4px, 1.5vw, 16px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.frost-divider::before,
.frost-divider::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(var(--dir, 90deg), transparent, var(--line));
}
.frost-divider::after { --dir: 270deg; }
.frost-divider svg {
  display: block;
  color: var(--ice);
  filter: drop-shadow(0 0 10px var(--glow)) drop-shadow(0 0 3px var(--glow));
}

/* =========================================================
   NAHLÁŠENÍ ZÁVADY — primary report form
   ========================================================= */
.fault-form {
  width: 100%;
  max-width: 860px;
  display: grid;
  gap: 24px;
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 16, 24, 0.64);
}
.fault-form__group {
  min-width: 0;
  padding: 0;
  border: 0;
}
.fault-form__group + .fault-form__group {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.fault-form__legend {
  margin-bottom: 16px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-stretch: 115%;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ice-light);
}
.fault-form__grid {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.field__label {
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}
.field__required,
.field__optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
/* required marker is now an asterisk — accent it and make it legible */
.field__required {
  color: var(--ice);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.fault-form input,
.fault-form select,
.fault-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #071019;
  color: var(--text);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.fault-form input,
.fault-form select {
  min-height: 52px;
  padding: 0 14px;
}
.fault-form textarea {
  min-height: 132px;
  padding: 12px 14px;
  resize: vertical;
}
.fault-form input:focus,
.fault-form select:focus,
.fault-form textarea:focus {
  border-color: var(--ice-light);
  background: #091522;
}
.fault-form input[type="file"] {
  min-height: auto;
  padding: 12px;
  color: var(--muted);
}
.fault-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--ice);
  border-radius: 9px;
  background: transparent;
  color: var(--ice-light);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
}
.fault-form__noscript,
.fault-form__status {
  border: 1px solid rgba(143, 224, 255, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(56, 182, 255, 0.08);
  color: var(--text);
}
.fault-form__status--error {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
}
.fault-form__noscript a {
  color: var(--ice-light);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.fault-form__actions {
  display: flex;
  align-items: flex-start;
}
.fault-form__submit {
  width: 100%;
}

/* =========================================================
   SLUŽBY (DESIGN §4.4) — hairline rows mobile, 3 cols desktop
   ========================================================= */
.services {
  list-style: none;
  padding: 0;
}
.service { padding-block: 26px; }
.service:first-child { padding-top: 0; }
.service:last-child { padding-bottom: 0; }
.service + .service { border-top: 1px solid var(--line); }

.service__icon {
  color: var(--ice-light);
  margin-bottom: 14px;
}
.service__title { font-size: 1.0625rem; }
.service__copy {
  margin-top: 8px;
  color: var(--muted);
  max-width: 52ch;
}

/* =========================================================
   JAK TO PROBÍHÁ (DESIGN §4.5) — numbered timeline
   ========================================================= */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 36px;
}
.step {
  position: relative;
  padding-left: 56px;
}
.step__num {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--bg);
  font-family: var(--ff-display);
  font-weight: 700;
  font-stretch: 125%;
  font-size: 0.9375rem;
  color: var(--ice-light);
}
/* thin connector between numbers (mobile: vertical) */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: -30px;
  width: 1px;
  background: var(--line);
}
.step__title { font-size: 1.0625rem; }
.step__copy {
  margin-top: 8px;
  color: var(--muted);
  max-width: 52ch;
}

/* =========================================================
   PROČ MY (DESIGN §4.6) — plain list, snowflake markers
   ========================================================= */
.trust {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 62ch;
}
.trust__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.trust__flake {
  flex: 0 0 auto;
  margin-top: 5px;
  color: var(--ice-light);
}

/* =========================================================
   CENÍK (DESIGN §4.7) — one sentence + secondary CTA
   ========================================================= */
.pricing__copy { max-width: 62ch; }
.pricing__cta { margin-top: 28px; }

/* =========================================================
   KONTAKT (DESIGN §4.8) — phone in display type
   ========================================================= */
.contact__phone {
  display: inline-block;
  font-family: var(--ff-display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: clamp(1.45rem, 7.4vw, 4rem);
  transition: color 200ms ease;
}
.contact__links {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.contact__email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ice-light);
  text-decoration: underline;
  text-decoration-color: rgba(143, 224, 255, 0.4);
  text-underline-offset: 4px;
}
.fault-form__privacy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
@media (hover: hover) {
  .contact__phone:hover { color: var(--ice-light); }
  .contact__email:hover { text-decoration-color: var(--ice-light); }
}

/* =========================================================
   STICKY BOTTOM ACTION BAR (DESIGN §5) — mobile only
   ========================================================= */
.actionbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10, 16, 24, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform 180ms ease;
}
.actionbar.is-visible { transform: translateY(0); }

.actionbar__btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: var(--radius);
  font-family: var(--ff-display);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
/* primary report keeps the prominent label; call + WhatsApp are compact icons */
.actionbar__btn--report {
  background: var(--ice);
  color: #04070B;
  box-shadow: 0 0 24px var(--glow);
}
.actionbar__btn--icon {
  flex: 0 0 auto;
  width: 56px;
  padding-inline: 0;
}
.actionbar__btn--icon svg { display: block; }
.actionbar__btn--call,
.actionbar__btn--wa {
  background: transparent;
  color: var(--ice-light);
  border: 1px solid var(--ice);
}

@media (max-width: 767px) {
  .fault-form__actions {
    padding-bottom: 72px;
  }

  .actionbar__btn {
    padding-inline: 8px;
    font-size: clamp(0.8125rem, 3.3vw, 1rem);
  }
}

/* =========================================================
   FOOTER (DESIGN §4.9) — one line
   Mobile: extra bottom padding clears the sticky action bar.
   ========================================================= */
.footer {
  padding-block: 28px calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* =========================================================
   BREAKPOINT: 768px+ (tablet)
   ========================================================= */
@media (min-width: 768px) {
  :root { --pad-x: 32px; --topbar-h: 72px; }

  /* topbar phone becomes a text link */
  .topbar__phone-icon { display: none; }
  .topbar__phone-text { display: inline; font-size: 1.0625rem; }
  .topbar__phone { gap: 0; }

  /* Desktop: no intro/parallax. Dissolve the mobile stage and
     reassemble logo + headline + CTA into the side-by-side layout
     (DESIGN §4.2). Headline is always visible here. */
  .hero { min-height: 100svh; display: flex; align-items: center; }
  .hero__stage { display: contents; }      /* img/cta/arrow join the grid */
  .hero__scroll { display: none; }
  .hero__inner {
    display: grid;
    grid-template-columns: clamp(300px, 38vw, 440px) 1fr;
    grid-template-areas:
      "media text"
      "media cta";
    align-items: center;
    column-gap: clamp(32px, 6vw, 80px);
    row-gap: clamp(16px, 3vh, 28px);
    padding-top: calc(var(--topbar-h) + 8px);
    padding-bottom: clamp(40px, 8vh, 96px);
  }
  .hero__img { grid-area: media; max-height: none; align-self: center; }
  .hero__text {
    grid-area: text;
    align-self: end;
    text-align: left;
    padding-block: 0;
    opacity: 1;            /* never part of the mobile reveal */
    transform: none;
  }
  .hero__title { max-width: 14ch; }
  .hero__sub { margin-inline: 0; }
  .hero__cta {
    grid-area: cta;
    align-self: start;
    width: auto;
    max-width: none;
    margin-inline: 0;
    flex-direction: row;       /* all three in one row on desktop */
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-start;
  }
  .hero__cta-report { width: auto; }
  .hero__cta-row { gap: 14px; }
  .hero__cta .btn { flex: 0 0 auto; min-width: 160px; max-width: none; }

  /* sticky bar is mobile-only */
  .actionbar { display: none; }

  /* Promise strip: restore the big display size on desktop. Few lines here,
     so text-wrap:balance (base) keeps them even and left-aligned. */
  .promise__text { font-size: clamp(2rem, 5.8vw, 2.8rem); }

  /* body copy bumps to desktop size (DESIGN §2) */
  body { font-size: 1.0625rem; }

  .fault-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .fault-form__submit {
    width: auto;
    min-width: 220px;
  }

  /* Služby: 3 clean columns, hairlines are mobile-only */
  .services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .service,
  .service:first-child,
  .service:last-child { padding-block: 0; }
  .service + .service { border-top: none; }

  /* Jak to probíhá: horizontal timeline */
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .step {
    padding-left: 0;
    padding-top: 54px;
  }
  .step:not(:last-child)::before {
    top: 18px;
    bottom: auto;
    left: 48px;
    right: -28px;
    width: auto;
    height: 1px;
  }

  /* Kontakt: links in a row */
  .contact__links {
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  /* no sticky bar => no extra footer clearance */
  .footer { padding-block: 28px; }
}

/* =========================================================
   BREAKPOINT: 1100px+ (desktop)
   ========================================================= */
@media (min-width: 1100px) {
  :root { --pad-x: 48px; }

  .hero__sub { font-size: 1.125rem; }
}

/* =========================================================
   Reduced motion — kill the topbar/actionbar transitions too
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
}
