/* ===== Guiro s.r.o. — dark theme, mobile-first ===== */
:root {
  --bg:        #0a0612;
  --bg-soft:   #110a1e;
  --bg-card:   #160d28;
  --bg-card-2: #1c1233;
  --line:      rgba(201, 139, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text:      #ece7f5;
  --text-dim:  #a99fc0;
  --text-mut:  #7d7396;
  --accent:    #c98bff;
  --accent-2:  #6aa9ff;
  --accent-3:  #ff6ec7;
  --grad: linear-gradient(120deg, #c98bff 0%, #6aa9ff 50%, #ff6ec7 100%);
  --maxw: 1120px;
  --radius: 0;
  --font-head: "Sora", "Inter", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 50px -22px rgba(0,0,0,0.8);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #160d28; padding: 10px 16px; border-radius: 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10, 6, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: "Syne", "Sora", sans-serif; font-weight: 800; font-size: 1.4rem; }
.brand__mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 0; background: var(--grad); color: #150b25; font-weight: 800;
}
.brand__mark .frog { width: 38px; height: 38px; display: block; }
.brand__text { letter-spacing: -0.01em; }

.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__menu a { position: relative; color: var(--text-dim); font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav__menu a:hover { color: var(--text); }
.nav__menu a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .28s var(--ease);
}
.nav__menu a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font: 600 .82rem/1 var(--font-body); letter-spacing: .05em; padding: 8px 13px; border-radius: 0; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.nav__toggle { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 0; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, opacity .2s; border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad); color: #160a26; box-shadow: 0 10px 30px -10px rgba(201,139,255,.6); }
.btn--primary:hover { box-shadow: 0 14px 36px -10px rgba(201,139,255,.8); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
/* shine sweep on the primary button */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn--primary:hover::after { left: 130%; }
@media (prefers-reduced-motion: reduce) { .btn--primary::after { display: none; } }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  /* CSS fallback if WebGL fails to paint (themed via --hero-1/2) */
  background: radial-gradient(120% 120% at 20% 20%, var(--hero-1, #2a0f4d) 0%, var(--hero-2, #120a26) 45%, var(--bg) 80%);
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 50% 30%, transparent 0%, rgba(10,6,18,.35) 70%, rgba(10,6,18,.85) 100%),
    linear-gradient(180deg, rgba(10,6,18,.25) 0%, transparent 25%, rgba(10,6,18,.55) 100%);
}
.hero__content { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 90px; max-width: 880px; }
.hero__eyebrow {
  margin: 0 0 18px; font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.hero__title { font-size: clamp(2.1rem, 6vw, 4.1rem); font-weight: 800; }
.hero__title .hero__t {
  background: linear-gradient(180deg, #ffffff 30%, #cbb8e8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Animated hero word: cycling font (JS) + flowing per-letter color.
   Width is locked to the widest cycling font (set by hero-fx.js) and the
   letters are distributed across it, so swapping fonts never reflows the line. */
.fxword { display: inline-flex; justify-content: space-between; vertical-align: baseline; white-space: nowrap; margin: 0 0.2em; }
.fxword.pop { animation: fxpop .5s var(--ease); }
.fxword .fxl {
  display: inline-block;
  color: var(--accent);
  animation: fxhue 4s linear infinite;
  animation-delay: calc(var(--i) * -0.16s);
  will-change: color;
}
@keyframes fxhue {
  0%   { color: hsl(330, 92%, 70%); }
  16%  { color: hsl(20, 92%, 64%); }
  33%  { color: hsl(48, 95%, 60%); }
  50%  { color: hsl(150, 70%, 58%); }
  66%  { color: hsl(196, 90%, 62%); }
  83%  { color: hsl(266, 88%, 72%); }
  100% { color: hsl(330, 92%, 70%); }
}
@keyframes fxpop { 0% { transform: scale(1); } 30% { transform: scale(1.07); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .fxword .fxl { animation: none; color: var(--accent); }
  .fxword.pop { animation: none; }
}
.hero__lead { margin: 22px 0 34px; font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--text-dim); max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; font-size: 0; }
.hero__scroll span {
  display: block; width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 0; position: relative;
}
.hero__scroll span::after {
  content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--accent); border-radius: 0; animation: scroll 1.8s var(--ease) infinite;
}
@keyframes scroll { 0%{opacity:0;transform:translateY(0)} 30%{opacity:1} 100%{opacity:0;transform:translateY(14px)} }

/* ===== Sections ===== */
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%); }
.section__head { margin-bottom: clamp(34px, 5vw, 56px); }
.section__kicker { margin: 0 0 12px; color: var(--accent); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.section__title { font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 700; max-width: 18ch; }

/* ===== Grids / cards ===== */
.grid { display: grid; gap: 18px; }
.grid--services { grid-template-columns: repeat(3, 1fr); }
.grid--work { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--line-soft); border-radius: 0; padding: 26px 24px;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
/* accent bar that sweeps across the top on hover */
.card::after, .work::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.card:hover, .work:hover {
  transform: translateY(-6px); border-color: var(--line);
  box-shadow: 0 26px 50px -26px rgba(0,0,0,.85), 0 16px 44px -24px var(--accent);
}
.card:hover::after, .work:hover::after { transform: scaleX(1); }
.card__icon {
  width: 46px; height: 46px; border-radius: 0; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(201,139,255,.10); color: var(--accent);
  transition: transform .4s var(--ease), background .3s;
}
.card:hover .card__icon { transform: translateY(-3px) rotate(-6deg) scale(1.1); }
.card__icon svg { width: 24px; height: 24px; transition: transform .4s var(--ease); }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; font-weight: 600; }
.card p { margin: 0; color: var(--text-dim); font-size: .96rem; }
.card--accent { background: linear-gradient(160deg, rgba(201,139,255,.14), rgba(106,169,255,.08)); border-color: var(--line); }
.card__link { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; font-size: .95rem; transition: transform .25s var(--ease); }
.card__link:hover { text-decoration: underline; }
.card:hover .card__link { transform: translateX(4px); }

.work {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: 0; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.work__tag { transition: transform .3s var(--ease); }
.work:hover .work__tag { transform: translateX(3px); }
.work__tag {
  align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(201,139,255,.10); padding: 4px 10px; border-radius: 0;
}
.work h3 { font-size: 1.12rem; font-weight: 600; }
.work p { margin: 0; color: var(--text-dim); font-size: .9rem; flex: 1; }
.work__meta { color: var(--text-mut); font-size: .82rem; font-weight: 500; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.about__text p { color: var(--text-dim); margin: 18px 0 0; }
.about__text .section__title { margin-bottom: 6px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.stats li {
  display: flex; align-items: baseline; gap: 14px; padding: 18px 20px;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: 0;
}
.stats strong { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 90px; }
.stats span { color: var(--text-dim); font-size: .95rem; }

/* ===== Contact ===== */
.contact { text-align: center; max-width: 760px; }
.contact__head { margin-bottom: 32px; }
.contact .section__title { margin: 0 auto 14px; }
.contact__lead { color: var(--text-dim); font-size: 1.05rem; }
.contact__cards { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 30px; }
.contact__card {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: 0; padding: 16px 22px; min-width: 220px;
  transition: border-color .2s, transform .2s;
}
a.contact__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact__label { color: var(--text-mut); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.contact__value { font-weight: 600; font-size: 1.05rem; }

/* ===== Theme HUD (secret switcher feedback) ===== */
.theme-hud {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 14px);
  z-index: 150; padding: 11px 18px; background: rgba(10, 6, 18, 0.82);
  border: 1px solid var(--line); color: var(--text);
  font: 600 .85rem/1 var(--font-head); letter-spacing: .04em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.theme-hud.is-shown { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .theme-hud { transition: opacity .25s; } }

/* Font switcher HUD — bottom-left so it never overlaps the theme HUD */
.font-hud { left: 24px; transform: translate(0, 14px); }
.font-hud.is-shown { transform: translate(0, 0); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line-soft); padding: 28px 0; background: var(--bg-soft); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; color: var(--text-mut); font-size: .88rem; }

/* ===== Reveal on scroll =====
   The .reveal class is added by JS (so the page still shows with JS off) and
   removed again once revealed, leaving the element's own hover transition intact.
   --rd is a per-element stagger delay set by JS. */
.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero__scroll span::after { animation: none; }
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .grid--work { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; width: 44px; height: 40px;
    align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; z-index: 110;
  }
  .nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 0; transition: transform .3s var(--ease), opacity .2s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__menu {
    position: fixed; top: 0; right: 0; bottom: auto; left: auto;
    width: min(78vw, 320px); height: 100vh; height: 100dvh; overflow-y: auto;
    flex-direction: column; align-items: flex-start;
    gap: 22px; padding: 100px 30px 30px; background: var(--bg-soft); border-left: 1px solid var(--line-soft);
    transform: translateX(100%); transition: transform .35s var(--ease); box-shadow: -30px 0 60px -30px rgba(0,0,0,.8);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__menu a { font-size: 1.15rem; }
  .lang-toggle { margin-top: 8px; }
}
@media (max-width: 720px) {
  .grid--services { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .grid--work { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
