/* ---------------------------------------------------------
   Studio Matejko — design tokens
--------------------------------------------------------- */
:root {
  --ink: #17140f;
  --ink-soft: rgba(23, 20, 15, .66);
  --ink-faint: rgba(23, 20, 15, .46);
  --paper: #fbf8f2;
  --paper-raised: #ffffff;
  --sand: #ecdfc3;
  --sand-deep: #ddc99a;
  --gold: #a9812e;
  --gold-bright: #cf9f3c;
  --gold-line: rgba(169, 129, 46, .35);
  --line: rgba(23, 20, 15, .13);
  --line-soft: rgba(23, 20, 15, .08);

  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out),
              border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: #2a2419; border-color: #2a2419; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-gold {
  background: var(--gold-bright);
  color: var(--ink);
  border-color: var(--gold-bright);
}
.btn-gold:hover { background: #e2b754; border-color: #e2b754; }

.btn-small { padding: 9px 18px; font-size: .875rem; }
.btn-large { padding: 14px 28px; font-size: .95rem; }

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 76px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
}
.brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .01em;
  line-height: 1.25;
  min-width: 0;
}
.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .93rem;
  font-weight: 500;
}
.primary-nav a {
  color: var(--ink-soft);
  transition: color 160ms var(--ease-out);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.primary-nav a:hover { color: var(--ink); border-color: var(--gold-line); }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  margin: 0 9px;
  background: var(--ink);
  transition: transform 200ms var(--ease-in-out), opacity 160ms var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero { background: var(--paper); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 96px;
}

.hero-copy { min-width: 0; }

.hero-copy h1 {
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.6rem);
  max-width: 13ch;
}
.hero-lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2em;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-plates {
  position: relative;
  height: 320px;
}

.plate {
  position: absolute;
  width: 300px;
  background: var(--paper-raised);
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 40px -22px rgba(23, 20, 15, .35);
  opacity: 1;
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
}

.plate-1 { top: 4px; right: 40px; transform: rotate(-3deg); transition-delay: 120ms; }
.plate-2 { top: 150px; right: 0; transform: rotate(2deg); transition-delay: 320ms; }

@starting-style {
  .plate-1 { opacity: 0; transform: translateY(-20px) rotate(-3deg); }
  .plate-2 { opacity: 0; transform: translateY(20px) rotate(2deg); }
}

.plate-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--ink-faint);
  width: fit-content;
}
.plate-live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
}
.plate-live-pending i { background: var(--ink-faint); }
.plate-domain {
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.plate-kind {
  font-size: .85rem;
  color: var(--ink-soft);
}

.proof-strip {
  border-top: 1px solid var(--line);
  background: var(--ink);
}
.proof-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 20px 28px;
}
.proof-inner span {
  color: rgba(251, 248, 242, .82);
  font-size: .9rem;
  padding: 0 28px;
  border-left: 1px solid rgba(251, 248, 242, .18);
}
.proof-inner span:first-child { padding-left: 0; border-left: none; }

/* ---------------------------------------------------------
   Sections
--------------------------------------------------------- */
.section { padding: 104px 0; scroll-margin-top: 76px; }
.section h2 {
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
  max-width: 16ch;
}
.section-lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 3.2em;
}

.realizacje { background: var(--sand); }

.case {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0;
}
.case + .case { border-top: 1px solid var(--sand-deep); }
.case-reverse { grid-template-columns: 1.15fr .85fr; }
.case-reverse .case-plate { order: 2; }
.case-reverse .case-copy { order: 1; }
.case-plate, .case-copy { min-width: 0; }

.plate-large {
  position: static;
  width: 100%;
  max-width: 340px;
  padding: 30px 30px 34px;
  opacity: 1;
  transform: none;
}
.plate-large .plate-domain { font-size: 1.7rem; }

.case-copy h3 { font-size: 1.6rem; margin-bottom: .4em; }
.case-copy p { color: var(--ink-soft); max-width: 56ch; }

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.2em 0 1.4em;
}
.case-tags li {
  font-size: .82rem;
  color: var(--ink);
  border: 1px solid var(--sand-deep);
  background: var(--paper);
  padding: 6px 14px;
  border-radius: 3px;
}

.case-link {
  display: inline-block;
  font-weight: 600;
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.case-link:hover { color: var(--gold); border-color: var(--gold); }
.case-link-pending {
  color: var(--ink-faint);
  border-bottom-color: var(--line);
  cursor: default;
}

/* Process */
.proces { background: var(--paper); }
.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.process-list > li { min-width: 0; }
.process-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: .5em;
}
.process-list h3 { font-size: 1.15rem; margin-bottom: .4em; }
.process-list p { color: var(--ink-soft); font-size: .95rem; }

/* Pricing */
.cennik { background: var(--sand); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pricing-grid > .price-card { min-width: 0; }
.price-card {
  background: var(--paper);
  border: 1px solid var(--sand-deep);
  border-radius: 4px;
  padding: 32px 28px;
}
.price-card-featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.price-card-featured h3,
.price-card-featured .price-tag { color: var(--paper); }
.price-card-featured .price-desc,
.price-card-featured li { color: rgba(251, 248, 242, .74); }
.price-card.price-card-featured li::before { color: var(--gold-bright); }

.price-card h3 { font-size: 1.2rem; margin-bottom: .3em; }
.price-tag {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: .5em;
}
.price-desc { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.4em; }
.price-card ul { display: flex; flex-direction: column; gap: 10px; }
.price-card li {
  font-size: .9rem;
  padding-left: 1.3em;
  position: relative;
}
.price-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.pricing-note {
  margin-top: 32px;
  font-size: .92rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Quote form */
.wycena { background: var(--ink); color: var(--paper); }
.wycena-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
}
.wycena-intro, .quote-form { min-width: 0; }
.wycena-intro h2 { color: var(--paper); }
.wycena-intro p { color: rgba(251, 248, 242, .7); max-width: 40ch; }
.wycena-direct a { color: var(--gold-bright); border-bottom: 1px solid var(--gold-line); transition: color 160ms ease; }
.wycena-direct a:hover { color: var(--paper); }

.quote-form { display: flex; flex-direction: column; gap: 20px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-row-split > * { min-width: 0; }
.form-row label {
  display: block;
  font-size: .85rem;
  color: rgba(251, 248, 242, .68);
  margin-bottom: 8px;
}
.optional { color: rgba(251, 248, 242, .4); font-weight: 400; }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: rgba(251, 248, 242, .05);
  border: 1px solid rgba(251, 248, 242, .22);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-row input::placeholder,
.form-row textarea::placeholder { color: rgba(251, 248, 242, .35); }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
  background: rgba(251, 248, 242, .08);
}
.form-row select option { color: #111; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-submit { align-self: flex-start; margin-top: 8px; }

.form-status {
  font-size: .88rem;
  color: var(--gold-bright);
  min-height: 1.4em;
}

/* About */
.o-mnie { background: var(--paper); }
.o-mnie-grid {
  max-width: 640px;
}
.o-mnie p { color: var(--ink-soft); }
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.6em 0 0;
}
.about-tags li {
  font-size: .82rem;
  color: var(--ink);
  background: var(--sand);
  padding: 6px 14px;
  border-radius: 3px;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(251, 248, 242, .75); border-top: 1px solid rgba(251, 248, 242, .12); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 40px 28px;
}
.footer-brand .brand-text { font-family: var(--font-display); color: var(--paper); font-size: 1.05rem; }
.footer-brand p { font-size: .85rem; color: rgba(251, 248, 242, .5); margin: 6px 0 0; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: .88rem; }
.footer-nav a { transition: color 160ms ease; }
.footer-nav a:hover { color: var(--gold-bright); }
.footer-copy { width: 100%; font-size: .78rem; color: rgba(251, 248, 242, .4); padding: 0 28px 32px; margin: 0; }

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; padding-top: 48px; }
  .hero-plates { height: 220px; max-width: 420px; }
  .case, .case-reverse { grid-template-columns: 1fr; }
  .case-reverse .case-plate, .case-reverse .case-copy { order: initial; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .wycena-grid { grid-template-columns: 1fr; gap: 40px; }

  .proof-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .proof-inner span {
    padding: 0;
    border-left: none;
    padding-top: 12px;
    border-top: 1px solid rgba(251, 248, 242, .18);
    width: 100%;
  }
  .proof-inner span:first-child { padding-top: 0; border-top: none; }
}

@media (max-width: 760px) {
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  }
  .primary-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .primary-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-cta-mobile { display: block; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .brand-text small { display: none; }

  .section { padding: 72px 0; }
  .process-list { grid-template-columns: 1fr; gap: 32px; }
  .form-row-split { grid-template-columns: 1fr; }
  .footer-copy { text-align: left; }
}

/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate { transition: none; }
  .btn, .nav-toggle span, .primary-nav { transition: none; }
}
