/* Sport Triglav - scrapbook design system */
:root {
  --pine: #1f3d2e;
  --pine-dark: #142920;
  --berry: #b23a3a;
  --berry-dark: #8c2b2b;
  --snow: #f6f1e4;
  --paper: #fffdf7;
  --ink: #241f17;
  --tape: #e7c766;
  --line: #d8cfb8;
  --radius: 10px;
  --shadow-paper: 0 6px 18px rgba(20, 20, 10, 0.18), 0 1px 0 rgba(0,0,0,0.05);
  --font-display: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --maxw: 1180px;
}

html, body { overflow-x: clip; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--berry-dark); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--snow); padding: 8px 12px; z-index: 200; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--pine);
  color: var(--snow);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--snow); }
.brand__mark { flex-shrink: 0; }
.brand__word { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.05; }
.brand__word em { font-style: normal; color: var(--tape); display: block; font-size: 1.3rem; }
.nav__list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav__list a { color: var(--snow); opacity: 0.9; position: relative; padding: 4px 0; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--tape); transition: width 0.25s ease;
}
.nav__list a:hover::after, .nav__list a.is-active::after { width: 100%; }
.nav__list a.is-active { opacity: 1; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; color: var(--snow); display: inline-flex; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--berry); color: #fff;
  font-size: 0.68rem; min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cart-count.bump { animation: bump 0.4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.nav-toggle { display: none; background: none; border: 0; color: var(--snow); cursor: pointer; padding: 4px; }
.nav-toggle .icon-close { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-toggle .icon-close { display: none; }
  body.nav-open .nav-toggle .icon-open { display: none; }
  body.nav-open .nav-toggle .icon-close { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); top: 0; height: 100vh;
    background: var(--pine-dark); padding: 90px 24px; z-index: 99;
    transform: translateX(100%); visibility: hidden; transition: transform 0.3s ease, visibility 0.3s;
  }
  body.nav-open .nav { transform: translateX(0); visibility: visible; }
  .nav__list { flex-direction: column; gap: 20px; font-size: 1.1rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--berry); color: #fff; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate; min-height: 44px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--pine); z-index: -1; transition: left 0.3s ease;
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: var(--snow); }
.btn--ghost { background: transparent; color: var(--snow); border-color: var(--snow); }
.btn--ghost::before { background: var(--snow); }
.btn--ghost:hover { color: var(--ink); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; min-height: 38px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-30px); }
.reveal--left.in-view { transform: none; }
.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  background: var(--pine); color: var(--snow); padding: 64px 20px 56px;
  position: relative; overflow: hidden;
}
.page-hero__inner { max-width: var(--maxw); margin: 0 auto; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--snow); }
.page-hero p { max-width: 560px; opacity: 0.9; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { list-style: none; display: flex; gap: 8px; padding: 14px 20px; margin: 0; max-width: var(--maxw); margin-inline: auto; font-size: 0.85rem; color: var(--ink); opacity: 0.75; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: 0.6; }

/* ---------- containers/grid utilities ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.mt-lg { margin-top: 48px; }
.center { text-align: center; }

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 80px; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; color: var(--pine); }
.prose h3 { margin-top: 1.4em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.legal-toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 32px; }
.legal-toc h2 { margin-top: 0; font-size: 1.05rem; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }

/* ---------- notice ---------- */
.notice { border-radius: var(--radius); padding: 16px 20px; border: 1px solid var(--line); background: var(--paper); margin: 20px 0; }
.notice--info { border-color: #9fbfd9; background: #eef5fb; }
.notice--warn { border-color: var(--tape); background: #fcf5df; }
.notice--success { border-color: #8fba9c; background: #ecf6ef; }

/* ---------- polaroid / scrapbook props ---------- */
.polaroid {
  background: var(--paper); padding: 10px 10px 36px; box-shadow: var(--shadow-paper);
  display: inline-block; transform: rotate(var(--rot, -2deg));
}
.polaroid img { aspect-ratio: 4/5; object-fit: cover; }
.polaroid figcaption { font-family: var(--font-hand); text-align: center; margin-top: 10px; color: var(--ink); font-size: 1.05rem; }
.washi {
  position: absolute; width: 90px; height: 26px; background: var(--tape); opacity: 0.85;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--berry); box-shadow: 0 2px 3px rgba(0,0,0,0.3); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.form-grid .field--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink); accent-color: var(--berry);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pine); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--berry); }
.field-error { color: var(--berry-dark); font-size: 0.82rem; min-height: 1em; }
.field-inline { display: flex; gap: 8px; }
.field-inline input { flex: 1; min-width: 0; }
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px; }
.form-msg { font-size: 0.9rem; min-height: 1.3em; }
.form-msg--ok { color: var(--pine); }
.form-msg--error { color: var(--berry-dark); }

/* ---------- product/cart/contact layouts ---------- */
.product-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-paper);
  display: flex; flex-direction: column; transition: transform 0.25s ease;
}
.product-card:hover { transform: translateY(-6px); }
.product-card__media { aspect-ratio: 4/3; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card__media img { transform: scale(1.08); }
.product-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__price { font-weight: 700; color: var(--berry-dark); }
.product-strip { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.product-strip .product-card { min-width: 220px; scroll-snap-align: start; }

.product-detail { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__price { font-size: 1.6rem; font-weight: 700; color: var(--berry-dark); }
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-control button { border: 0; background: var(--paper); width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; }
.qty-control input { width: 46px; text-align: center; border: 0; font: inherit; background: transparent; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-summary { background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-paper); }
.cart-summary dl { display: flex; justify-content: space-between; margin: 0 0 10px; }

.contact-layout { display: grid; gap: 40px; grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-info li { display: flex; align-items: center; gap: 10px; }

/* ---------- faq ---------- */
.faq { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 20px 18px; margin: 0; color: var(--ink); }

/* ---------- home: hero ---------- */
.hero {
  position: relative; padding: 70px 20px 100px; overflow: hidden;
  background: linear-gradient(180deg, var(--pine) 0%, var(--pine-dark) 100%);
  color: var(--snow);
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } }
.hero__title { font-size: clamp(2.4rem, 6.5vw, 4.4rem); color: var(--snow); margin-bottom: 0.3em; }
.hero__title .word { display: inline-block; opacity: 0; transform: translateY(40px); animation: word-rise 0.6s ease forwards; }
@keyframes word-rise { to { opacity: 1; transform: none; } }
.hero__lead { font-size: 1.15rem; max-width: 480px; opacity: 0.92; }
.hero__actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__art { position: relative; aspect-ratio: 1/1; }
.hero__grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.08; mix-blend-mode: overlay; pointer-events: none; z-index: 1; }
.hero__peak { position: absolute; bottom: -10%; right: -6%; width: 55%; opacity: 0.5; animation: drift 9s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- home: collage ---------- */
.collage { position: relative; padding: 90px 20px; }
.collage__inner { max-width: var(--maxw); margin: 0 auto; position: relative; min-height: 560px; }
.collage__photo { position: absolute; }
.collage__shape { position: absolute; z-index: 0; }
.collage__caption {
  position: absolute; background: var(--snow); padding: 10px 16px; font-family: var(--font-hand);
  font-size: 1.1rem; box-shadow: var(--shadow-paper); transform: rotate(-3deg); z-index: 3;
}
@media (max-width: 760px) {
  .collage__inner { min-height: 0; display: flex; flex-direction: column; gap: 60px; align-items: center; }
  .collage__photo, .collage__caption, .collage__shape { position: static; transform: none !important; }
}

/* ---------- feature section (signature) ---------- */
.feature {
  background: var(--paper); border-radius: 20px; padding: 48px; box-shadow: var(--shadow-paper);
  display: grid; gap: 36px; grid-template-columns: 1fr 1fr; position: relative;
}
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; padding: 32px 22px; } }
.feature__badge { display: inline-flex; align-items: center; gap: 8px; background: var(--tape); color: var(--ink); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; margin-bottom: 14px; }
.feature__result { background: var(--snow); border-radius: var(--radius); padding: 22px; margin-top: 18px; }
.feature__result dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.feature__result dt { font-weight: 700; color: var(--pine); }

/* ---------- divider ---------- */
.divider-tear { display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--pine-dark); color: var(--snow); position: relative; }
.site-footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px 40px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 32px;
}
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-col h3 { color: var(--tape); font-size: 1rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--snow); opacity: 0.85; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.handwritten { font-family: var(--font-hand); font-size: 1.1rem; opacity: 0.85; }
.footer-email { display: flex; align-items: center; gap: 8px; margin-top: 14px; opacity: 0.9; }
.site-footer__bottom { text-align: center; padding: 16px 20px 28px; opacity: 0.7; font-size: 0.85rem; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 150;
  background: var(--pine-dark); color: var(--snow); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-paper);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  max-width: 720px; margin: 0 auto;
}
.cookie-banner a { color: var(--tape); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; }

/* COMPONENTS: .page-hero - dark hero band for inner pages
COMPONENTS: .breadcrumbs - small top trail links
COMPONENTS: .container - max-width content wrapper
COMPONENTS: .section - vertical page section spacing
COMPONENTS: .grid / .grid--2/3/4 - responsive grid
COMPONENTS: .prose - readable long-form legal text column
COMPONENTS: .legal-toc - boxed table of contents for legal pages
COMPONENTS: .notice / .notice--info/warn/success - callout box
COMPONENTS: .polaroid - photo card with handwritten caption
COMPONENTS: .washi - decorative tape strip
COMPONENTS: .pin - decorative pin dot
COMPONENTS: .btn / .btn--outline/.btn--ghost/.btn--sm - button variants with fill sweep
COMPONENTS: .form-grid / .field / .field--wide / .field-error / .field--error - form layout
COMPONENTS: .field-inline - inline input+button row (newsletter)
COMPONENTS: .hp-field - hidden honeypot field
COMPONENTS: .form-msg / .form-msg--ok/.form-msg--error - inline form feedback
COMPONENTS: .product-grid / .product-card / .product-card__media/__body/__price - catalog cards
COMPONENTS: .product-strip - horizontal scroll-snap product row
COMPONENTS: .product-detail / .product-detail__price - product page layout
COMPONENTS: .qty-control - quantity stepper
COMPONENTS: .cart-table / .cart-summary - cart/checkout layout
COMPONENTS: .contact-layout / .contact-info - contact page split layout
COMPONENTS: .faq / .faq-item - details/summary accordion
COMPONENTS: .hero / .hero__title / .hero__lead / .hero__actions / .hero__art - home hero
COMPONENTS: .collage / .collage__photo/__shape/__caption - home asymmetric collage
COMPONENTS: .feature / .feature__badge / .feature__result - signature feature section
COMPONENTS: .site-header / .nav / .brand / .cart-link / .cart-count - header
COMPONENTS: .site-footer / .footer-col - footer
COMPONENTS: .cookie-banner - consent banner
COMPONENTS: .reveal / .reveal--left / .in-view / .stagger - scroll-reveal animation hooks
COMPONENTS: .stack-sm/.stack-md/.mt-lg/.center - spacing utilities */

/* Additional components for product and cart */
.product-badge {
  display: inline-block;
  background: var(--tape);
  color: var(--ink);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 0.5em;
}

.cart-qty {
  width: 80px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--berry-dark);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 4px 8px;
}

.cart-remove:hover {
  color: var(--berry);
}

/* ---------- footer newsletter ---------- */
.footer-brand {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 14px;
}

.footer-newsletter h3,
.footer-newsletter p {
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.newsletter-form input:not(.hp-field) {
  flex: 1;
}

@media (max-width: 560px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ---------- button variants ---------- */
.btn--sweep {
  /* left-to-right background sweep on hover/focus (inherited from .btn) */
}

/* ---------- feature section ---------- */
.feature-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (max-width: 760px) {
  .feature-section {
    gap: 28px;
  }
}

/* ---------- product detail components ---------- */
.product-detail__media {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-detail__body h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0;
}
