/* ==========================================================================
   Ponožky Pestré — Autumn harvest style
   ========================================================================== */

:root {
  --ink: #1c2430;
  --ink-soft: #2a3444;
  --sand: #f3e9d4;
  --sand-deep: #e6d6b2;
  --cream: #fbf6ec;
  --rust: #b4502a;
  --rust-deep: #8f3c1f;
  --ochre: #d99a3d;
  --coral: #e2683f;
  --text: #241a12;
  --text-soft: #5a4c3c;
  --line: rgba(28, 36, 48, 0.14);
  --focus: #1c2430;

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, "Segoe UI", system-ui, Roboto, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 2px 10px rgba(28, 20, 10, 0.08);
  --shadow-2: 0 18px 40px -16px rgba(28, 20, 10, 0.28);
  --maxw: 1200px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--rust-deep); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  left: -9999px;
}

.hp { display: none !important; }

section { padding: clamp(48px, 8vw, 96px) 0; }
.section-tight { padding: clamp(28px, 5vw, 56px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--rust-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin: 0 0 0.6em;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--text-soft);
  max-width: 46ch;
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  min-height: 44px;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  width: 100%;
  background: var(--rust);
  z-index: -1;
  transition: left 0.35s ease;
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--cream); }
.btn:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline::before { background: var(--ink); }
.btn-outline:hover, .btn-outline:focus-visible { color: var(--cream); }

.btn-light {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.btn-light::before { background: var(--rust); }
.btn-light:hover { color: var(--cream); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ===== Reveal / scroll animation ===== */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.js-armed {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.js-armed.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal.js-armed { opacity: 1; transform: none; transition: none; }
}

/* ===== Grain overlay ===== */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  z-index: 999;
}

/* ===== Falling leaves (continuous ambient motion) ===== */
.leaf-field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 998;
}
.leaf-field svg {
  position: absolute;
  top: -10%;
  width: 22px;
  height: 22px;
  animation: leaf-fall linear infinite;
  opacity: 0.8;
}
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(var(--drift, 40px), 118vh) rotate(380deg); }
}
@media (prefers-reduced-motion: reduce) {
  .leaf-field { display: none; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-word { width: 150px; height: 26px; color: var(--ink); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  position: relative;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after, .main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--ink);
}
.cart-link svg { width: 26px; height: 26px; }
.cart-count {
  position: absolute;
  top: 2px; right: 0;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--rust);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  transition: transform 0.25s ease;
}
.cart-count.bump { transform: scale(1.4); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 26px; height: 26px; }

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 82vw);
  height: 100vh;
  background: var(--ink);
  color: var(--cream);
  padding: 90px 28px 28px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s ease;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a {
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 600;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 8, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 550;
}
.nav-backdrop.open { opacity: 1; visibility: visible; }
.mobile-nav-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
}
.mobile-nav-close svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(40px, 8vw, 90px);
  overflow: hidden;
  background: linear-gradient(160deg, var(--sand) 0%, var(--sand-deep) 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-headline {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 0.4em;
}
.hero-headline .wipe {
  display: block;
  clip-path: inset(0 100% 0 0);
  animation: hero-wipe 1.1s cubic-bezier(.65,0,.2,1) 0.15s forwards;
}
.hero-headline .wipe:nth-child(2) { animation-delay: 0.38s; }
@keyframes hero-wipe {
  to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-headline .wipe { clip-path: inset(0 0 0 0); animation: none; }
}
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
}
.hero-art svg { width: 100%; height: 100%; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }
.hero-badges { display: flex; gap: 18px; margin-top: 2.2em; flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-soft); font-weight: 600; }
.hero-badge svg { width: 22px; height: 22px; color: var(--rust-deep); flex-shrink: 0; }

/* ===== Section divider ===== */
.divider {
  width: 100%;
  height: 28px;
  color: var(--rust);
  display: block;
}

/* ==========================================================================
   Masonry gallery
   ========================================================================== */
.masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 90px;
  gap: 14px;
}
.masonry-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  grid-row: span 3;
}
.masonry-item:nth-child(1) { grid-column: span 2; grid-row: span 4; }
.masonry-item:nth-child(2) { grid-row: span 3; }
.masonry-item:nth-child(3) { grid-row: span 4; }
.masonry-item:nth-child(4) { grid-column: span 2; grid-row: span 3; }
.masonry-item:nth-child(5) { grid-row: span 3; }
.masonry-item:nth-child(6) { grid-column: span 2; grid-row: span 3; }
.masonry-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.masonry-item:hover img { transform: scale(1.08); }
.masonry-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(20, 14, 8, 0.85));
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.masonry-item:hover .masonry-caption, .masonry-item:focus-within .masonry-caption { transform: translateY(0); }

@media (max-width: 760px) {
  .masonry { grid-template-columns: repeat(2, 1fr); }
  .masonry-item:nth-child(1), .masonry-item:nth-child(4), .masonry-item:nth-child(6) { grid-column: span 2; }
}

/* ==========================================================================
   Sock compass (signature feature)
   ========================================================================== */
.compass {
  background: var(--ink);
  color: var(--cream);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.compass h2, .compass .lede { color: var(--cream); }
.compass .lede { color: #cfc3ad; }
.compass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.compass-dial { position: relative; }
.compass-dial svg { width: 100%; height: auto; }
.compass-slider {
  width: 100%;
  margin: 1.4em 0 0.6em;
  accent-color: var(--coral);
  height: 44px;
}
.compass-readout {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #d8cdb6;
}
.compass-result {
  margin-top: 1.4em;
  padding: 18px 20px;
  background: rgba(251, 246, 236, 0.08);
  border: 1px solid rgba(251, 246, 236, 0.18);
  border-radius: var(--radius);
}
.compass-result strong { color: var(--ochre); font-size: 1.15rem; }
.compass-matches {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.compass-match {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 246, 236, 0.08);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  font-size: 0.82rem;
}
.compass-match img { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; }

@media (max-width: 760px) {
  .compass-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Cards / product grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}
.product-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.product-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .thumb img { transform: scale(1.07); }
.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--rust);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: 1.08rem; margin: 0; }
.product-card .price { font-family: var(--font-mono); font-weight: 700; color: var(--rust-deep); font-size: 1.05rem; }
.product-card .meta { font-size: 0.82rem; color: var(--text-soft); }
.product-card a.card-link { position: absolute; inset: 0; z-index: 2; }
.product-card .body { position: relative; z-index: 1; pointer-events: none; }
.product-card .body .btn { pointer-events: auto; position: relative; z-index: 3; align-self: flex-start; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
}
.filter-chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

@media (max-width: 760px) {
  .product-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .product-strip .product-card { min-width: 70vw; scroll-snap-align: start; }
}

/* ==========================================================================
   Seals / badges
   ========================================================================== */
.seal {
  width: 120px;
  height: 120px;
  color: var(--rust);
  flex-shrink: 0;
}
.seal-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.seal-item { display: flex; gap: 16px; align-items: flex-start; max-width: 280px; }
.seal-item p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }
.seal-item h3 { font-size: 1.02rem; margin-bottom: 0.3em; }

/* ==========================================================================
   Icon helpers
   ========================================================================== */
.icon { width: 24px; height: 24px; flex-shrink: 0; }

/* ==========================================================================
   About / content pages
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow-2); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.content-page main .container { max-width: 760px; }
.content-page h2 { margin-top: 1.6em; }
.content-page section { padding-top: 0; }
.legal-hero {
  background: var(--sand);
  padding: clamp(50px, 8vw, 80px) 0 40px;
}
.legal-hero .container { max-width: var(--maxw); }

/* ===== FAQ accordion ===== */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item[open] .faq-q svg { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; color: var(--text-soft); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.75em 0.9em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  accent-color: var(--rust);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--rust); }
.field-error { color: var(--rust-deep); font-size: 0.84rem; min-height: 1.2em; }
.form-status { margin-top: 10px; font-weight: 600; }
.form-status[data-state="ok"] { color: #3b6b43; }
.form-status[data-state="error"] { color: var(--rust-deep); }

.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input { flex: 1; min-width: 180px; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-2);
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(120%);
  transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { margin: 0; font-size: 0.92rem; color: #e3dac4; }
.cookie-banner a { color: var(--ochre); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn-outline { border-color: var(--cream); color: var(--cream); }
.cookie-actions .btn-outline::before { background: var(--cream); }
.cookie-actions .btn-outline:hover { color: var(--ink); }

/* ==========================================================================
   Cart / checkout
   ========================================================================== */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th, .cart-table td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.cart-row-title { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.qty-input { width: 64px; padding: 0.5em; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; min-height: 44px; }
.remove-btn { background: none; border: none; color: var(--rust-deep); cursor: pointer; font-weight: 600; min-height: 44px; }
.cart-summary {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  margin-left: auto;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cart-summary .total { font-weight: 700; font-size: 1.2rem; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.cart-empty svg { width: 72px; height: 72px; color: var(--rust); margin: 0 auto 20px; }

.checkout-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; margin-top: 32px; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #cfc3ad;
  padding: clamp(48px, 8vw, 80px) 0 28px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 40px;
}
.site-footer .logo-word { color: var(--cream); }
.site-footer h3 { color: var(--cream); font-size: 1rem; margin-bottom: 1em; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #cfc3ad; }
.site-footer a:hover { color: var(--ochre); }
.footer-about p { color: #b8ab8f; max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid rgba(251, 246, 236, 0.14);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #a89a7c;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.error-page svg { width: 180px; height: 180px; margin: 0 auto 24px; color: var(--rust); }

/* ==========================================================================
   Misc responsive
   ========================================================================== */
@media (max-width: 760px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 300px; }
  .split { grid-template-columns: 1fr; }
}
