/* ============================================================
   GEOCERTO — Precision Instrument Editorial
   Design system + custom styles beyond Tailwind utilities
   ============================================================ */

:root {
  --brand: #F26B0F;
  --brand-2: #FFB347;
  --brand-deep: #B5470A;
  --ink: #0C0A09;
  --ink-2: #1C1917;
  --paper: #FAFAF7;
  --paper-2: #F1EFE9;
  --muted: #57534E;
  --line: #E7E5E0;
  --line-strong: #D6D3CC;
  --grid: rgba(12, 10, 9, 0.06);

  --font-display: "Bricolage Grotesque", "Georgia", serif;
  --font-body: "Geist", -apple-system, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-soft: 0 1px 2px rgba(12,10,9,.04), 0 8px 24px -8px rgba(12,10,9,.08);
  --shadow-card: 0 1px 2px rgba(12,10,9,.04), 0 24px 48px -16px rgba(12,10,9,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand); color: var(--paper); }

/* --- Typography helpers --- */
.font-display { font-family: var(--font-display); font-feature-settings: "ss01"; letter-spacing: -0.02em; }
.font-mono    { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--ink { color: var(--ink); }
.eyebrow--paper { color: var(--paper); }

/* --- Topographic grid (decorative) --- */
.topo-grid {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
}
.topo-grid--dark {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* --- Hero slide rotation (cross-fade between background photos) --- */
.hero-slides { position: absolute; inset: 0; overflow: hidden; }
.hero-slides .slide {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.8s ease-in-out;
  will-change: opacity, transform;
}
.hero-slides .slide.is-current {
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.8s ease-in-out, transform 11s ease-out;
}
/* Mirror flip for slides marked with data-flip */
.hero-slides .slide[data-flip] { transform: scaleX(-1) scale(1.08); }
.hero-slides .slide[data-flip].is-current { transform: scaleX(-1) scale(1); }

/* --- Trust badges (Najlepszy / Najszybszy / Najtańszy) --- */
.trust-stage {
  position: relative;
  width: 100%;
  max-width: 28rem;
  height: 6.5rem;
  perspective: 1200px;
}
.trust-badge {
  position: absolute;
  inset: 0;
  padding: 1.25rem 1.75rem 1.25rem 1.4rem;
  border-radius: 1.25rem;
  background: linear-gradient(155deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 70%);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: .9rem;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateX(45%);
  filter: blur(2px);
  pointer-events: none;
  transition:
    opacity .55s cubic-bezier(.2,.7,.2,1),
    transform .65s cubic-bezier(.2,.7,.2,1),
    filter .55s ease,
    border-color .3s,
    background .3s;
  backdrop-filter: blur(10px);
}
.trust-badge.is-current {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  pointer-events: auto;
}
.trust-badge.is-leaving {
  opacity: 0;
  transform: translateX(-45%);
  filter: blur(2px);
}
.trust-badge::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255,179,71,0.55), rgba(255,179,71,0) 45%, rgba(255,179,71,0) 55%, rgba(255,179,71,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .5;
  transition: opacity .35s;
  pointer-events: none;
}
.trust-badge::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 35%; height: 1.5px;
  background: linear-gradient(90deg, var(--brand), transparent);
  transition: width .45s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.trust-badge.is-current:hover {
  border-color: rgba(255,179,71,0.45);
  background: linear-gradient(155deg, rgba(255,179,71,0.1), rgba(255,255,255,0.03) 65%);
}
.trust-badge.is-current:hover::before { opacity: 1; }
.trust-badge.is-current:hover::after { width: 100%; }

.trust-badge .ti {
  position: relative;
  flex-shrink: 0;
  width: 3.1rem; height: 3.1rem;
  border-radius: 999px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,179,71,0.35), rgba(255,179,71,0.1) 65%, transparent);
  color: var(--brand-2);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), color .3s;
}
.trust-badge .ti svg { width: 26px; height: 26px; }
.trust-badge .ti::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(242,107,15,0.4), transparent 65%);
  opacity: 0;
  transition: opacity .4s;
  z-index: -1;
}
.trust-badge.is-current:hover .ti {
  transform: rotate(-8deg) scale(1.06);
  color: var(--paper);
  background: radial-gradient(circle at 30% 30%, rgba(255,179,71,0.65), rgba(242,107,15,0.5) 65%, rgba(242,107,15,0.25));
}
.trust-badge.is-current:hover .ti::before { opacity: 1; }

/* Trust pagination dots */
.trust-dots { display: flex; gap: .4rem; align-items: center; }
.trust-dots button {
  width: 18px; height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 0; padding: 0;
  cursor: pointer;
  transition: background .35s, width .35s;
}
.trust-dots button.is-active {
  background: var(--brand);
  width: 28px;
}
.trust-dots button:hover { background: rgba(255,179,71,0.55); }

.trust-badge .tl {
  display: flex; flex-direction: column; gap: .15rem;
  line-height: 1.1;
}
.trust-badge .tl .tn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  color: var(--paper);
}
.trust-badge .tl .ts {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* --- Contour lines svg pattern (hero decoration) --- */
.contour-bg {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'><g fill='none' stroke='rgba(255,180,71,0.14)' stroke-width='1'><path d='M-50 200 C 100 80, 250 320, 400 200 S 700 80, 850 200'/><path d='M-50 260 C 100 140, 250 380, 400 260 S 700 140, 850 260'/><path d='M-50 320 C 100 200, 250 440, 400 320 S 700 200, 850 320'/><path d='M-50 380 C 100 260, 250 500, 400 380 S 700 260, 850 380'/><path d='M-50 440 C 100 320, 250 560, 400 440 S 700 320, 850 440'/><path d='M-50 500 C 100 380, 250 620, 400 500 S 700 380, 850 500'/></g></svg>");
  background-size: 1100px 1100px;
  background-position: center;
  pointer-events: none;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .85rem 1.4rem;
  font-family: var(--font-body); font-weight: 500; font-size: .95rem;
  letter-spacing: -0.005em;
  border-radius: 999px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, box-shadow .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--paper); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: 0 12px 32px -10px rgba(242,107,15,.55); }
.btn-ghost { background: transparent; color: var(--paper); border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.45); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); box-shadow: 0 12px 32px -10px rgba(12,10,9,.5); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --- Tick markers (decorative on cards) --- */
.tick-corner {
  position: relative;
}
.tick-corner::before, .tick-corner::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border-color: var(--brand);
  pointer-events: none;
}
.tick-corner::before {
  top: 10px; left: 10px;
  border-top: 1.5px solid var(--brand);
  border-left: 1.5px solid var(--brand);
}
.tick-corner::after {
  bottom: 10px; right: 10px;
  border-bottom: 1.5px solid var(--brand);
  border-right: 1.5px solid var(--brand);
}

/* --- Service cards --- */
.svc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.75rem 1.75rem;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .4s;
  position: relative;
  overflow: hidden;
}
.svc-card::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(140deg, transparent 60%, rgba(242,107,15,.08) 100%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.svc-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.svc-card:hover::after { opacity: 1; }

/* --- FAQ accordion --- */
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary .plus {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  position: relative;
  transition: background .25s, border-color .25s, transform .35s;
}
details.faq > summary .plus::before,
details.faq > summary .plus::after {
  content: ""; position: absolute;
  background: var(--ink);
  transition: transform .35s, background .25s;
}
details.faq > summary .plus::before { width: 12px; height: 1.5px; }
details.faq > summary .plus::after  { width: 1.5px; height: 12px; }
details.faq[open] > summary .plus {
  background: var(--brand); border-color: var(--brand);
}
details.faq[open] > summary .plus::before,
details.faq[open] > summary .plus::after { background: var(--paper); }
details.faq[open] > summary .plus::after { transform: scaleY(0); }
details.faq .faq-body {
  margin-top: 1rem; max-width: 65ch;
  color: var(--muted); line-height: 1.7;
}

/* --- Numbered list (process) --- */
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--brand);
}

/* --- Nav --- */
.nav-link {
  position: relative;
  font-size: .92rem;
  color: var(--ink);
  padding: .45rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: var(--brand);
  transition: right .3s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after,
.nav-link.is-active::after { right: 0; }

/* --- Hero rotating phrase --- */
.rotate-words {
  display: inline-block; position: relative;
  vertical-align: top;
}
.rotate-words > span {
  display: inline-block;
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  opacity: 0; transform: translateY(20px);
  animation: rotateWord 9s infinite;
  color: var(--brand);
}
.rotate-words > span:nth-child(1) { animation-delay: 0s; }
.rotate-words > span:nth-child(2) { animation-delay: 3s; }
.rotate-words > span:nth-child(3) { animation-delay: 6s; }
@keyframes rotateWord {
  0%,2%   { opacity: 0; transform: translateY(20px); }
  6%,30%  { opacity: 1; transform: translateY(0); }
  33%,100%{ opacity: 0; transform: translateY(-20px); }
}

/* --- Reveal on scroll --- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .40s; }

/* --- Marquee strip (areas served) --- */
.marquee {
  display: flex; gap: 4rem; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 4rem;
  animation: marquee 38s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Subtle noise overlay --- */
.noise::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
  mix-blend-mode: overlay;
  opacity: .25;
}

/* --- Focus rings --- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px; border-radius: 4px;
}

/* --- Form inputs --- */
.field {
  display: block; width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 1rem 0 .75rem;
  font-family: var(--font-body); font-size: 1rem;
  color: var(--ink);
  transition: border-color .25s;
}
.field:focus { outline: none; border-bottom-color: var(--brand); }
.field-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: .4rem;
}
.field {
  padding-top: .5rem;
  padding-bottom: .65rem;
}

/* --- Mobile menu --- */
.mobile-menu { transform: translateY(-100%); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.mobile-menu.is-open { transform: translateY(0); }
body.menu-open { overflow: hidden; }

/* --- Section divider with coordinates --- */
.coord-divider {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em;
  color: var(--muted); text-transform: uppercase;
}
.coord-divider::before, .coord-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* --- Print-safety: avoid mobile scroll horizontal --- */
html, body { overflow-x: clip; }

/* Map placeholder fallback (when iframe blocked) */
.map-fallback {
  background:
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 40px),
    var(--paper-2);
}
