/* ============================================================
   Wax Art Studio — print-shop / studio-ledger look
   Warm paper, ink lines, sealing-wax red. No gradients, no glow.
   ============================================================ */

:root {
  --paper: #f6efdf;
  --paper-2: #efe6d0;
  --ink: #211d16;
  --red: #b23a23;
  --honey: #c9862d;
  --faded: #75695a;
  --rule: rgba(33, 29, 22, 0.8);
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 480;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); font-variation-settings: "opsz" 100; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-variation-settings: "opsz" 72; }
h1 em, h2 em { font-style: italic; color: var(--red); font-weight: 440; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faded);
}

/* ---------- Links & buttons ---------- */

.textlink {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.textlink:hover { color: var(--red); }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

.btn-red { background: var(--red); color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); }

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  padding: 1.3rem clamp(1.2rem, 4vw, 3rem) 1rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.wordmark-flame { color: var(--red); }

.top-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.top-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-wa { color: var(--red); font-weight: 500; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.hero-copy h1 { margin: 1.1rem 0 1.4rem; max-width: 14em; }

.underlined { position: relative; font-style: italic; color: var(--red); white-space: nowrap; }
.scrawl {
  position: absolute;
  left: 0; right: 0; bottom: -0.12em;
  width: 100%; height: 0.18em;
}
.scrawl path {
  stroke: var(--red);
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: scrawl 0.9s ease-out 0.5s forwards;
}
@keyframes scrawl { to { stroke-dashoffset: 0; } }

.hero-note { max-width: 34em; font-size: 1.06rem; color: #3d372c; }

.hero-actions {
  margin-top: 1.9rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* framed illustration */
.hero-frame { justify-self: center; width: min(100%, 380px); }
.frame-inner {
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper-2);
  box-shadow: 7px 7px 0 rgba(33, 29, 22, 0.16);
  transform: rotate(1.6deg);
  overflow: hidden;
  position: relative;
}
.frame-inner video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.frame-inner.has-video video { display: block; }
.frame-inner.has-video .candle-art { visibility: hidden; }
.candle-art { width: 100%; height: auto; }
.frame-caption { text-align: center; margin-top: 0.9rem; transform: rotate(1.6deg); }

/* candle animation */
.flame-g { transform-origin: 200px 130px; animation: flick 2.8s ease-in-out infinite; }
@keyframes flick {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-2.4deg) scale(1.04, 0.97); }
  60% { transform: rotate(2deg) scale(0.97, 1.05); }
  80% { transform: rotate(-1deg) scale(1.02, 0.99); }
}
.rays line { animation: rays 2.8s ease-in-out infinite; }
@keyframes rays { 50% { opacity: 0.25; } }
.drip { animation: drip 6s ease-in-out infinite; }
.drip-2 { animation-delay: -3s; }
@keyframes drip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ---------- Section furniture ---------- */

.section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.rule-no, .rule-name {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rule-name { color: var(--red); }
.rule-line { flex: 1; border-top: 1px solid var(--rule); }

.section-intro { max-width: 560px; margin-bottom: 2.6rem; }
.section-intro p { margin-top: 0.9rem; color: #3d372c; }

/* ---------- Price-list menu ---------- */

.menu { list-style: none; max-width: 860px; }

.menu-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 0.6rem;
  border-bottom: 1px solid rgba(33, 29, 22, 0.25);
  transition: background 0.2s;
}
.menu-row:first-child { border-top: 1px solid rgba(33, 29, 22, 0.25); }
.menu-row:hover { background: var(--paper-2); }

.menu-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faded);
  min-width: 2em;
}
.menu-thumb {
  width: 58px; height: 58px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--paper-2);
}
.menu-main { flex: 1; min-width: 0; }
.menu-name { font-size: 1.18rem; font-weight: 500; }
.menu-desc { font-size: 0.88rem; color: var(--faded); font-style: italic; }
.menu-dots {
  flex: 1;
  border-bottom: 2px dotted rgba(33, 29, 22, 0.4);
  align-self: flex-end;
  margin-bottom: 1.2em;
  min-width: 30px;
}
.menu-price {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.menu-order {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.menu-order:hover { color: var(--ink); }

.menu-more { margin-top: 1.8rem; }

/* ---------- Custom ---------- */

.custom-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.custom-copy > p { margin: 1rem 0 1.6rem; max-width: 36em; color: #3d372c; }

.how {
  list-style: none;
  counter-reset: how;
  margin-bottom: 2rem;
  display: grid;
  gap: 0.9rem;
  max-width: 34em;
}
.how li {
  counter-increment: how;
  padding-left: 2.4rem;
  position: relative;
}
.how li::before {
  content: counter(how) ".";
  position: absolute;
  left: 0; top: 0;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--red);
}

.custom-seal { justify-self: center; text-align: center; }
.seal {
  width: min(60vw, 210px);
  transform: rotate(-8deg);
  filter: drop-shadow(4px 5px 0 rgba(33, 29, 22, 0.18));
}
.seal.stamped { animation: stamp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes stamp {
  0% { transform: rotate(-8deg) scale(1.35); opacity: 0; }
  60% { transform: rotate(-8deg) scale(0.96); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); }
}
.seal-caption { margin-top: 1rem; }

/* ---------- About ---------- */

.about-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.about-big {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  font-style: italic;
  max-width: 24em;
}
.facts { list-style: none; display: grid; gap: 1.1rem; align-content: center; }
.facts li {
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  font-size: 0.98rem;
}
.facts .mono-label { display: block; margin-bottom: 0.1rem; }

/* ---------- Contact ---------- */

.contact-big { max-width: 14em; }
.contact-row {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding: 2.2rem clamp(1.2rem, 4vw, 3rem) 2.6rem;
  overflow: hidden;
}
.foot-giant {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}
.foot-giant text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 108px;
  fill: none;
  stroke: rgba(33, 29, 22, 0.55);
  stroke-width: 1.4;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  font-size: 0.85rem;
  color: var(--faded);
}
.foot-row nav { display: flex; gap: 1.4rem; }
.foot-row a {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
}
.foot-row a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Catalog page ---------- */

.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 3rem) 0;
  max-width: 1200px;
  margin: 0 auto;
}
.page-head h1 { max-width: 12em; margin-top: 1rem; }
.page-head .section-intro { margin-top: 1rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin: 2.2rem 0 2.6rem;
}
.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faded);
  padding: 0.4rem 0.1rem;
  border-bottom: 3px solid transparent;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: var(--ink); border-bottom-color: var(--red); }

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.2rem 1.8rem;
}

.pcard { text-decoration: none; }
.pcard-frame {
  border: 2px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 5px 5px 0 rgba(33, 29, 22, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pcard:nth-child(odd) .pcard-frame { transform: rotate(-0.8deg); }
.pcard:nth-child(even) .pcard-frame { transform: rotate(0.7deg); }
.pcard:hover .pcard-frame {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(33, 29, 22, 0.18);
}
.pcard-frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.pcard-info { padding: 0.9rem 0.2rem 0; }
.pcard-cat { color: var(--red); }
.pcard-name { font-size: 1.22rem; font-weight: 500; margin: 0.15rem 0; }
.pcard-desc { font-size: 0.88rem; color: var(--faded); font-style: italic; }
.pcard-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.55rem;
}
.pcard-price { font-family: var(--mono); font-weight: 500; }

.catalog-note {
  margin-top: 3rem;
  font-size: 0.92rem;
  color: var(--faded);
  max-width: 34em;
}
.catalog-note a { color: var(--red); }

/* ---------- Reveal (subtle) ---------- */

.fade { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-frame { width: min(100%, 320px); }
  .custom-grid, .about-row { grid-template-columns: 1fr; }
  .custom-seal { order: -1; }
  .menu-desc { display: none; }
  .menu-dots { display: none; }
  .menu-main { flex: 1 1 auto; }
}

@media (max-width: 540px) {
  .menu-row { flex-wrap: wrap; gap: 0.6rem 0.9rem; }
  .menu-num { display: none; }
  .menu-main { flex-basis: calc(100% - 75px); }
  .menu-price { margin-left: auto; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame-g, .rays line, .drip, .seal.stamped { animation: none; }
  .scrawl path { animation: none; stroke-dashoffset: 0; }
  .fade { transition: none; opacity: 1; transform: none; }
}
