/* ===== Klavírní škola Akord — Slavic cross-stitch art direction ===== */

:root {
  --linen: #f3ead7;
  --linen-dark: #e9dcc0;
  --plum: #4a2338;
  --plum-dark: #2c1420;
  --blush: #e7b5ae;
  --gold: #c08a2e;
  --red: #a7352c;
  --ink: #241a1c;
  --paper: #fbf6ec;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 6px;
  --shadow-card: 0 18px 40px -20px rgba(44, 20, 32, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.5em; color: var(--plum-dark); line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
::selection { background: var(--gold); color: var(--paper); }

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* honeypot field */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

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

/* ===== reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  clip-path: inset(0 0 12% 0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), clip-path 0.7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
}
.reveal-1 { transition-delay: 0.05s; }
.reveal-2 { transition-delay: 0.15s; }
.reveal-3 { transition-delay: 0.25s; }
.reveal-4 { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in-view { transition: none !important; transform: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ===== icon sprite ===== */
.icon { stroke: currentColor; fill: none; stroke-width: 1.6; vertical-align: middle; }

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--linen);
  border-bottom: 2px solid var(--plum-dark);
  background-image: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 12px);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: bottom;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--plum-dark);
}
.logo__mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo__word { width: 128px; height: 27px; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav__list {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav__list a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--plum-dark);
  padding: 0.3rem 0;
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__list a:hover::after, .nav__list a:focus-visible::after { transform: scaleX(1); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--plum-dark);
}
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
}
.cart-count.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--plum-dark);
  border-radius: var(--radius);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--plum-dark);
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 86vw);
    background: var(--plum-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 2rem 2rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
    gap: 2rem;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .nav__list a { color: var(--linen); font-size: 1.1rem; }
  .cart-link { color: var(--blush); }
}

/* ===== buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--plum-dark);
  background: var(--plum-dark);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  overflow: hidden;
  z-index: 0;
}
.btn--small { padding: 0.6rem 1.2rem; font-size: 0.88rem; min-height: 40px; }
.btn--ghost { background: transparent; color: var(--plum-dark); }
.btn--on-dark { border-color: var(--blush); color: var(--linen); }
.btn--on-dark.btn--ghost { color: var(--linen); border-color: var(--linen); }

.btn--sweep::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  width: 100%;
  background: var(--red);
  transition: left 0.35s var(--ease);
  z-index: -1;
}
.btn--sweep:hover::before, .btn--sweep:focus-visible::before { left: 0; }

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 3.5rem 0 5rem;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero__eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-size: 0.85rem;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0.3em 0 0.6em;
}
.hero__lede { font-size: 1.15rem; max-width: 34ch; color: var(--plum-dark); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
}
.hero__photo {
  position: relative;
  width: 82%;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.15) saturate(1.05); }
.hero-shape {
  position: absolute;
  pointer-events: none;
  transition: transform 0.1s linear;
}
.hero-shape--1 { top: -6%; left: -4%; width: 110px; height: 110px; }
.hero-shape--2 { bottom: -4%; right: -2%; width: 140px; height: 42px; }
.hero-shape--3 { top: 40%; right: -8%; width: 90px; height: 112px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; aspect-ratio: 4/3; }
  .hero__photo { width: 100%; }
}

/* ===== section dividers ===== */
.divider { width: 100%; height: auto; display: block; color: var(--red); }
.section { padding: 4.5rem 0; }
.section--alt { background: var(--paper); }
.section__head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section__eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ===== masonry gallery ===== */
.masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 10px;
  gap: 1rem;
}
.masonry__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.masonry__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.masonry__item:hover img { transform: scale(1.08); }
.masonry__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.2rem 1rem 0.8rem;
  background: linear-gradient(to top, rgba(44,20,32,0.88), transparent);
  color: var(--linen);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.masonry__item:hover .masonry__caption, .masonry__item:focus-within .masonry__caption { opacity: 1; transform: translateY(0); }
.masonry__item--a { grid-column: span 2; grid-row: span 28; }
.masonry__item--b { grid-column: span 2; grid-row: span 22; }
.masonry__item--c { grid-column: span 1; grid-row: span 18; }
.masonry__item--d { grid-column: span 1; grid-row: span 24; }
.masonry__item--e { grid-column: span 2; grid-row: span 20; }
.masonry__item--f { grid-column: span 2; grid-row: span 18; }

@media (max-width: 760px) {
  .masonry { grid-template-columns: repeat(2, 1fr); }
  .masonry__item--a, .masonry__item--b, .masonry__item--e, .masonry__item--f { grid-column: span 2; }
  .masonry__item--c, .masonry__item--d { grid-column: span 1; }
}

/* ===== calculator (signature feature) ===== */
.calculator {
  background: var(--plum-dark);
  color: var(--linen);
  border-radius: 18px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.calculator::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--blush) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: 0.08;
}
.calculator__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; position: relative; z-index: 1; }
.calc-field { margin-bottom: 1.2rem; }
.calc-field label { display: block; font-weight: 700; margin-bottom: 0.4rem; color: var(--blush); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.calc-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--blush);
  background: var(--paper);
  color: var(--ink);
  min-height: 44px;
  accent-color: var(--red);
}
.calc-result {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem;
  min-height: 180px;
}
.calc-result__label { color: var(--red); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.calc-result__name { margin-bottom: 0.4rem; }
.calc-result__actions { display: flex; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }

@media (max-width: 760px) {
  .calculator__grid { grid-template-columns: 1fr; }
  .calculator { padding: 1.6rem; }
}

/* ===== cards / product grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); }
.card__media { display: block; aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.card__body { padding: 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__title { font-size: 1.1rem; margin: 0; }
.card__title a:hover { color: var(--red); }
.card__desc { font-size: 0.92rem; color: #4a3b3d; flex: 1; }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; }
.price { font-weight: 700; color: var(--red); }
.duration { color: #6a5a5c; }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid#catalog-grid {
    display: flex;
    grid-template-columns: unset;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .grid#catalog-grid .card { min-width: 78vw; scroll-snap-align: start; flex-shrink: 0; }
  .grid:not(#catalog-grid) { grid-template-columns: 1fr; }
}

/* ===== product detail ===== */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.product__media img { border-radius: var(--radius); box-shadow: var(--shadow-card); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.06em; }
.product__price { font-size: 1.4rem; font-weight: 700; color: var(--plum-dark); }
.product__highlights { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.product__highlights li { padding-left: 1.6rem; position: relative; }
.product__highlights li::before { content: "✦"; position: absolute; left: 0; color: var(--red); }
.product__actions { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.qty-input { width: 72px; padding: 0.6rem; border: 2px solid var(--plum-dark); border-radius: var(--radius); min-height: 44px; }
.link-back { font-weight: 700; color: var(--plum-dark); text-decoration: underline; }

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

/* ===== cart page ===== */
.cart-row {
  display: grid;
  grid-template-columns: 1fr 90px 100px 44px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linen-dark);
}
.cart-row__price { font-weight: 700; text-align: right; }
.cart-row__remove { background: none; border: none; color: var(--red); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.cart-summary { display: flex; justify-content: space-between; align-items: baseline; padding: 1.2rem 0; font-size: 1.2rem; font-weight: 700; border-top: 2px solid var(--plum-dark); }

@media (max-width: 640px) {
  .cart-row { grid-template-columns: 1fr 70px 44px; }
  .cart-row__price { display: none; }
}

/* ===== forms ===== */
.form { max-width: 640px; }
.form-grid { display: grid; gap: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 0.9rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--plum-dark);
  border-radius: var(--radius);
  background: var(--paper);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field--checkbox { display: flex; align-items: flex-start; gap: 0.6rem; }
.field--checkbox input { width: auto; accent-color: var(--red); margin-top: 0.3rem; }
.form-status { margin-top: 1rem; font-weight: 700; min-height: 1.3em; }
.form-status--ok { color: #2d6a3e; }
.form-status--error { color: var(--red); }

/* ===== cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 200;
  background: var(--plum-dark);
  color: var(--linen);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
  max-width: 760px;
  margin: 0 auto;
}
.cookie-banner p { margin: 0; flex: 1 1 260px; font-size: 0.92rem; }
.cookie-banner a { text-decoration: underline; color: var(--blush); }
.cookie-banner__actions { display: flex; gap: 0.7rem; }

/* ===== footer ===== */
.site-footer {
  background: var(--plum-dark);
  color: var(--linen);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer__about .logo__mark, .footer__about .logo__word { filter: brightness(0) invert(1); }
.footer__about p { color: var(--blush); font-size: 0.92rem; max-width: 26ch; }
.footer__heading { font-family: var(--font-body); font-weight: 700; color: var(--gold); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer__list { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__list a:hover { color: var(--gold); }
.footer__newsletter input { width: 100%; padding: 0.7rem 1rem; border-radius: var(--radius); border: 2px solid var(--blush); margin-bottom: 0.7rem; min-height: 44px; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(231,181,174,0.25);
  font-size: 0.85rem;
  color: var(--blush);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ===== generic page content ===== */
.page-hero { padding: 3rem 0 1rem; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }

.faq-item { border-bottom: 1px solid var(--linen-dark); padding: 1.2rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item summary .icon { transition: transform 0.25s var(--ease); color: var(--red); }
.faq-item p { margin-top: 0.8rem; color: #4a3b3d; }

.badge-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.badge-row svg { width: 72px; height: 72px; color: var(--red); }

.error-page { text-align: center; padding: 6rem 0; }
.error-page svg { width: 160px; height: 160px; margin: 0 auto 1.5rem; color: var(--red); }

.ornament-divider { display: flex; justify-content: center; margin: 0.5rem 0 2rem; color: var(--red); }
.ornament-divider svg { width: 180px; height: 20px; }
