/* ---------- Tokens ---------- */
:root {
  --cream: #f6f1e4;          /* page background */
  --beige: #e9dfc9;          /* soft accents */
  --sage: #c9d8b6;           /* header + footer (pastel green) */
  --sage-deep: #8fa77c;      /* hover / focus accents */
  --ink: #2b2a24;
  --muted: #6d6a5c;
  --card: rgba(255, 255, 255, 0.42);
  --card-border: rgba(120, 130, 95, 0.12);
  --radius: 16px;
  --shadow: 0 1px 8px rgba(80, 85, 55, 0.06);
  --gap: 1.25rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Pinyon Script", "Brush Script MT", cursive;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --pill-bg: rgba(75, 102, 66, 0.14);
  --pill-bg-hover: rgba(75, 102, 66, 0.26);
  --pill-ink: #34502d;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ---------- Language switching ----------
   Every text exists in lang="hu" and lang="en"; only the current one is shown. */
html[lang="hu"] [lang="en"],
html[lang="en"] [lang="hu"] { display: none !important; }

#fulszoveg {
  font-style: italic;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 15% 0%, #eef2dc 0%, rgba(238, 242, 220, 0) 55%),
    radial-gradient(ellipse at 100% 40%, #efe6d2 0%, rgba(239, 230, 210, 0) 55%),
    var(--cream);
  background-attachment: fixed;
  line-height: 1.5;
}

body.is-loading { overflow: hidden; }

a { color: inherit; }

/* ---------- Loader (handwriting intro) ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, #e3ecd3 0%, rgba(227, 236, 211, 0) 70%),
    var(--sage);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  padding: 0 1rem;
  text-align: center;
}

.loader-ink {
  --p: 0%;                                   /* az írás állása, a JS léptegeti */
  display: inline-block;
  padding: 0.3em 0.4em;
  font-family: var(--script);
  font-size: clamp(2.6rem, 8.5vw, 4.75rem);
  line-height: 1.1;
  color: #25301f;
  letter-spacing: 0.01em;
  white-space: nowrap;

  /* keskeny, a betűk dőlésével egyező élű maszk: a felirat finoman "íródik ki" */
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--p) - 5%), transparent var(--p));
          mask-image: linear-gradient(100deg, #000 calc(var(--p) - 5%), transparent var(--p));
}

.loader.is-static .loader-ink {
  -webkit-mask-image: none;
          mask-image: none;
}

/* alcím: vékony, talpas, csupa nagybetű */
.loader-sub {
  margin-top: 0.1rem;
  font-family: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  font-weight: 300;
  font-size: clamp(0.66rem, 2.3vw, 1rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;                       /* a betűköz miatt középre igazítva */
  text-transform: uppercase;
  color: #3a4631;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.2s ease, transform 1.2s var(--ease), letter-spacing 1.6s var(--ease);
}

.loader.is-subtitle .loader-sub {
  opacity: 1;
  transform: none;
  letter-spacing: 0.3em;
}

/* ---------- Logo ---------- */
.logo {
  font-family: var(--script);
  font-size: 3.4rem;
  line-height: 1;
  text-decoration: none;
  color: #25301f;
  letter-spacing: 0.01em;
}

/* ---------- Header ---------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2.5vw, 1.6rem);
}

.leaf {
  display: block;
  height: 3.4rem;
  width: auto;
  flex: none;
}

/* right leaf is the mirror image of the left one, so the two form a wreath */
.leaf-right { transform: scaleX(-1); }

.site-header {
  position: relative;
  background: var(--sage);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.6rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* language button: same soft green pill as the footer headings */
.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 2;
  appearance: none;
  border: 0;
  padding: 0.3rem 0.8rem;
  background: var(--pill-bg);
  color: var(--pill-ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: var(--pill-bg-hover);
  outline: none;
}

/* ---------- Intro ---------- */
.intro {
  padding: 3.5rem 2rem 0;
}

.intro-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.6rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.intro-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- Product cards ---------- */
.products {
  padding: 3.5rem 2rem 6rem;
}

.grid {
  --cols: 5;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  align-items: stretch;
}

.card {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.card-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.card .preview {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more {
  margin-top: auto;
  align-self: flex-start;
  appearance: none;
  background: none;
  border: 0;
  padding: 0 0 2px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.more:hover,
.more:focus-visible {
  border-bottom-color: currentColor;
  outline: none;
}

/* ---------- Textures (pure CSS, no image files needed) ---------- */

/* light green speckle */
.tex-speckle {
  background-color: #dfeac6;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.60  0 0 0 0 0.70  0 0 0 0 0.42  0 0 0 0.9 -0.28'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(circle at 30% 20%, #eef3d8 0%, #d3e0b5 100%);
}

/* beige / cream / sage halftone burst */
.tex-burst {
  background-color: #cdbf9f;
  background-image:
    radial-gradient(circle, rgba(190, 172, 135, 0.9) 1px, transparent 1.6px),
    radial-gradient(circle at 50% 52%,
      #dfe9c0 0%,
      #dfe9c0 36%,
      #efe4cb 58%,
      #d9cba9 76%,
      #c7b790 100%);
  background-size: 5px 5px, 100% 100%;
}

/* sage sweep */
.tex-teal {
  background-image:
    radial-gradient(ellipse at 100% 0%, #f6e9d3 0%, rgba(246, 233, 211, 0) 40%),
    radial-gradient(ellipse at 10% 90%, #e5e9bd 0%, rgba(229, 233, 189, 0) 50%),
    linear-gradient(115deg, #b9cba3 0%, #9bb98f 35%, #86ad98 65%, #8db8a2 100%);
}

/* ---------- Overlay + modal ---------- */
body.modal-open { overflow: hidden; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(60, 64, 45, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay[hidden] { display: none; }
.overlay.open { opacity: 1; }

.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(880px, 92vw);
  height: fit-content;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fbf8ef;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(50, 55, 30, 0.28);
  overflow: hidden;
  transform-origin: top left;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}

.modal-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.overlay.open .modal-scroll {
  opacity: 1;
  transition: opacity 0.35s ease 0.18s;
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 248, 239, 0.88);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #fff;
  transform: scale(1.06);
  outline: none;
}

.modal-close svg { width: 18px; height: 18px; }

/* gallery */
.gallery {
  position: relative;
  background: var(--beige);
}

.stage {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  touch-action: pan-y;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.slide.is-active { opacity: 1; }

.nav-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 248, 239, 0.85);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-btn:hover,
.nav-btn:focus-visible { background: #fff; outline: none; }
.nav-btn svg { width: 18px; height: 18px; }
.nav-prev { left: 0.9rem; }
.nav-next { right: 0.9rem; }

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dot.is-active { background: #fff; transform: scale(1.3); }

.gallery.single .nav-btn,
.gallery.single .dots { display: none; }

/* modal text */
.modal-body {
  padding: 1.75rem 2rem 2.25rem;
}

.modal-body h2 {
  margin: 0 0 0.7rem;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.modal-body p,
.modal-body dt,
.modal-body dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.modal-body h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.modal-body dl { margin: 0; }
.modal-body dt { display: inline; font-weight: 700; }
.modal-body dd { display: inline; }
.modal-body dd::after { content: ""; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sage);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  column-gap: 5rem;
  align-items: start;
}

/* brand block is as wide as its content, so the title (with leaves) sits centred over the text below */
.footer-brand {
  width: fit-content;
  text-align: center;
}

.footer-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 0.35rem;
}

.footer-title .leaf { height: 1.9rem; }  /* same height as the footer title's font size */

.logo-footer {
  display: block;
  font-size: 1.9rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.72rem;
}

/* footer columns: plain lists, only the two headings get a soft highlight */
.footer-col h3 {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.25rem 0.7rem;
  background: var(--pill-bg);
  color: var(--pill-ink);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.72rem;
  color: #3d3d3d;
}

.footer-col li + li { margin-top: 0.7rem; }

/* ---------- Medium screens: 3 per row ---------- */
@media (max-width: 1099px) {
  .grid { --cols: 3; }
  .footer-inner { column-gap: 3rem; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .intro { padding: 2.75rem 1.5rem 0; }
  .products { padding: 2.75rem 1.5rem 4rem; }
  .modal-body { padding: 1.5rem 1.5rem 2rem; }
}

/* ---------- Mobile: 1 per row ---------- */
@media (max-width: 699px) {
  .grid { --cols: 1; }
  .logo { font-size: 2.8rem; }
  .leaf { height: 2.4rem; }
  .lang-toggle { top: 0.75rem; right: 1rem; }
  .header-inner { padding: 2.9rem 1.5rem 1.2rem; }   /* room for the language button */
  .intro { padding: 2rem 1.25rem 0; }
  .intro-card { padding: 1.25rem 1.25rem; }
  .products { padding: 2rem 1.25rem 3rem; }
  .card-img { aspect-ratio: 16 / 10; }
  .modal { width: 94vw; border-radius: 16px; }
  .modal-body h2 { font-size: 1.35rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    row-gap: 1.75rem;
    padding: 2rem 1.5rem 3rem;
  }
  .footer-brand p { margin-top: 0.15rem; }
  .footer-title .leaf { height: 2.4rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .overlay,
  .modal,
  .modal-scroll,
  .slide { transition-duration: 0.01s !important; transition-delay: 0s !important; }

  .loader-ink {
    -webkit-mask-image: none;
            mask-image: none;
    animation: none !important;
  }
}
