/* ============ Terrier Ízek — Berry Cottage Atelier design system ============ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
:root {
  --burgundy: #793D4C;
  --gold: #E5B675;
  --cream: #F8F1E4;
  --forest: #5A7354;
  --brown: #49382F;
  --rose: #E8C6CD;
  --white: #FFFFFF;
  --ink: var(--brown);
  --max: 1200px;
  --radius: 22px;
  --radius-sm: 12px;
  --font-display: Georgia, "Playfair Display", "Iowan Old Style", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-1: 0 10px 30px -12px rgba(73,56,47,.28);
  --shadow-2: 0 22px 50px -20px rgba(73,56,47,.35);
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.12; color: var(--brown); }
p { line-height: 1.65; margin: 0 0 1em; }
.icon { width: 22px; height: 22px; stroke: currentColor; }
.icon--sm { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--burgundy); color: #fff; padding: .6em 1em; z-index: 200; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; border-radius: 4px; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 110px) 0; position: relative; }
.grid { display: grid; gap: 28px; }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.mt-0{margin-top:0}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:1rem}.mb-2{margin-bottom:2rem}
.text-center{text-align:center}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px) clip-path 0; clip-path: inset(0 0 15% 0); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), clip-path .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
.reveal--1.in-view { transition-delay: .06s; }
.reveal--2.in-view { transition-delay: .14s; }
.reveal--3.in-view { transition-delay: .22s; }
.reveal--4.in-view { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  background: var(--brown); color: var(--cream); border-radius: var(--radius-sm);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 18px 22px; box-shadow: var(--shadow-2); max-width: 980px; margin: 0 auto;
}
.cookie-banner__text p { margin: .3em 0 0; font-size: .9rem; color: var(--rose); }
.cookie-banner__text a { text-decoration: underline; color: var(--cream); }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; position: relative; overflow: hidden; isolation: isolate;
  min-height: 44px;
}
.btn--primary { background: var(--burgundy); color: var(--white); }
.btn--secondary { background: transparent; border-color: var(--burgundy); color: var(--burgundy); }
.btn--ghost-dark { background: transparent; border-color: var(--rose); color: var(--cream); }
.btn--gold { background: var(--gold); color: var(--brown); }
.btn--sweep span { position: relative; z-index: 2; }
.btn--sweep::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--forest); transition: left .35s ease; z-index: 1;
}
.btn--sweep:hover::before { left: 0; }
.btn--sweep:hover { color: #fff; }
.btn--secondary:hover { background: var(--burgundy); color: #fff; }
.btn--ghost-dark:hover { background: rgba(248,241,228,.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 150; background: rgba(248,241,228,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid rgba(73,56,47,.08);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-1); }
.site-header__inner { max-width: var(--max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo__mark { width: 150px; height: 38px; }
.logo__mark--footer { width: 130px; height: 32px; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: .95rem; position: relative; padding: 6px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--burgundy); transition: width .3s ease; }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.main-nav a.is-active { color: var(--burgundy); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; color: var(--brown); display: inline-flex; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--burgundy); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cart-count--bump { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1)} 40%{transform:scale(1.4)} 100%{transform:scale(1)} }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--brown); min-width: 44px; min-height: 44px; }
.mobile-nav {
  position: fixed; top: 0; right: 0; width: min(320px, 85vw); height: 100vh; background: var(--brown);
  color: var(--cream); z-index: 250; padding: 80px 28px 28px; transform: translateX(100%);
  visibility: hidden; transition: transform .35s ease, visibility .35s ease;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; }
.mobile-nav a { font-size: 1.2rem; font-family: var(--font-display); }
.menu-toggle--close { position: absolute; top: 20px; right: 20px; color: var(--cream); }
@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(60px,10vw,120px) 0 clamp(40px,8vw,80px);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  background: linear-gradient(160deg, var(--cream) 0%, var(--rose) 120%);
}
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.hero__inner > * { min-width: 0; }
@media (max-width: 920px) { .hero__inner { grid-template-columns: 1fr; } }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; color: var(--forest); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); margin: .3em 0; }
.hero__sub { font-size: 1.1rem; max-width: 42ch; color: var(--brown); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }
.hero__art { position: relative; aspect-ratio: 1/1; }
.hero__art svg { width: 100%; height: 100%; }
.hero__art .draw-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.8s ease forwards; }
@media (prefers-reduced-motion: reduce) { .hero__art .draw-path { animation: none; stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grain-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .05; mix-blend-mode: multiply; }

/* ---------- section divider ---------- */
.divider { display: block; width: 100%; height: auto; }
.divider--flip { transform: scaleY(-1); }

/* ---------- product/content cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-1); transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--rose); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.08); }
.card__body { padding: 20px 22px 24px; }
.card__eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--forest); font-weight: 700; }
.card__title { font-size: 1.15rem; margin: .3em 0; }
.card__price { font-weight: 700; color: var(--burgundy); font-size: 1.05rem; }
.card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

.product-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.product-strip > * { scroll-snap-align: start; }
@media (min-width: 760px) { .product-strip { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

/* ---------- seasonal diagonal section ---------- */
.seasons { clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 96%); background: var(--forest); color: var(--cream); padding: clamp(60px,8vw,100px) 0; }
.seasons h2, .seasons p { color: var(--cream); }
.season-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 2em; }
.season-grid > * { min-width: 0; }
@media (max-width: 760px) { .season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.season-card { background: rgba(248,241,228,.08); border: 1px solid rgba(248,241,228,.25); border-radius: var(--radius-sm); padding: 22px 18px; text-align: left; }
.season-card svg { width: 38px; height: 38px; margin-bottom: 10px; }

/* ---------- about / founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.founder > * { min-width: 0; }
@media (max-width: 860px) { .founder { grid-template-columns: 1fr; } }
.founder__photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; box-shadow: var(--shadow-2); }
.founder__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 28px; border-left: 2px solid var(--gold); display: flex; flex-direction: column; gap: 32px; margin-top: 2em; }
.timeline__item { position: relative; }
.timeline__item::before { content: ""; position: absolute; left: -35px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--burgundy); border: 3px solid var(--cream); }
.timeline__year { font-family: var(--font-display); color: var(--burgundy); font-weight: 700; }

/* ---------- newsletter / forms ---------- */
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 999px; border: 1px solid rgba(248,241,228,.4); background: rgba(248,241,228,.08); color: var(--cream); }
.newsletter-form input::placeholder { color: rgba(248,241,228,.6); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { width: 100%; margin: 6px 0 0; font-size: .85rem; }
.form-msg--ok { color: var(--forest); }
.form-msg--error { color: #b23a3a; }

/* ---------- form grid (contact/checkout) ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .field--full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid rgba(73,56,47,.2);
  background: var(--white); font-family: var(--font-body); font-size: .95rem; accent-color: var(--burgundy);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--burgundy); }
.field-error { color: #b23a3a; font-size: .82rem; min-height: 1em; }
.field input:invalid[required]:not(:placeholder-shown) { border-color: #b23a3a; }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(145deg, var(--rose), var(--cream)); padding: clamp(60px,8vw,90px) 0 clamp(36px,6vw,56px);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.page-hero p { max-width: 60ch; font-size: 1.05rem; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--forest); flex-wrap: wrap; margin-bottom: 1em; }
.breadcrumbs a { text-decoration: underline; }
.breadcrumbs span[aria-hidden] { opacity: .6; }

/* ---------- notice ---------- */
.notice { border-radius: var(--radius-sm); padding: 16px 20px; border: 1.5px solid var(--gold); background: rgba(229,182,117,.15); font-size: .92rem; }
.notice--info { border-color: var(--forest); background: rgba(90,115,84,.1); }
.notice--warning { border-color: var(--burgundy); background: rgba(121,61,76,.08); }

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 74ch; margin: 0 auto; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; line-height: 1.7; }
.prose li { margin-bottom: .4em; }

/* ---------- legal TOC ---------- */
.legal-toc { background: var(--white); border-radius: var(--radius-sm); padding: 20px 24px; box-shadow: var(--shadow-1); margin-bottom: 2em; }
.legal-toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6em; }
.legal-toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }

/* ---------- faq ---------- */
.faq { max-width: 74ch; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border-radius: var(--radius-sm); padding: 4px 22px; box-shadow: var(--shadow-1); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--burgundy); transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; margin: 0; }

/* ---------- product detail ---------- */
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.product-detail > * { min-width: 0; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__gallery { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; box-shadow: var(--shadow-1); }
.product-detail__gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.6rem; color: var(--burgundy); font-weight: 700; }
.product-detail__meta { list-style: none; padding: 0; margin: 1.4em 0; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.product-detail__meta strong { color: var(--brown); }
.qty-input { display: inline-flex; align-items: center; border: 1.5px solid rgba(73,56,47,.2); border-radius: 999px; overflow: hidden; }
.qty-input button { background: none; border: none; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; }
.qty-input input { width: 46px; text-align: center; border: none; font-size: 1rem; }

/* ---------- cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid rgba(73,56,47,.12); }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-summary { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: .95rem; }
.cart-summary__row--total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid rgba(73,56,47,.15); padding-top: 10px; }
.checkout-steps { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 2em; font-size: .82rem; }
.checkout-steps li { background: var(--white); padding: 6px 14px; border-radius: 999px; }
.checkout-steps li[aria-current="step"] { background: var(--burgundy); color: #fff; }

/* ---------- contact layout ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.contact-layout > * { min-width: 0; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info__item { display: flex; gap: 12px; align-items: flex-start; }
.contact-info__item svg { flex-shrink: 0; color: var(--burgundy); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(80px,12vw,140px) 0; }
.error-page h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--burgundy); }

/* ---------- footer ---------- */
.site-footer { background: var(--brown); color: var(--cream); position: relative; clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%); padding-top: 60px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner { max-width: var(--max); margin: 0 auto; padding: 0 24px 40px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; }
.site-footer__inner > * { min-width: 0; }
@media (max-width: 920px) { .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-col h3 { color: var(--gold); font-size: .95rem; margin-bottom: .8em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.footer-col p { color: var(--rose); font-size: .88rem; }
.footer-legal-line { font-size: .78rem; opacity: .75; }
.footer-mail { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-size: .88rem; }
.site-footer__bottom { text-align: center; padding: 18px 0 28px; font-size: .8rem; color: var(--rose); border-top: 1px solid rgba(248,241,228,.12); margin-top: 20px; }

@media (max-width: 390px) {
  .wrap, .hero__inner, .site-header__inner, .site-footer__inner { padding-left: 16px; padding-right: 16px; }
}

/* COMPONENTS:
.wrap - centered max-width content container
.section - vertical page section spacing
.grid / .grid--2/3/4 - responsive CSS grid helpers
.reveal / .reveal--N / .in-view - scroll-reveal animation hooks
.cookie-banner - fixed bottom cookie consent banner
.btn / .btn--primary/secondary/ghost-dark/gold / .btn--sweep - button variants incl. fill-sweep hover
.site-header / .main-nav / .mobile-nav / .menu-toggle / .cart-link / .cart-count - header & nav
.hero / .hero__eyebrow/sub/actions/art - home hero with diagonal clip and SVG line-draw
.grain-overlay - feTurbulence grain texture overlay
.divider / .divider--flip - SVG wave/blob section dividers
.card / .card__media/body/eyebrow/title/price/footer - product/content card
.product-strip - horizontal scroll-snap strip on mobile, grid on desktop
.seasons / .season-grid / .season-card - diagonal seasonal section
.founder / .founder__photo - about/founder two-column layout
.timeline / .timeline__item/year - vertical history timeline
.newsletter-form / .hp-field / .form-msg - newsletter signup + spam honeypot + status message
.form-grid / .field / .field-error - generic form layout for contact/checkout
.page-hero - inner page hero banner with diagonal edge
.breadcrumbs - breadcrumb trail
.notice / .notice--info/warning - callout boxes for disclaimers
.prose - readable long-form legal/article text measure
.legal-toc - two-column table of contents box for legal pages
.faq / .faq-item - details/summary accordion
.product-detail / .product-detail__gallery/price/meta - product page layout
.qty-input - quantity stepper control
.cart-table / .cart-summary / .cart-summary__row - cart line items and totals
.checkout-steps - checkout step indicator
.contact-layout / .contact-info / .contact-info__item - contact page split layout
.error-page - 404 page layout
.site-footer / .footer-col / .footer-mail / .site-footer__bottom - footer
*/

/* ---------- footer grain, footer columns, logo ---------- */
.site-footer__grain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.06; mix-blend-mode: multiply; pointer-events: none;
}

.footer-col--brand {
  display: flex; flex-direction: column; gap: 8px;
}

.footer-col--newsletter {
  /* Inherits from base .footer-col */
}

.logo {
  display: inline-flex; align-items: center; line-height: 0;
}

.logo svg {
  width: 150px; height: 38px; display: block;
}
