/* ===== Sýrárna Na Statku — stylesheet ===== */

:root{
  --red: #b4362a;
  --red-dark: #8a2a21;
  --navy: #1e2a3c;
  --navy-light: #2c3c54;
  --cream: #f6ecd8;
  --cream-deep: #eee0c3;
  --paper: #fbf5e8;
  --ink: #2a2420;
  --gold: #c08a2e;
  --line: rgba(30,42,60,.18);
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(30,20,10,.35);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", ui-monospace, monospace;
  --dur: .5s;
}

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

*{ box-sizing: border-box; }
html,body{ overflow-x: clip; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3,h4{ font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; color: var(--navy); }
p{ margin: 0 0 1em; }
ul{ margin: 0; padding: 0; }
.container{ width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow{ width: min(760px, 100% - 2.5rem); margin-inline: auto; }

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

/* ===== Buttons ===== */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  min-height: 44px;
  transition: color .3s ease, border-color .3s ease, transform .15s ease;
}
.btn::before{
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  width: 100%;
  background: var(--red);
  z-index: -1;
  transition: left .35s ease;
}
.btn:hover::before, .btn:focus-visible::before{ left: 0; }
.btn:hover, .btn:focus-visible{ border-color: var(--red); transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-outline{
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline::before{ background: var(--navy); }
.btn-outline:hover{ color: var(--cream); }
.btn-small{ padding: .55em 1.1em; font-size: .85rem; }
.btn[disabled]{ opacity: .55; cursor: not-allowed; }
.btn-block{ width: 100%; }

/* ===== Icon sprite ===== */
.icon{ width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
.icon-sm{ width: 18px; height: 18px; }
.icon-lg{ width: 34px; height: 34px; }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 60;
  background: var(--cream);
  border-bottom: 3px solid var(--navy);
}
.site-header .container{
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 0;
}
.logo{ display: flex; align-items: center; gap: .6rem; color: var(--navy); }
.logo svg.mark{ width: 46px; height: 46px; flex-shrink: 0; }
.logo svg.word{ height: 24px; width: 182px; }
.logo .tagline{ display:none; }

.main-nav{ display: flex; align-items: center; gap: 1.6rem; }
.main-nav ul{ display: flex; gap: 1.4rem; list-style: none; flex-wrap: wrap; }
.main-nav a{
  font-weight: 600; font-size: .95rem; color: var(--navy);
  position: relative; padding: .2rem 0;
}
.main-nav a::after{
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current]::after{ transform: scaleX(1); }

.header-actions{ display: flex; align-items: center; gap: .9rem; }
.cart-link{ position: relative; display: inline-flex; padding: .4rem; color: var(--navy); }
.cart-count{
  position: absolute; top: -4px; right: -6px;
  background: var(--red); color: #fff; font-size: .68rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.cart-count.bump{ animation: bump .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes bump{ 0%{transform:scale(1);} 40%{transform:scale(1.5);} 100%{transform:scale(1);} }

.menu-toggle{
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--navy);
  background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle .icon{ stroke: var(--navy); }

@media (max-width: 860px){
  .main-nav{
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); height: 100vh;
    background: var(--navy); color: var(--cream); flex-direction: column; align-items: flex-start;
    padding: 5.5rem 1.6rem 2rem; gap: 2rem; z-index: 80;
    transform: translateX(100%); visibility: hidden;
    transition: transform .35s ease, visibility .35s ease;
  }
  .main-nav.open{ transform: translateX(0); visibility: visible; }
  .main-nav ul{ flex-direction: column; gap: 1.1rem; }
  .main-nav a{ color: var(--cream); font-size: 1.1rem; }
  .menu-toggle{ display: inline-flex; }
}
.nav-scrim{
  position: fixed; inset: 0; background: rgba(20,15,10,.45); z-index: 70;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.nav-scrim.open{ opacity: 1; visibility: visible; }

/* ===== Folk ornament strip ===== */
.ornament-strip{ width: 100%; height: 14px; display: block; color: var(--red); }
.ornament-strip.navy{ color: var(--navy); }
.ornament-strip.flip{ transform: scaleY(-1); }

/* ===== Hero ===== */
.hero{
  position: relative;
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
  padding: 3.5rem 0 4.5rem;
}
.hero .container{ position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; }
.hero h1{
  color: var(--cream);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: .4rem;
}
.hero .lede{ font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 34ch; color: var(--cream-deep); }
.hero-actions{ display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero .btn-outline{ color: var(--cream); border-color: var(--cream); }
.hero .btn-outline::before{ background: var(--cream); }
.hero .btn-outline:hover{ color: var(--navy); }
.hero-art{ position: relative; aspect-ratio: 1/1; max-width: 480px; margin-inline: auto; }
.hero-art svg.scene{ width: 100%; height: 100%; }
.badge-rotor{
  position: absolute; top: -6%; right: -6%; width: 34%; aspect-ratio: 1/1;
  animation: spin 26s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.hero::after{
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ===== Reveal ===== */
.reveal{ opacity: 1; }
.reveal.js-hidden{ opacity: 0; transform: translateY(26px); }
.reveal.in-view{ opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), clip-path .7s ease; }
.reveal.js-hidden{ transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

/* ===== Section basics ===== */
.section{ padding: 4.5rem 0; }
.section-head{ max-width: 56ch; margin-bottom: 2.2rem; }
.section-head .kicker{
  display: inline-block; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  font-size: .78rem; color: var(--red); font-weight: 700; margin-bottom: .6rem;
}
.section.cream{ background: var(--cream); }
.section.navy{ background: var(--navy); color: var(--cream-deep); }
.section.navy h2, .section.navy h3{ color: var(--cream); }
.section.navy .kicker{ color: var(--gold); }

/* ===== Accordion (home composition) ===== */
.accordion{ display: flex; flex-direction: column; border-top: 2px solid var(--line); }
.acc-item{ border-bottom: 2px solid var(--line); }
.acc-head{
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 1.4rem .2rem; font-family: var(--font-display); font-size: clamp(1.3rem,3vw,2rem);
  color: var(--navy);
}
.acc-head .num{ font-family: var(--font-mono); font-size: .9rem; color: var(--red); margin-right: .9rem; }
.acc-plus{ width: 30px; height: 30px; flex-shrink: 0; position: relative; }
.acc-plus::before, .acc-plus::after{
  content: ""; position: absolute; background: var(--navy); transition: transform .3s ease, background .3s ease;
}
.acc-plus::before{ left: 0; top: 50%; width: 100%; height: 3px; transform: translateY(-50%); }
.acc-plus::after{ top: 0; left: 50%; width: 3px; height: 100%; transform: translateX(-50%); }
.acc-item[data-open="true"] .acc-plus::after{ transform: translateX(-50%) rotate(90deg); opacity: 0; }
.acc-item[data-open="true"] .acc-head{ color: var(--red); }
.acc-item[data-open="true"] .acc-plus::before{ background: var(--red); }
.acc-panel{
  max-height: 0; overflow: hidden; transition: max-height .45s ease;
}
.acc-panel-inner{
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.8rem; align-items: center;
  padding: .4rem .2rem 2rem;
}
.acc-panel-inner img{ border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }
.acc-panel-inner .txt p:last-child{ margin-bottom: 0; }
@media (max-width: 720px){
  .acc-panel-inner{ grid-template-columns: 1fr; }
}

/* ===== Cards ===== */
.card{
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover{ transform: translateY(-5px); }
.card .thumb{ aspect-ratio: 4/3; overflow: hidden; position: relative; background: var(--cream-deep); }
.card .thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img{ transform: scale(1.08); }
.card .body{ padding: 1.1rem 1.2rem 1.4rem; }
.card h3{ font-size: 1.15rem; margin-bottom: .3rem; }
.card .price{ font-weight: 800; color: var(--red); font-size: 1.1rem; }
.card .unit{ font-size: .82rem; color: #6b6055; }

/* ===== Product grid / strip ===== */
.product-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 1.6rem; }
.product-strip{
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem;
  -webkit-overflow-scrolling: touch;
}
.product-strip .card{ scroll-snap-align: start; }
@media (min-width: 720px){
  .product-strip{ grid-auto-columns: 30%; }
}

/* ===== Badges / seals ===== */
.seal{ width: 120px; height: 120px; color: var(--red); }
.photo-frame{ position: relative; }
.seal-overlap{
  position: absolute; top: -24px; right: -18px; width: 108px; height: 108px; color: var(--gold);
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}
@media (max-width: 600px){ .seal-overlap{ width: 76px; height: 76px; top: -14px; right: -10px; } }
.tag-pill{
  display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700;
  padding: .3em .8em; border-radius: 999px; border: 1.5px solid var(--navy); color: var(--navy);
  background: var(--cream);
}

/* ===== Planner (signature feature) ===== */
.planner{
  background: var(--navy); color: var(--cream); border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 3rem); position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.planner-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; }
@media (max-width: 820px){ .planner-grid{ grid-template-columns: 1fr; } }
.planner h2, .planner h3{ color: var(--cream); }
.field-row{ margin-bottom: 1.3rem; }
.field-row label{ display: block; font-weight: 700; margin-bottom: .5rem; }
input[type="range"]{ width: 100%; accent-color: var(--red); }
.guest-readout{ font-family: var(--font-mono); color: var(--gold); font-weight: 700; }
.chip-group{ display: flex; flex-wrap: wrap; gap: .6rem; }
.chip{
  display: inline-flex; align-items: center; gap: .4rem; padding: .5em 1em; border-radius: 999px;
  border: 1.5px solid rgba(246,236,216,.5); background: transparent; color: var(--cream);
  cursor: pointer; font-weight: 600; font-size: .88rem; min-height: 40px;
  transition: background .25s ease, border-color .25s ease;
}
.chip input{ position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked){ background: var(--red); border-color: var(--red); }
.planner-result{ background: rgba(246,236,216,.08); border: 1.5px dashed rgba(246,236,216,.4); border-radius: var(--radius); padding: 1.3rem; }
.planner-result ul{ list-style: none; display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.planner-result li{ display: flex; justify-content: space-between; gap: .6rem; font-size: .92rem; border-bottom: 1px solid rgba(246,236,216,.15); padding-bottom: .5rem; }
.planner-total{ display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; color: var(--gold); }

/* ===== Footer ===== */
.site-footer{ background: var(--navy); color: var(--cream-deep); padding: 3.5rem 0 1.6rem; }
.footer-grid{ display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 2.2rem; }
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px){ .footer-grid{ grid-template-columns: 1fr; } }
.site-footer h4{ color: var(--cream); font-size: 1rem; margin-bottom: .9rem; font-family: var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul{ list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.site-footer a:hover{ color: var(--gold); }
.site-footer .logo{ color: var(--cream); }
.foot-bottom{ border-top: 1px solid rgba(246,236,216,.2); margin-top: 2.6rem; padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.newsletter-form{ display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input[type="email"]{ flex: 1; min-width: 160px; }
input, textarea, select{
  font-family: var(--font-body); font-size: .95rem; padding: .75em .9em; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); min-height: 44px;
}
.site-footer input{ background: rgba(246,236,216,.08); border-color: rgba(246,236,216,.35); color: var(--cream); }
.site-footer input::placeholder{ color: rgba(246,236,216,.6); }
textarea{ min-height: 120px; resize: vertical; }
.form-msg{ font-size: .9rem; margin-top: .6rem; min-height: 1.2em; }
.form-msg.ok{ color: #3f9d58; }
.site-footer .form-msg.ok{ color: #8fe2a6; }
.form-msg.err{ color: #e05a4a; }

/* ===== Forms (contact/checkout) ===== */
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px){ .form-grid{ grid-template-columns: 1fr; } }
.form-grid .full{ grid-column: 1 / -1; }
label{ display: block; font-weight: 700; font-size: .88rem; margin-bottom: .35rem; }
.field{ margin-bottom: 0; }
.hp-field{ position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== Cookie banner ===== */
.cookie-banner{
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; margin-inline: auto;
  background: var(--navy); color: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem; z-index: 100; display: flex; flex-direction: column; gap: 1rem;
  transform: translateY(140%); transition: transform .4s ease;
}
.cookie-banner.show{ transform: translateY(0); }
.cookie-banner p{ margin: 0; font-size: .9rem; color: var(--cream-deep); }
.cookie-actions{ display: flex; gap: .8rem; flex-wrap: wrap; }
.cookie-actions .btn-outline{ color: var(--cream); border-color: var(--cream); }
.cookie-actions .btn-outline::before{ background: var(--cream); }
.cookie-actions .btn-outline:hover{ color: var(--navy); }

/* ===== Page header (non-home) ===== */
.page-hero{
  background:
    linear-gradient(100deg, var(--cream-deep) 46%, rgba(238,224,195,.4) 62%, rgba(238,224,195,0) 100%),
    url("../img/hero-dairy.jpg") right center / 46% auto no-repeat, var(--cream-deep);
  padding: 3rem 0 2.4rem; border-bottom: 3px solid var(--navy);
  position: relative; overflow: hidden;
}
.page-hero h1{ font-size: clamp(2.1rem, 5vw, 3.2rem); }
@media (max-width: 700px){ .page-hero{ background: var(--cream-deep); } }
.breadcrumb{ font-size: .85rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; display: block; }

/* ===== Divider ===== */
.divider{ width: 100%; height: 40px; color: var(--red); display: block; }

/* ===== Table (FAQ / legal) ===== */
.faq-item{ border-bottom: 2px solid var(--line); padding: 1.1rem 0; }
.faq-item summary{ cursor: pointer; font-weight: 700; font-size: 1.05rem; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{ content: "+"; font-size: 1.4rem; color: var(--red); line-height: 1; }
.faq-item[open] summary::after{ content: "–"; }
.faq-item p{ margin-top: .8rem; color: #4b4238; }

.legal p, .legal li{ color: #4b4238; }
.legal ul{ list-style: disc; padding-left: 1.4rem; margin-bottom: 1em; }
.legal h2{ margin-top: 1.8em; font-size: 1.4rem; }

/* ===== Cart page ===== */
.cart-table{ width: 100%; border-collapse: collapse; }
.cart-table th{ text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #6b6055; padding-bottom: .6rem; border-bottom: 2px solid var(--line); }
.cart-table td{ padding: .9rem 0; border-bottom: 1.5px solid var(--line); vertical-align: middle; }
.cart-line{ display: flex; align-items: center; gap: .8rem; }
.cart-line img{ width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.qty-ctrl{ display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-ctrl button{ width: 32px; height: 32px; border: none; background: var(--cream); cursor: pointer; font-size: 1rem; }
.qty-ctrl span{ width: 32px; text-align: center; font-weight: 700; }
.remove-btn{ color: var(--red); font-weight: 700; font-size: .85rem; background: none; border: none; cursor: pointer; padding: .4rem; }
.cart-summary{ background: var(--cream); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.cart-summary .row{ display: flex; justify-content: space-between; padding: .5rem 0; }
.cart-summary .total{ font-weight: 800; font-size: 1.3rem; border-top: 2px solid var(--line); margin-top: .6rem; padding-top: .9rem; }
.empty-cart{ text-align: center; padding: 3rem 0; }

/* ===== Product detail ===== */
.product-detail{ display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; }
@media (max-width: 760px){ .product-detail{ grid-template-columns: 1fr; } }
.product-detail .thumb{ border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.product-detail .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.qty-select{ display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0; }

/* ===== 404 ===== */
.notfound{ text-align: center; padding: 6rem 0; }
.notfound svg{ width: 180px; height: 180px; margin: 0 auto 1.5rem; color: var(--red); }

/* ===== misc ===== */
.center{ text-align: center; }
.mt-2{ margin-top: 2rem; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.muted{ color: #6b6055; }
.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
@media (max-width: 760px){ .grid-2{ grid-template-columns: 1fr; } }
