/* ==========================================================================
   Ratajczak Dekarstwo — shared design tokens & components
   ========================================================================== */

:root {
  --ink: #1c1f1e;
  --ink-soft: #4a5054;
  --paper: #eef1ec;
  --paper-raised: #f8f9f5;
  --charcoal: #14181a;
  --charcoal-raised: #1e2427;
  --charcoal-float: #262d30;
  --steel: #3c5e73;
  --steel-dark: #294758;
  --steel-bright: #5686a1;
  --clay: #c17d3f;
  --clay-dark: #9c611f;
  --fog: #a9b6ba;
  --line-dark: rgba(169, 182, 186, 0.16);
  --line-light: rgba(28, 31, 30, 0.12);

  --shadow-card:
    0 1px 2px rgba(28, 31, 30, 0.06),
    0 8px 20px -8px rgba(28, 31, 30, 0.16),
    0 20px 40px -26px rgba(60, 94, 115, 0.18);
  --shadow-float:
    0 2px 4px rgba(0, 0, 0, 0.22),
    0 16px 32px -12px rgba(0, 0, 0, 0.45),
    0 30px 60px -30px rgba(60, 94, 115, 0.35);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Oswald", "Arial Narrow", sans-serif;
}

.label {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Focus states ------------------------------------------------------------ */
a, button, input, textarea, summary {
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--steel-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Grain texture overlay ---------------------------------------------------- */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Blueprint grid texture on dark sections (flat colors only, no gradients) - */
.blueprint {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M64 0H0V64' fill='none' stroke='%23a9b6ba' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
}

/* Header -------------------------------------------------------------------- */
.site-header {
  background: var(--charcoal);
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow 0.3s var(--ease-spring), border-color 0.3s var(--ease-spring);
}
.site-header.is-scrolled {
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7);
}

.wordmark {
  color: var(--paper-raised);
}
.wordmark .accent {
  color: var(--clay);
}

.nav-link {
  position: relative;
  color: var(--fog);
  transition: color 0.25s var(--ease-spring);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--clay);
  transition: right 0.3s var(--ease-spring);
}
.nav-link:hover {
  color: var(--paper-raised);
}
.nav-link:hover::after {
  right: 0;
}
.nav-link.is-current {
  color: var(--paper-raised);
}
.nav-link.is-current::after {
  right: 0;
}

/* Buttons -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), background-color 0.25s var(--ease-spring), color 0.25s var(--ease-spring), border-color 0.25s var(--ease-spring);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-primary {
  background: var(--clay);
  color: #fff9f2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 24px -10px rgba(154, 96, 30, 0.55);
}
.btn-primary:hover {
  background: #d68a48;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--paper-raised);
  border: 1.5px solid var(--line-dark);
}
.btn-outline:hover {
  border-color: var(--fog);
  background: rgba(169, 182, 186, 0.08);
  transform: translateY(-1px);
}
.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-light);
}
.btn-outline-dark:hover {
  border-color: var(--steel);
  color: var(--steel-dark);
  transform: translateY(-1px);
}

/* Ridge-line section dividers (signature motif, flat fill, no gradient) ---- */
.ridge-divider {
  display: block;
  width: 100%;
  height: auto;
}

/* Cards ------------------------------------------------------------------- */
.surface-card {
  background: var(--paper-raised);
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), border-color 0.35s var(--ease-spring);
}
.surface-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: rgba(60, 94, 115, 0.35);
}

.dark-card {
  background: var(--charcoal-raised);
  border: 1px solid var(--line-dark);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), border-color 0.35s var(--ease-spring);
}
.dark-card:hover {
  transform: translateY(-4px);
  border-color: rgba(193, 125, 63, 0.4);
  box-shadow: var(--shadow-float);
}

.stat-pill {
  background: rgba(169, 182, 186, 0.08);
  border: 1px solid var(--line-dark);
}

/* Gallery ------------------------------------------------------------------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-item img {
  transition: transform 0.6s var(--ease-spring), filter 0.6s var(--ease-spring);
  filter: saturate(0.96) contrast(1.02);
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.04);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--charcoal);
  opacity: 0;
  transition: opacity 0.4s var(--ease-spring);
}
.gallery-item:hover::after {
  opacity: 0.42;
}
.gallery-caption {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox -------------------------------------------------------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 16, 15, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fade-in 0.25s var(--ease-spring);
}
#lightbox.is-open {
  display: flex;
}
#lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  box-shadow: var(--shadow-float);
  border-radius: 4px;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero scrim: flat solid color only, no gradient ----------------------------- */
.hero-scrim {
  background: rgba(15, 17, 15, 0.46);
}

/* Reveal on scroll -------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Star rating ------------------------------------------------------------------ */
.stars {
  color: var(--clay);
  letter-spacing: 0.1em;
}

/* Utility: heading rule bar ------------------------------------------------------ */
.rule-bar {
  width: 3rem;
  height: 4px;
  background: var(--steel);
  border-radius: 2px;
}
