/* Alpaka Farm Croatia — hand-rolled, no framework, self-hosted font.
   The identity comes from the farm's own materials: the hand-drawn ink logo
   (ink black + its brush-red "Croatia" underline) and undyed fleece — the
   22 natural wool shades appear as a woven band, the site's signature. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f7f4ed;          /* undyed fleece */
  --bg-raised: #fffdf8;
  --ink: #23201b;         /* the logo's drawing ink */
  --ink-soft: #6d6459;
  --accent: #b6271c;      /* the logo's brush-red underline */
  --accent-deep: #8c1c13;
  --line: #e5dfd2;
  --serif: 'Fraunces', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 72rem;
  /* 22 natural alpaca fleece shades, white → fawn → brown → grey → black */
  --wool: linear-gradient(90deg,
    #f5f1e8 0% 4.5%,  #efe8d9 4.5% 9%,   #e8dcc3 9% 13.6%,  #e0ceab 13.6% 18.2%,
    #d6bc90 18.2% 22.7%, #cbaa78 22.7% 27.3%, #bf9662 27.3% 31.8%, #b08350 31.8% 36.4%,
    #9e7143 36.4% 40.9%, #8b5f38 40.9% 45.5%, #78502f 45.5% 50%,  #654227 50% 54.5%,
    #533620 54.5% 59.1%, #422a1a 59.1% 63.6%, #322015 63.6% 68.2%, #241a12 68.2% 72.7%,
    #35312c 72.7% 77.3%, #4d4841 77.3% 81.8%, #6b655c 81.8% 86.4%, #8b857b 86.4% 90.9%,
    #aaa399 90.9% 95.5%, #c9c2b6 95.5% 100%);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 14px rgba(44, 35, 25, 0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 2.6rem; width: auto; }
.brand strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.site-nav { margin-left: auto; display: flex; gap: 0.25rem; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--line); }
.site-nav a[aria-current="page"] { color: #fff; background: var(--ink); }
.lang-menu { position: relative; margin-left: 0.5rem; }
.lang-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
  content: "";
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 4px;
}
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); background: var(--line); }
.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 60;
  list-style: none;
  min-width: 9.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(44, 35, 25, 0.14);
  padding: 0.35rem;
}
.lang-menu ul a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
}
.lang-menu ul a:hover { background: var(--line); }
.lang-menu ul a[aria-current="true"] { color: var(--accent); }
.lang-menu ul a[aria-current="true"]::after { content: " ✓"; }
@media (max-width: 36rem) {
  .site-header .wrap { flex-wrap: wrap; justify-content: center; padding-bottom: 0.4rem; }
  .lang-menu { margin-left: 0; }
  .brand img { height: 2rem; }
  .brand strong { font-size: 1rem; }
  .site-nav { margin-left: 0; width: 100%; justify-content: center; }
  .site-nav a { font-size: 0.9rem; padding: 0.3rem 0.7rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 44rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}
.hero img.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.05) 40%, rgba(20, 15, 10, 0.72) 100%);
}
.hero-inner { width: 100%; padding: 3.5rem 0 2.75rem; color: #fff; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero h1::after {
  /* the logo's brush-red underline, borrowed */
  content: "";
  display: block;
  width: 5.5rem;
  height: 0.3rem;
  margin-top: 0.7rem;
  background: var(--accent);
  border-radius: 999px;
  transform: rotate(-1.2deg);
}

/* signature: the 22 natural fleece shades, woven into a band */
.wool-band {
  height: 0.55rem;
  background: var(--wool);
}
.hero p {
  margin-top: 0.6rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 38rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.hero .cta {
  display: inline-block;
  margin-top: 1.3rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero .cta:hover { background: var(--accent-deep); transform: translateY(-1px); }

/* ---------- sections ---------- */

section { padding: 3.25rem 0; }
.section-head { max-width: 46rem; margin-bottom: 1.75rem; }
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.2;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 0.24rem;
  margin-top: 0.45rem;
  background: var(--accent);
  border-radius: 999px;
  transform: rotate(-1.2deg);
}
.section-head p { color: var(--ink-soft); margin-top: 0.4rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}
.stat {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
}
.stat strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--accent);
}
.stat span { color: var(--ink-soft); font-size: 0.95rem; }
.stat .wool-band {
  height: 0.45rem;
  border-radius: 999px;
  margin-top: 0.7rem;
}

/* ---------- home photo strip ---------- */

.strip-section { padding-top: 0; }
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.photo-strip a {
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--line);
}
.photo-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-strip a:hover img { transform: scale(1.04); }
@media (max-width: 40rem) {
  .photo-strip { gap: 0.5rem; }
  .photo-strip a { border-radius: 0.5rem; }
}

/* ---------- gallery ---------- */

.gallery { columns: 4 14rem; column-gap: 0.8rem; }
.gallery figure {
  break-inside: avoid;
  margin: 0 0 0.8rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--line);
  cursor: zoom-in;
}
.gallery img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease, opacity 0.4s ease;
  opacity: 0;
}
.gallery img.loaded { opacity: 1; }
.gallery figure:hover img { transform: scale(1.03); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 11, 7, 0.93);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(94vw, 100rem);
  max-height: 90vh;
  border-radius: 0.4rem;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- article (o alpakama / o nama) ---------- */

.page-title { padding: 3.2rem 0 0; }
.page-title h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.15;
}
.page-title h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.28rem;
  margin-top: 0.55rem;
  background: var(--accent);
  border-radius: 999px;
  transform: rotate(-1.2deg);
}
.page-title p.lede { color: var(--ink-soft); margin-top: 0.5rem; max-width: 42rem; font-size: 1.1rem; }

.article { max-width: 46rem; }
.article h2 { margin: 2.4rem 0 0.8rem; }
.article p { margin: 0 0 1.1rem; }
.article strong { color: var(--accent-deep); }
.article figure {
  margin: 2rem -6rem;
  border-radius: 1rem;
  overflow: hidden;
}
.article figure img { width: 100%; }
.article figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.5rem 0.2rem 0;
  text-align: center;
}
@media (max-width: 64rem) {
  .article figure { margin: 1.8rem 0; }
}

.note {
  background: #f4ede0;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.6rem 0.6rem 0;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}

/* ---------- contact / EU ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem;
}
.card h3 { font-family: var(--serif); margin-bottom: 0.5rem; }
.card a { text-decoration: none; font-weight: 600; }
.card p { color: var(--ink-soft); }

.eu-banner {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.eu-banner img { width: min(26rem, 100%); height: auto; border-radius: 0.4rem; }
.eu-banner p { color: var(--ink-soft); font-size: 0.92rem; max-width: 28rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 0;
  background: #241c13;
  color: #cfc4b4;
  padding: 2.5rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: #f0e7d8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand img { height: 3.4rem; width: auto; filter: invert(0.92); }
.footer-contact p { margin: 0.15rem 0; }
.footer-eu img { height: 5.2rem; width: auto; border-radius: 0.3rem; }
.footer-meta {
  width: 100%;
  border-top: 1px solid #3a2f22;
  margin-top: 0.6rem;
  padding-top: 1rem;
  color: #8d8172;
  font-size: 0.85rem;
}
