/* ============================================================
   PRACOWNIA SĘK — shared design system
   Warm editorial workshop aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..700;1,6..72,300..600&family=Hanken+Grotesk:ital,wght@0,300..800;1,400..600&display=optional');

:root {
  /* surfaces */
  --paper:      #F2EBDD;   /* warm bone */
  --paper-2:    #EADFCC;   /* deeper sand */
  --paper-3:    #E2D4BC;
  --card:       #FBF6EC;   /* lifted linen */
  --ink:        #211A11;   /* espresso */
  --ink-soft:   #5C5040;
  --ink-faint:  #8A7C68;

  /* wood */
  --walnut:     #6B4527;
  --oak:        #B98A52;
  --oak-light:  #D8B687;

  /* accent — deep forest, pairs with timber */
  --forest:     #2F3B2C;
  --forest-2:   #3C4C36;
  --forest-ink: #1E271C;

  --line:       rgba(33,26,17,0.16);
  --line-soft:  rgba(33,26,17,0.09);

  --font-display: 'Newsreader', Georgia, serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;

  --maxw: 1280px;
  --gut:  clamp(20px, 5vw, 80px);
  --r:    4px;

  --shadow-sm: 0 1px 2px rgba(33,26,17,.06), 0 4px 16px rgba(33,26,17,.05);
  --shadow-md: 0 2px 6px rgba(33,26,17,.07), 0 24px 60px -24px rgba(33,26,17,.28);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- typography ---------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0;
}
h1 { font-size: clamp(2.9rem, 7.5vw, 6rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.15; }
.serif-it { font-family: var(--font-display); font-style: italic; font-weight: 400; }

p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-soft); line-height: 1.55; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--walnut);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--walnut);
  opacity: .6;
}
.eyebrow.no-rule::before { display: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 140px); position: relative; }
.section-head { max-width: 760px; }
.section-head h2 { margin-top: .35em; }
.section-head .lead { margin-top: 1.1em; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--forest);
  --fg: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 1em 1.6em;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bg);
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .35s var(--ease);
  position: relative;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(47,59,44,.6); }
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--ghost {
  --bg: transparent;
  --fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: none; }
.btn--oak { --bg: var(--oak); --fg: var(--forest-ink); }

.link-underline {
  font-weight: 600;
  position: relative;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .4s var(--ease);
}
.link-underline:hover { background-size: 0% 1px; }

/* ---------- brand mark (growth rings / sęk) ---------- */
.mark { display: inline-block; vertical-align: middle; }
.mark svg { display: block; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
/* failsafe: throttled/offscreen contexts where transitions never tick */
body.reveal-fallback .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- image slot defaults ---------- */
image-slot {
  --slot-bg: var(--paper-3);
  background: linear-gradient(135deg, var(--paper-2), var(--paper-3));
  display: block;
}

/* ---------- divider ---------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
