/* ═══════════════════════════════════════════════════════
   TEHOKLAPI.FI
   Fonts: Cormorant Garamond (display) + Karla (body)
   WCAG 2.0 AA compliant contrast throughout
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:          #FAF7F2;
  --bg-cream:    #EEE6D8;
  --text:        #1A1713;        /* contrast on bg: 16:1 ✓ */
  --text-muted:  #4A4540;        /* contrast on bg: 7.5:1 ✓, on cream: 6.5:1 ✓ */
  --accent:      #A8854A;        /* contrast on bg: 4.6:1 ✓ */
  --cta:         #B84E1E;        /* contrast on bg: 5.4:1 ✓ */
  --cta-hover:   #9A3E14;
  --divider:     #DDD4C4;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Karla', system-ui, -apple-system, sans-serif;

  --max-width:    880px;
  --section-pad:  clamp(72px, 10vw, 120px);
  --gutter:       clamp(1.5rem, 5vw, 3rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;   /* 17px base for legibility */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Focus styles (WCAG 2.4.7) ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Typography ── */
h1, h2, h3, blockquote {
  font-family: var(--font-heading);
  line-height: 1.1;
}
h1 {
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  font-weight: 400;
  font-style: italic;
}
h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

/* Section eyebrow label */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;          /* 12.75px */
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-pad) 0; }
.section--cream { background: var(--bg-cream); }

/* ── Language button ── */
.lang-btn {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  border: 1px solid var(--accent);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 2px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s, color 0.2s;
}
.lang-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;        /* Firefox fallback */
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: #3A3028;
}
.hero-bg .cover-img {
  object-position: 25% center;
}
.hero-bg::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(16, 11, 7, 0.82) 0%,
    rgba(16, 11, 7, 0.2) 50%,
    rgba(16, 11, 7, 0.08) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  width: 100%;
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
}
.hero-content h1 {
  color: white;
  margin-bottom: 2.25rem;
}

/* ── CTA button ── */
.btn-cta {
  display: inline-block;
  background: var(--cta);
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.9rem 2.25rem;
  border-radius: 2px;
  transition: background 0.2s, transform 0.1s;
}
.btn-cta:hover  { background: var(--cta-hover); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta--large { font-size: 1.1rem; padding: 1.05rem 2.75rem; }

/* Cover image helper — unified look across all images */
.cover-img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;  /* inset fallback for old Firefox */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) brightness(0.93);
}

/* ═══════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.about-img {
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background: #C5BDB4;
}
.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--text); }
.about-text p + p { margin-top: 1.5rem; }
.about-quote {
  margin-top: 2.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════
   PRICE LIST — editorial rows
   ═══════════════════════════════════════════════════════ */
.products-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  margin-top: -0.75rem;
}
.price-list {
  border-top: 1px solid var(--divider);
  margin-bottom: 1.25rem;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0.5rem;
  border-bottom: 1px solid var(--divider);
}
.price-row--soldout .price-name { text-decoration: line-through; text-decoration-color: var(--text-muted); }

.price-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.price-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
}
.price-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.price-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.price-amount {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.price-amount em {
  font-size: 0.72rem;
  font-style: normal;
  font-family: var(--font-body);
  color: var(--text-muted);
  font-weight: 400;
}

/* Availability badges — color + text (not color-only, per WCAG 1.4.1) */
.avail-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 2px;
  white-space: nowrap;
}
.avail-badge--soldout {
  background: #B52A1C;   /* white on this: 5.3:1 ✓ */
  color: white;
}
.avail-badge--available {
  background: #2A6B3A;   /* white on this: 5.7:1 ✓ */
  color: white;
}

.products-footnote {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1.25rem;
}

/* ═══════════════════════════════════════════════════════
   DELIVERY
   ═══════════════════════════════════════════════════════ */
.delivery-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.delivery-image {
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background: #C5BDB4;
}
.delivery-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}
.delivery-item {
  padding: 1.5rem 0;
  border-top: 2px solid var(--accent);
}
.delivery-item + .delivery-item { margin-top: 0; }
.delivery-size {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.6rem;
}
.delivery-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.delivery-area {
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}
.delivery-area-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.delivery-area-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════
   TIPS
   ═══════════════════════════════════════════════════════ */
.tips-container {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.tips-header h2 { margin-bottom: 0; }
.tips-list {
  counter-reset: tip;
  border-top: 1px solid var(--divider);
}
.tips-list li {
  counter-increment: tip;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--divider);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}
.tips-list li::before {
  content: counter(tip);
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1.35;
}

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
#contact { text-align: center; }
.contact-img {
  width: 100%;
  height: clamp(220px, 35vw, 440px);
  overflow: hidden;
  position: relative;
  background: #5A6B4A;
}
.contact-content {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}
.contact-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.contact-phone {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.contact-phone:hover { color: var(--cta); }
.contact-email {
  display: block;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.contact-email:hover { color: var(--cta); }
.contact-address {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════
   STICKY MOBILE CTA
   ═══════════════════════════════════════════════════════ */
.mobile-cta { display: none; } /* hidden on desktop */

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.6);  /* contrast on #1A1713: well above 3:1 ✓ */
  text-align: center;
  padding: 2.5rem var(--gutter);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.footer-link {
  color: inherit;
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
  opacity: 1;
}
.footer-vat {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 768px
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sticky mobile CTA — slides up on scroll, fades in smoothly */
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(26, 23, 19, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.7rem 1.5rem;
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
  }
  .mobile-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
  }
  .mobile-cta-icon { font-size: 0.85rem; opacity: 0.7; }
  body { padding-bottom: 3.5rem; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-img {
    aspect-ratio: 4 / 3;
  }

  .delivery-layout {
    grid-template-columns: 1fr;
  }
  .delivery-image {
    aspect-ratio: 16 / 9;
  }

  .tips-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .tips-header h2 { margin-bottom: 1rem; }

  .price-row,
  .price-row--featured,
  .price-row:hover {
    margin: 0;
    padding: 1.1rem 0;
  }
}

@media (max-width: 480px) {
  .hero-eyebrow { font-size: 0.8rem; }
  h1 { font-size: clamp(2.6rem, 11vw, 3.5rem); }
}
