:root {
  --ink: #262220;
  --paper: #f6f1ea;
  --paper-2: #efe6da;
  --muted: #6f6259;
  --brand: #3f5a30;
  --brand-2: #7a9a63;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(38, 34, 32, 0.08);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body.lang-bg .lang-en { display: none; }
body.lang-en .lang-bg { display: none; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  position: relative;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- Blob background layer ---- */
.blob-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  top: 50%;
  left: -10%;
  width: min(48vw, 620px);
  height: min(48vw, 620px);
  transform: translateY(-50%);
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  animation: blobmorph 20s ease-in-out infinite;
  filter: blur(6px);
  opacity: 0.9;
  transition: opacity 0.4s;
}

@keyframes blobmorph {
  0%, 100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
  25%      { border-radius: 40% 60% 70% 30% / 50% 60% 40% 50%; }
  50%      { border-radius: 50% 50% 33% 67% / 62% 38% 62% 38%; }
  75%      { border-radius: 68% 32% 44% 56% / 40% 62% 38% 60%; }
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  background: rgba(246, 241, 234, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(38, 34, 32, 0.08);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.nav .brand { display: flex; align-items: center; gap: 10px; }
.nav .brand img { height: 40px; width: auto; }

.nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav ul li a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.nav ul li a:hover { color: var(--brand); }

.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-toggle {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: var(--sans);
}
.lang-toggle:hover { background: var(--brand); color: var(--paper); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); }

/* ---- Hero ---- */
.hero { padding: 120px 0 100px; min-height: 78vh; display: flex; align-items: center; }
.hero .container { width: 100%; }
.hero-inner { max-width: 620px; margin-left: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 18px;
}
.eyebrow--dark { color: var(--ink); text-align: center; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1.1;
  margin: 0 0 22px;
  color: var(--ink);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--paper);
  padding: 14px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }

.btn-text {
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}

/* ---- Sections ---- */
section { padding: 72px 0; position: relative; }

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  text-align: center;
  font-size: 2.1rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.about-text--centered {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.about-text--centered p { color: var(--muted); font-size: 1.05rem; }

/* ---- Palette intro ---- */
.palette-intro { text-align: center; margin: 90px auto 20px; }
.palette-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Farnovo flagship block ---- */
.farnovo {
  padding: 50px 24px;
  margin: 20px auto 10px;
}

.farnovo-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 40px;
}

.farnovo-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(38, 34, 32, 0.14));
}

.farnovo-qualities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.fq-item {
  background: rgba(246, 241, 234, 0.82);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.fq-icon { font-size: 1.4rem; flex-shrink: 0; }

.farnovo-cert {
  text-align: center;
  margin: 40px auto 0;
}
.farnovo-cert img {
  max-width: 220px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 10px 16px rgba(38, 34, 32, 0.1));
}
.farnovo-cert p {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Decoton color chart ---- */
.color-chart {
  max-width: 720px;
  margin: 30px auto 0;
  padding: 0 24px;
  text-align: center;
}
.color-chart img {
  width: 100%;
  margin: 0 auto 12px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.color-chart p {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Palette intro ---- */
.palette-intro { text-align: center; margin: 60px auto 10px; }
.palette-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Palette strip ---- */
/* Tile width shrinks fluidly with the viewport; on wide-enough screens all 7
   pigments fit in one row with no scrolling at all. Below 768px there isn't
   room for 7 legible tiles, so it switches to a swipeable strip instead
   (see media query below) — the peeking next tile is the "there's more" cue,
   no visible scrollbar needed. */
.palette-strip {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 30px 24px 40px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.palette-strip::-webkit-scrollbar { display: none; }

.pigment-tile {
  flex: 1 1 0;
  min-width: 92px;
  max-width: 180px;
  scroll-snap-align: center;
  text-align: center;
}

.pigment-tile-media {
  width: 100%;
  aspect-ratio: 6 / 7;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 auto 14px;
}
.pigment-tile-media img { width: 100%; height: 100%; object-fit: cover; }

.shape-a { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
.shape-b { border-radius: 40% 60% 62% 38% / 48% 40% 60% 52%; }
.shape-c { border-radius: 50% 50% 34% 66% / 60% 38% 62% 40%; }

.pigment-tile .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.tile-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* ---- Team ---- */
#team { background: var(--paper-2); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.team-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 auto 16px;
  font-family: var(--serif);
}

.team-card h3 { margin: 0 0 4px; font-size: 1.05rem; font-family: var(--serif); font-weight: 600; }
.team-card .role { color: var(--brand); font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.team-card a { color: var(--muted); font-size: 0.88rem; text-decoration: none; word-break: break-all; }
.team-card a:hover { color: var(--brand); text-decoration: underline; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid rgba(38, 34, 32, 0.08); }
.contact-list li:last-child { border-bottom: none; }
.contact-list a { text-decoration: none; color: var(--ink); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

/* ---- Contact form ---- */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid rgba(38, 34, 32, 0.15);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.contact-form .btn {
  border: none;
  cursor: pointer;
  align-self: flex-start;
  font-family: var(--sans);
}

.form-status { margin: 0; font-size: 0.88rem; font-weight: 600; }
.form-status.ok { color: var(--brand); }
.form-status.fail { color: #a33; }

footer {
  background: var(--ink);
  color: var(--paper-2);
  text-align: center;
  padding: 28px 0;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
footer a { color: var(--paper-2); }

/* ---- Responsive ---- */
@media (max-width: 1060px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .farnovo-top { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .farnovo-media { max-width: 320px; margin: 0 auto; }
  .farnovo-copy .lead { margin-left: auto; margin-right: auto; }
  .farnovo-qualities { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1200px) {
  .hero-inner { max-width: 480px; }
  .blob {
    width: 320px;
    height: 320px;
    left: -110px;
  }
}

@media (max-width: 860px) {
  .nav ul, .nav-right .lang-toggle { display: none; }
  .nav-toggle { display: flex; }
  .nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    gap: 16px;
  }
  .nav.open .lang-toggle { display: inline-block; margin-top: 12px; }

  .hero { min-height: auto; padding: 90px 0 60px; }
  .hero-inner { margin: 0; max-width: 100%; }
  .hero h1 { font-size: 2.1rem; }

  .team-grid, .contact-grid { grid-template-columns: 1fr; }

  /* Not enough room for 7 legible tiles in a row anymore — switch to a
     swipeable strip with larger, peeking tiles instead of shrinking further. */
  .palette-strip { justify-content: flex-start; padding: 30px calc(50% - 31vw) 40px; }
  .pigment-tile { flex: 0 0 62vw; min-width: 0; max-width: none; }

  .blob {
    top: auto;
    bottom: -18vw;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 90vw;
    opacity: 0.35;
    filter: blur(10px);
  }
}

@media (max-width: 480px) {
  .farnovo-qualities { grid-template-columns: 1fr; }
}
