/* Simmu-Mardi talu – shared styles for index.html and muugitingimused.html (light warm theme) */

/* Self-hosted fonts (SIL OFL, licences in assets/fonts/) */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/fraunces-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --cream: #faf5ea;
  --paper: #fffdf8;
  --sand: #f2e6cf;
  --ink: #2b2118;
  --muted: #6b5b49;
  --honey: #c8902e;
  --honey-dark: #8f6117;
  --line: #e7d9bf;
  --radius: 14px;
  --header-h: 72px;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  /* slight gradient over the whole page: lighter cream at the top, warmer sand towards the bottom */
  background: var(--cream) linear-gradient(180deg, #fffaf1 0%, var(--cream) 35%, #f3e5c9 100%);
  line-height: 1.6;
}

h1, h2, h3, .company-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.15;
}

a { color: var(--honey-dark); }

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

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.section {
  padding: 4rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--honey-dark);
  margin-bottom: 0.6rem;
}

.section h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--muted);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--honey);
  background: var(--honey);
  color: var(--ink); /* dark text on honey: contrast 5.7:1 (white was only 2.7:1) */
  font: 500 1rem 'Inter', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.button:hover { background: var(--honey-dark); border-color: var(--honey-dark); color: #fff; } /* white on dark honey: 5.4:1 */

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button.secondary:hover { border-color: var(--honey); background: transparent; color: var(--ink); }

.button.small { padding: 0.5rem 1rem; font-size: 0.9rem; }

:focus-visible {
  outline: 2px solid var(--honey-dark);
  outline-offset: 2px;
}

/* Header: scrolls away with the page on all screens. The logo hangs below the bar as a cream tag */
.site-header {
  background: rgba(250, 245, 234, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  position: relative;
  justify-content: flex-end; /* the logo tag is positioned on the left, see .brand */
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  /* hanging tag: starts at the top edge of the bar and reaches below it */
  position: absolute;
  top: 0;
  left: 1.25rem;
  padding: 0.4rem 0.9rem 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 12px 26px -16px rgba(80, 50, 10, 0.55);
}

.brand svg { width: 38px; height: 38px; flex-shrink: 0; }

/* Farm logo (contains the farm name) on the hanging tag */
.brand .logo { height: 101px; width: auto; flex-shrink: 0; }

.company-name { font-size: 1.2rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.site-nav .icon-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav .icon-link:hover { color: var(--honey-dark); }

.site-nav svg { width: 21px; height: 21px; }
.icon-line { fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-solid { fill: currentColor; }

.site-nav .button { margin-left: 0.4rem; }

@media (max-width: 599px) {
  .site-nav .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Small phones: the opening section already has a "Telli mett" button */
@media (max-width: 479px) {
  .site-nav .button { display: none; }
}

@media (max-width: 379px) {
  .company-name { font-size: 1.05rem; }
  .brand svg { width: 32px; height: 32px; }
  .brand .logo { height: 87px; }
  .site-nav .button { padding: 0.45rem 0.8rem; }
}

/* Hero */
.hero {
  padding: 4rem 0 2.5rem; /* room under the hanging logo tag; tighter towards "Meist" */
  background: #f6ecd9; /* warm cream band, so it stands apart from the light "Meist" band below */
}

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: var(--sand);
  border-radius: 999px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.price-tag strong {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-image img {
  height: auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 45%; /* keeps the hives and the jars in view */
  border-radius: 24px;
  box-shadow: 0 20px 50px -20px rgba(80, 50, 10, 0.45);
}

/* Photo placeholders (warm tones) */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ecd9b3, #d8b16c);
  color: rgba(43, 33, 24, 0.6);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* EU organic logo: code number and origin directly underneath, on two lines (Reg. (EU) 2018/848) */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.hero-meta .price-tag { margin-bottom: 0; }

.organic {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.organic img {
  width: 96px;
  height: auto;
}

.organic figcaption {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink);
}

.organic figcaption span { display: block; }

.organic-small img { width: 72px; }
.organic-small figcaption { font-size: 0.62rem; }

/* About cards */
.cards {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body { padding: 1.4rem 1.5rem 1.6rem; }

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.card p { color: var(--muted); }

/* Product */
/* "Meist" gets its own light band, so it stands apart from the opening section above and the sand product band below */
#meist {
  background: var(--paper);
  padding-top: 3rem;
}

.product {
  background: var(--sand);
}

.product-box {
  display: grid;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.product-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 40% center;
}

.product-info { padding: 2rem 1.5rem; }

.product-info h2 { margin-bottom: 0.3rem; }

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.product-price {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--honey-dark);
  line-height: 1.25;
  margin-bottom: 0.2rem;
  /* price and VAT note side by side; when the note wraps (phones) it sits tight under the price */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.4rem;
}

.product-price small {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.3;
}

.product-list {
  list-style: none;
  margin: 1.2rem 0 1.6rem;
  display: grid;
  gap: 0.6rem;
}

.product-list li {
  display: flex;
  gap: 0.6rem;
  color: var(--muted);
}

.product-list li::before {
  content: '';
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.55rem;
  background: var(--honey);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

/* Contact / order */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--honey-dark);
  font-weight: 500;
}

.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.95rem; }

.contact-details {
  font-style: normal;
  display: grid;
  gap: 0.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.contact-details a { color: var(--ink); }

/* Form */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 12px 40px -24px rgba(80, 50, 10, 0.35);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

input, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 1rem 'Inter', sans-serif;
}

input:focus, textarea:focus { border-color: var(--honey); outline: none; box-shadow: 0 0 0 3px rgba(200, 144, 46, 0.2); }

input::placeholder, textarea::placeholder { color: #a8998a; }

textarea { resize: vertical; min-height: 110px; }

fieldset { border: none; min-width: 0; }

.choice legend {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.choice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.choice-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  background: #fff;
}

.choice-options label:has(input:checked) {
  border-color: var(--honey);
  background: #fdf4e3;
}

.choice-options input { width: auto; accent-color: var(--honey); }

.order-fields {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}

#quantity { max-width: 8rem; }

.order-fields .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.order-fields .delivery { margin-top: 1rem; }

.parcel-fields {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.order-fields .check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
}

.order-fields .check input { width: auto; margin-top: 0.3rem; accent-color: var(--honey); }

form button[type="submit"] { width: 100%; margin-top: 0.3rem; }
form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

.form-status:empty { display: none; }
.form-status { font-size: 0.95rem; }
.form-status.success, .form-status.error { padding: 0.8rem 1rem; border-radius: 8px; }
.form-status.success { background: #e8f1df; border: 1px solid #a9c48f; }
.form-status.error { background: #f8e3df; border: 1px solid #d99a8f; }

.form-note { font-size: 0.8rem; color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(250, 245, 234, 0.8);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.2rem;
}

.site-footer .company-name { color: var(--cream); font-size: 1.2rem; }
.site-footer address { font-style: normal; }
.site-footer a { color: var(--cream); }
.site-footer .copy { font-size: 0.8rem; opacity: 0.7; }

/* Tablet and up */
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .product-box { grid-template-columns: 1fr 1fr; }
  .product-img { height: 100%; aspect-ratio: auto; min-height: 22rem; }
  .product-info { padding: 2.5rem; align-self: center; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; }
}

/* Desktop */
@media (min-width: 900px) {
  .site-header .wrap { min-height: var(--header-h); }
  .brand svg { width: 44px; height: 44px; }
  .brand .logo { height: 125px; }
  .page { padding-top: 5rem; } /* room under the logo tag on the terms page */
  .company-name { font-size: 1.4rem; }
  .section { padding: 5.5rem 0; }
  .hero { padding: 5rem 0 3.5rem; }
  #meist { padding-top: 4rem; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
  .hero-image img { aspect-ratio: 4 / 5; }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
  .form-card { padding: 2rem; }
}

/* Terms of sale page (muugitingimused.html) */
.page {
  padding: 4rem 0 4rem;
}

.prose {
  max-width: 46rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.4rem;
  text-wrap: balance;
}

.prose .updated {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.7rem;
  text-wrap: balance;
}

.prose p,
.prose li {
  margin-bottom: 0.6rem;
}

.prose ol,
.prose ul {
  padding-left: 1.4rem;
}

.prose .toc {
  font-size: 0.95rem;
  padding: 1rem 1.2rem;
  background: var(--cream);
  border-radius: 10px;
}

.prose .toc p { margin: 0.4rem 0 0; }

.prose .button { margin: 0.4rem 0 0; }

.withdraw-form {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}

.form-status.info { padding: 0.8rem 1rem; border-radius: 8px; background: var(--sand); border: 1px solid var(--line); }

.model-form { margin-top: 1.5rem; }

.model-form summary {
  cursor: pointer;
  font-weight: 500;
}

.form-template {
  margin-top: 0.8rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (min-width: 900px) {
  .prose { padding: 3rem 3.5rem; }
}

/* Smallest phones: keep the organic logo caption ("Eesti põllumajandus") inside the product card */
@media (max-width: 399px) {
  .product-top > div { min-width: 0; }
  .product-top .organic { flex-shrink: 0; }
  .product-top .organic img { width: 72px; }
  .product-top .organic figcaption { font-size: 0.62rem; }
}
