/*
Theme Name: Wędliny z Godziszki – Vintage
Theme URI: https://wedlinyzgodziszki.pl/
Description: Historia Adolfa Bożka i Wędlin z Godziszki w oprawie vintage.
Version: 1.0.0
Requires at least: 6.1
Requires PHP: 7.4
Text Domain: wedliny-godziszka-vintage
*/

@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-01.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-02.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-03.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-04.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-09.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/font-10.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --page: #f6edd9;
  --ink: #243e31;
  --copy: #3f3b2d;
  --subtle: #5b5943;
  --accent: #765020;
  --rule: #c5ad80;
  --nav: #243e31;
  --nav-ink: #fff0d2;
  --nav-rule: #53624d;
  --nav-hover: #3a5140;
  --quote-bg: #f0e2c4;
  --quote-ink: #374534;
  --year-bg: #e9d4a6;
  --year-ink: #473318;
  --mat: #ebd9b7;
  --hero: #f0e2bf;
  --hero-ink: #213e31;
  --hero-accent: #744719;
  --hero-sub: #45513c;
  --serif: Alegreya, Georgia, serif;
  --sans: Manrope, "Segoe UI", sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg width='192' height='192' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23845731' filter='url(%23p)' opacity='.13' d='M0 0h192v192H0z'/%3E%3C/svg%3E");
  --nav-height: 52px;
  --admin-offset: 0px;
  --gutter: clamp(20px, 5.2vw, 60px);
  --reading: 780px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page) var(--grain);
  font-family: var(--serif);
}
body.admin-bar { --admin-offset: 32px; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 100000;
  inset: calc(var(--admin-offset) + 7px) auto auto 8px;
  padding: 11px 15px;
  background: var(--page);
  color: var(--ink);
  font: 700 14px var(--sans);
}
#tresc, .story section {
  scroll-margin-top: calc(var(--admin-offset) + var(--nav-height) + 22px);
}

/* Masthead from the Vintage preview. */
.masthead {
  isolation: isolate; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  background: var(--hero) var(--grain);
  color: var(--hero-ink);
  text-align: center;
  padding: clamp(42px, 6.6vw, 68px) var(--gutter) clamp(35px, 5.3vw, 55px);
}
.masthead p, .masthead h1 { margin: 0; }
.masthead .header-eyebrow {
  display: flex; justify-content: center; align-items: center;
  gap: clamp(6px, 1.4vw, 16px);
  margin-bottom: clamp(16px, 2.1vw, 23px);
  color: var(--hero-sub);
  font: 800 clamp(.65rem, 1.35vw, .84rem)/1.5 var(--serif);
  letter-spacing: .20em; text-transform: uppercase;
}
.header-eyebrow::before, .header-eyebrow::after {
  content: "";
  width: clamp(10px, 3.2vw, 37px);
  height: 1px;
  background: currentColor;
  opacity: .5;
  flex: none;
}
.masthead h1 {
  font: 800 clamp(2.85rem, 8.4vw, 7.125rem)/.90 var(--serif);
  letter-spacing: -.051em;
}
.masthead h1 em { color: var(--hero-accent); font-weight: 670; }
.masthead .header-sub {
  margin-top: clamp(18px, 2.4vw, 27px);
  color: var(--hero-sub);
  font: italic 500 clamp(.98rem, 2vw, 1.27rem)/1.4 var(--serif);
  text-wrap: balance;
}
.header-ornament {
  display: inline-block;
  margin-top: clamp(13px, 1.7vw, 18px);
  padding-left: .32em;
  color: var(--hero-accent);
  font: 400 21px/1 Georgia, serif;
  letter-spacing: .32em;
}
.hero-art {
  position: absolute;
  inset: 18px max(14px, 2.6vw);
  z-index: -1;
  max-width: 1480px;
  margin: auto;
  border: 3px double #8766388c;
  pointer-events: none;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #87663842;
}
.hero-flourish {
  position: absolute; top: 50%;
  width: clamp(64px, 9vw, 120px);
  color: #744e25;
  opacity: .56;
}
.hero-flourish .olive { display: block; width: 100%; }
.hero-flourish-left { left: 7.3%; transform: translateY(-50%) rotate(-14deg); }
.hero-flourish-right { right: 7.3%; transform: translateY(-50%) scaleX(-1) rotate(-14deg); }

.chapter-nav {
  position: sticky;
  top: var(--admin-offset);
  z-index: 6;
  min-height: var(--nav-height);
  display: flex; justify-content: center;
  background: var(--nav); color: var(--nav-ink);
  border-block: 3px double #917444;
}
.chapter-nav a {
  min-height: calc(var(--nav-height) - 6px);
  padding: 10px clamp(14px, 3.25vw, 37px);
  display: grid; place-items: center;
  border-inline-end: 1px solid var(--nav-rule);
  font: 700 13px/1.25 var(--serif);
  letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none;
}
.chapter-nav a:first-child { border-inline-start: 1px solid var(--nav-rule); }
.chapter-nav a:hover, .chapter-nav a:focus-visible { background: var(--nav-hover); }
.chapter-nav a:focus-visible { outline-color: var(--year-bg); outline-offset: -4px; }

/* The original story order, timeline and image groupings. */
.story {
  width: min(calc(100% - 2 * var(--gutter)), var(--reading));
  margin: auto;
  padding-bottom: clamp(50px, 7vw, 90px);
}
.intro-quote {
  position: relative;
  margin: clamp(28px, 4.1vw, 49px) 0 0;
  padding: clamp(22px, 3.2vw, 31px) clamp(20px, 4vw, 38px) clamp(22px, 3.2vw, 31px) clamp(40px, 6.5vw, 74px);
  background: var(--quote-bg);
  color: var(--quote-ink);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -6px;
  font: italic 500 clamp(1.22rem, 2.3vw, 1.56rem)/1.52 var(--serif);
}
.intro-quote::before {
  content: "“";
  position: absolute; top: .22em; left: clamp(11px, 2.5vw, 25px);
  color: var(--accent);
  font: 700 clamp(40px, 6vw, 68px)/1 Georgia, serif;
}
.story section { margin-top: clamp(44px, 6.7vw, 72px); }
.section-label {
  display: block; margin-bottom: 10px;
  color: var(--accent);
  font: 700 13px/1.35 var(--serif);
  letter-spacing: .17em; text-transform: uppercase;
}
.story h2, .inner-story h1 {
  margin: 0 0 23px; padding-bottom: 17px;
  border-bottom: 3px double var(--rule);
  color: var(--ink);
  font: 740 clamp(2.1rem, 4.55vw, 3.4rem)/1.07 var(--serif);
  letter-spacing: -.048em;
  text-wrap: balance;
}
.year-badge {
  display: inline-flex; align-items: center;
  margin: 0 0 7px; padding: 5px 11px;
  background: var(--year-bg); color: var(--year-ink);
  border: 1px solid #ac8752;
  box-shadow: inset 0 0 0 2px #f3e6cb;
  font: 800 14px/1.1 var(--serif);
  font-variant-numeric: tabular-nums; letter-spacing: .1em;
}
.story p, .inner-story .entry-content {
  margin: 0 0 19px;
  color: var(--copy);
  font: 450 clamp(1.12rem, 2vw, 1.28rem)/1.65 var(--serif);
  text-wrap: pretty;
}
.story strong { color: var(--ink); font-weight: 800; }
.highlight {
  margin: clamp(24px, 4vw, 36px) 0;
  padding: clamp(20px, 4vw, 32px);
  background: var(--quote-bg);
  color: var(--quote-ink);
  border: 3px double var(--rule);
  font: italic 500 clamp(1.12rem, 2vw, 1.28rem)/1.6 var(--serif);
}
.highlight strong:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font: 800 .89rem/1.4 var(--serif);
  letter-spacing: .15em; text-transform: uppercase;
}
.ornament-divider {
  display: flex; justify-content: center; align-items: center;
  gap: 15px;
  margin: clamp(34px, 5.7vw, 60px) 0 0;
  color: var(--accent);
  font: 700 17px/1 var(--serif);
  letter-spacing: .15em;
}
.ornament-divider::before, .ornament-divider::after {
  content: "";
  width: min(17vw, 110px); height: 1px;
  background: var(--rule);
}
.ornament-divider + section { margin-top: clamp(34px, 5.7vw, 56px); }

.doc-figure, .photo-figure { margin: 34px auto 0; text-align: center; }
.doc-figure { max-width: 480px; }
.archive-frame {
  position: relative;
  display: block;
  padding: clamp(10px, 2vw, 18px);
  background: var(--mat);
  border: 3px double #ae9160;
  box-shadow: 0 7px 16px #67401117;
}
.archive-frame:hover { border-color: var(--accent); }
.archive-frame img { width: 100%; }
.enlarge-icon {
  position: absolute; top: 7px; right: 7px;
  display: grid; place-items: center;
  width: 37px; height: 37px;
  background: var(--page); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 50%;
  box-shadow: 0 1px 6px #200c101f;
}
.archive-frame:hover .enlarge-icon { background: var(--year-bg); color: var(--year-ink); }
.story figcaption {
  margin-top: 11px; color: var(--subtle);
  font: italic 550 1.02rem/1.45 var(--serif);
  text-wrap: balance;
}
.doc-pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 3.3vw, 29px); margin-top: 29px;
}
.doc-pair .doc-figure { margin: 0; max-width: none; }

.shop-block {
  margin: 38px auto 0;
  padding: clamp(20px, 4vw, 32px);
  text-align: center;
  background: var(--quote-bg);
  border: 3px double var(--rule);
}
.shop-logo { display: block; width: min(240px, 78%); margin: 0 auto 16px; }
.shop-logo img { width: 100%; }
.shop-link {
  display: inline-block; padding: 12px 23px;
  color: var(--nav-ink); background: var(--nav);
  border: 3px double #a58c55;
  font: 750 .92rem/1.2 var(--serif);
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
}
.shop-link:hover { background: var(--nav-hover); }
.site-footer {
  padding: 33px var(--gutter) 36px;
  background: var(--nav); color: var(--nav-ink);
  border-top: 3px double #917444;
  text-align: center;
  font: italic 500 1rem/1.4 var(--serif);
}
.footer-brand {
  display: block; margin-bottom: 6px;
  font: 750 clamp(1.35rem, 2.4vw, 1.85rem)/1.15 var(--serif);
}

/* The full-size image uses the same file and caption as its thumbnail. */
.archive-dialog {
  padding: 0;
  max-width: min(94vw, 1320px);
  max-height: 94dvh;
  background: var(--page); color: var(--ink);
  border: 3px double var(--rule); border-radius: 5px;
  overscroll-behavior: contain;
}
.archive-dialog::backdrop { background: #18170fe3; }
.archive-dialog-inner {
  position: relative;
  padding: 45px clamp(12px, 3vw, 36px) 18px;
}
.archive-dialog figure { margin: 0; }
.archive-dialog img { max-height: 75dvh; object-fit: contain; margin: auto; }
.archive-dialog figcaption {
  margin-top: 12px;
  font: 650 .85rem/1.5 var(--sans);
  text-align: center;
}
.archive-close {
  position: absolute; top: 7px; right: 7px;
  width: 35px; height: 35px; padding: 0;
  display: grid; place-items: center;
  color: var(--ink); background: var(--mat);
  border: 1px solid var(--rule); border-radius: 50%;
  cursor: pointer;
}
body:has(.archive-dialog[open]) { overflow: hidden; }

/* WordPress pages outside the home story. */
.inner-masthead {
  padding: 26px var(--gutter);
  text-align: center;
  background: var(--hero) var(--grain);
  border-bottom: 3px double var(--rule);
  font: 800 clamp(1.7rem, 4vw, 2.4rem)/1.1 var(--serif);
}
.inner-masthead a { text-decoration: none; }
.inner-masthead a:hover { text-decoration: underline; }
.inner-story { padding-top: clamp(28px, 5vw, 52px); }
.inner-story article + article { margin-top: 34px; }
.inner-story .entry-content a { text-underline-offset: .14em; }
.inner-story .alignwide, .inner-story .alignfull { max-width: 100%; }

@media (min-width: 900px) {
  .photo-figure { margin-inline: -48px; }
}
@media (max-width: 782px) {
  body.admin-bar { --admin-offset: 46px; }
}
@media (max-width: 760px) {
  .chapter-nav a { padding-inline: clamp(8px, 2.2vw, 20px); }
  .hero-flourish { opacity: .35; }
  .hero-flourish-left { left: 2.6%; }
  .hero-flourish-right { right: 2.6%; }
}
@media (max-width: 620px) {
  .doc-pair { grid-template-columns: 1fr; gap: 25px; }
}
@media (max-width: 600px) {
  body.admin-bar { --admin-offset: 0px; }
}
@media (max-width: 570px) {
  :root { --nav-height: 0px; --gutter: clamp(16px, 5vw, 27px); }
  .masthead { padding-top: 41px; padding-bottom: 32px; }
  .chapter-nav {
    position: relative; top: auto;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .chapter-nav a { min-height: 42px; padding: 8px 2px; font-size: 10.5px; letter-spacing: .07em; }
  .chapter-nav a:first-child { border-inline-start: 0; }
  .chapter-nav a:nth-child(3n) { border-inline-end: 0; }
  .chapter-nav a:nth-child(n+4) { border-top: 1px solid var(--nav-rule); }
  .masthead .header-eyebrow { gap: 8px; letter-spacing: .13em; }
  .masthead h1 { font-size: clamp(2.7rem, 10.2vw, 4.25rem); }
  .hero-art { inset: 9px; }
  .hero-flourish { display: none; }
  .intro-quote { padding-inline: 34px 17px; }
  .intro-quote::before { left: 8px; }
  .story h2, .inner-story h1 { text-wrap: pretty; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .chapter-nav a, .archive-frame, .enlarge-icon, .shop-link {
    transition: background-color .16s, border-color .16s;
  }
}
