/* ============================================================
   DIGICAMPUS — Avaliku lehe stiilid
   Apple iPhone'i stiilis disain: puhas, palju ruumi, suur typography
   ============================================================ */

/* ============================================================
   1. CSS MUUTUJAD — LIGHT TEEMA
   ============================================================ */
:root,
:root[data-theme="light"] {
  --bg:           #ffffff;
  --bg-elevated:  #f8f8fa;
  --bg-section:   #ececef;   /* tumedam helehall — selgem alternation valgest */
  --text:         #1d1d1f;
  --text-muted:   #6e6e73;
  --text-subtle:  #86868b;
  --border:       #d2d2d7;
  --border-light: #d8d8dc;
  --accent:       #0071e3;
  --accent-hover: #0077ed;
  --accent-soft:  rgba(0, 113, 227, 0.15);
  --nav-bg:       rgba(255, 255, 255, 0.45);  /* läbipaistvam algus (lehe ülaservas) */
  --nav-bg-solid: rgba(255, 255, 255, 0.60);  /* kerimisel — härmajäätunud klaas (näeb läbi blur'iga) */
  --nav-shadow:   0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow:       0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg:    0 10px 40px rgba(0, 0, 0, 0.12);
  --input-bg:     #ffffff;
  --error:        #ff3b30;
  --success:      #34c759;
  --warning:      #ff9500;
}

/* ============================================================
   2. CSS MUUTUJAD — DARK TEEMA
   ============================================================ */
:root[data-theme="dark"] {
  --bg:           #000000;
  --bg-elevated:  #1d1d1f;
  --bg-section:   #1a1a1c;
  --text:         #f5f5f7;
  --text-muted:   #a1a1a6;
  --text-subtle:  #86868b;
  --border:       #38383a;
  --border-light: #2c2c2e;
  --accent:       #2997ff;
  --accent-hover: #5badff;
  --accent-soft:  rgba(41, 151, 255, 0.18);
  --nav-bg:       rgba(0, 0, 0, 0.40);   /* läbipaistvam algus (lehe ülaservas) */
  --nav-bg-solid: rgba(0, 0, 0, 0.55);   /* kerimisel — härmajäätunud klaas (tume) */
  --nav-shadow:   0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow:       0 4px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg:    0 10px 50px rgba(0, 0, 0, 0.6);
  --input-bg:     #1d1d1f;
  --error:        #ff453a;
  --success:      #30d158;
  --warning:      #ff9f0a;
}

/* ============================================================
   3. RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* scroll-behavior tahtlikult auto — kohandatud JS scroll (lift'i tunnetus) tegeleb sellega */
  scroll-behavior: auto;
  scroll-padding-top: var(--nav-height, 64px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, textarea, select { font: inherit; color: inherit; }

/* Saavutatavus — fokuse-rõngas */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Vähendab animatsioone kasutajatele, kes seda eelistavad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   4. NAVIGATSIOON
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height, 64px);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  z-index: 1000;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

nav.scrolled {
  background: var(--nav-bg-solid);
  border-bottom-color: var(--border-light);
  box-shadow: var(--nav-shadow);
}

.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-logo img {
  height: var(--nav-logo-size, 28px);
  width: auto;
  max-width: 220px;
  border-radius: 6px;
  object-fit: contain;
}

:root[data-theme="dark"] .nav-logo img {
  /* Tume logo tumedal menüüribal: sama korrektsioon mis hero-logol */
  filter: brightness(1.45) drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s ease;
  padding: 8px 0;
}

.nav-links a:hover { opacity: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  color: var(--text);
}

.theme-toggle:hover { background: var(--border-light); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Keelevahetus ET | EN */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
  font-size: 13px;
  font-weight: 500;
}

.lang-btn {
  padding: 6px 10px;
  border-radius: 980px;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.02em;
  min-width: 32px;
  text-align: center;
}

.lang-btn:hover {
  color: var(--text);
  background: var(--border-light);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 600;
}

.lang-divider {
  color: var(--text-subtle);
  opacity: 0.5;
  font-size: 11px;
  user-select: none;
}

/* Näita õiget ikooni vastavalt teemale */
:root[data-theme="light"] .icon-moon,
:root[data-theme="dark"] .icon-sun {
  display: none;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: relative;
  align-items: center;
  justify-content: center;
}

.hamburger:hover { background: var(--border-light); }

.hamburger span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

.hamburger span:nth-child(1) { top: 12px; }
.hamburger span:nth-child(2) { top: 17px; }
.hamburger span:nth-child(3) { top: 22px; }

.hamburger.open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ============================================================
   5. SEKTSIOONIDE BAAS
   ============================================================ */
section {
  min-height: 100vh;
  padding: 120px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: var(--bg);                  /* vaikimisi valge / must */
  transition: background-color 0.4s ease; /* sujuv tema vahetus */
}

/* Automaatne tausta-vaheldumine — iga paaritu sektsioon helehall/tumehall */
main > section:nth-of-type(even) {
  background: var(--bg-section);
}
/* CTA template: gradient, jätame eraldi (oma stiil .cta-section) */
main > section.cta-section {
  background: linear-gradient(180deg, var(--bg-section), var(--bg));
}

.section-inner {
  max-width: 980px;
  width: 100%;
}

/* Scroll reveal animatsioon — element "kerkib alt nähtavale"
   Pikem teekond + pikem aeg + pehmem easing → sujuvam, mitte hüplev. */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  /* easeOutQuart — pehme, ilma lõpu-spring'iga. 1.4s annab silmale aega jälgida. */
  transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   6. HERO SEKTSIOON
   ============================================================ */
#hero, .hero-section {
  padding-top: 140px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero logo — läbipaistev, eraldi animatsiooniga */
.hero-logo {
  /* --hero-logo-size tuleb inline-style'ist (admin → Sektsioonid → pildi suurus).
     Kast pole ruut: kõrgus = määratud suurus, laius vaba — nii ei teki laia logo
     puhul üles/alla tühje ribasid. min(…, 40vh) tagab, et logo + pealkiri +
     tagline + "keri alla" mahuvad alati ühte ekraanivaatesse. */
  width: 100%;
  height: min(var(--hero-logo-size, 200px), 40vh);
  margin: 0 auto 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* taust eemaldatud — logo ikoonil on enda läbipaistev taust */
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
}

:root[data-theme="dark"] .hero-logo img {
  /* Tume logo mustal taustal: tõsta heledust + hele kuma logo taha */
  filter: brightness(1.45) drop-shadow(0 0 32px rgba(255, 255, 255, 0.28));
}

/* Hero logo erikene reveal animatsioon: scale + fade, sujuv (sügavam efekt tuleb hiljem) */
.hero-logo.reveal {
  transform: scale(0.6);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.6s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.hero-logo.reveal.visible {
  transform: scale(1);
}

#hero h1, .hero-section h1 {
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;                /* veidi rohkem ruumi descender'idele */
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 40px;             /* rohkem vahet tagline'iga, ei kata "g" tähte */
  padding-bottom: 0.08em;          /* mahutab gradient-teksti descender'i */
}

.hero-tagline {
  font-size: clamp(20px, 3vw, 32px);
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 700px;
  margin: 0 auto;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-subtle);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  animation: bounce 2.5s infinite ease-in-out;
}

.hero-scroll-hint:hover { opacity: 1; }
.hero-scroll-hint svg { width: 16px; height: 16px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   7. VISIITKAARDI SEKTSIOON
   ============================================================ */
#image {
  padding: 80px 24px;
}

.image-wrap {
  max-width: 1200px;
  width: 100%;
}

/* Visiitkaardi pildi erikene reveal: scale + slide-up, sujuvalt + pikem duration */
.image-wrap.reveal {
  transform: scale(0.92) translateY(60px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-wrap.reveal.visible {
  transform: scale(1) translateY(0);
}

.image-frame {
  display: block;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-elevated);
  /* peen sissetuleku tunnetus — pilt liigub scroll'imisel veidi ülespoole */
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-frame:hover {
  transform: translateY(-6px);
}

.image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   8. MEIST SEKTSIOON
   ============================================================ */

#about h2 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 28px;
  color: var(--text);
}

#about p {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

/* ============================================================
   9. KONTAKTIVORMI SEKTSIOON
   ============================================================ */

#contact h2 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text);
}

#contact .subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  margin-bottom: 48px;
}

.form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-left: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.form-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
  margin-left: 16px;
  display: none;
}

.form-group.has-error .form-error { display: block; }

/* Mitu viga korraga (nt sõnumi too_short + special_chars) */
.form-error-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.form-error-list li {
  margin: 2px 0;
  padding-left: 18px;
  position: relative;
}
.form-error-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  font-weight: 700;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.12);
}

.turnstile-placeholder {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: var(--text-subtle);
  font-size: 13px;
  margin-bottom: 20px;
}

/* Cloudflare Turnstile widget — keskele, peen vahe vormi nupuga */
.turnstile-widget {
  margin: 8px 0 20px;
  display: flex;
  justify-content: center;
  min-height: 65px;  /* hoiab paigutust kuni widget laetud */
}

.submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  background: var(--accent);
  color: white;
  border-radius: 980px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

.form-status.error {
  display: block;
  background: rgba(255, 59, 48, 0.15);
  color: var(--error);
}

/* ============================================================
   10. FOOTER
   ============================================================ */
footer {
  background: var(--bg);
  padding: 48px 24px 28px;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  /* Flex, mitte grid — veerud püsivad keskel ka siis, kui osa on välja lülitatud */
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px 96px;
  text-align: center;
}

.footer-col { min-width: 200px; }

.footer-col h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  display: block;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-brand {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-tagline {
  margin-bottom: 16px !important;
}

.footer-meta {
  font-size: 12px !important;
  color: var(--text-subtle) !important;
}

.footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
}

/* ============================================================
   10b. UUED TEMPLATE'ID (hero-image-split, text-image-split, cta)
   ============================================================ */

/* SPLIT (hero-image-split + text-image-split) */
.split-section {
  padding: 100px 24px;
}
.split-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-content {
  text-align: left;
}
.split-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 28px;
  padding-bottom: 0.08em;
}
.split-body {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-muted);
  line-height: 1.5;
}

/* text-image-split — tagasihoidlikum */
.split-section-text {
  padding: 80px 24px;
}
.split-grid-text {
  gap: 60px;
}
.split-grid-text h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text);
}
.split-grid-text p {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-muted);
  line-height: 1.6;
}

.split-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.split-image img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* CTA */
.cta-section {
  padding: 120px 24px;
  text-align: center;
}
.cta-inner {
  max-width: 720px;
}
.cta-title {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}
.cta-body {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.5;
}
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 17px;
  font-weight: 500;
  padding: 16px 36px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.3s;
  box-shadow: 0 4px 20px var(--accent-soft);
}
.cta-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 28px var(--accent-soft);
  transform: translateY(-2px);
}
.cta-button:active {
  transform: translateY(0);
}

/* INFO sektsioon — tagasihoidlikuma stiil */
.info-section {
  padding: 80px 24px;
}

/* SERVICES — Apple-stiilis ikoonide rida */
.services-section {
  padding: 100px 24px;
}
.services-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.services-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 64px;
  color: var(--text);
}
/* Flex + center: kindel teenuse laius, ühtlane vahe, joondub keskelt välja */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px 56px;          /* 56px horisontaalne vahe = sama 1, 2, 3, N teenuse puhul */
}
.service-item {
  width: 180px;            /* kindel laius — venitamist ei ole */
  flex: 0 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.service-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.service-item:hover .service-icon {
  transform: scale(1.08);
}
.service-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.service-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Mobiil: väiksem vahe, väiksemad ikoonid, kitsam item */
@media (max-width: 640px) {
  .services-grid {
    gap: 28px 24px;
  }
  .service-item {
    width: 140px;
  }
  .service-icon {
    width: 56px;
    height: 56px;
  }
  .service-icon img {
    width: 56px;
    height: 56px;
  }
  .services-title {
    margin-bottom: 40px;
  }
}

/* ============================================================
   10d. TOOTED + OSTUKORV (E-commerce)
   ============================================================ */
.products-section {
  padding: 100px 24px;
}
.products-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.products-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
}
.products-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}
/* Flex + center: kindel kaardi laius (300px), joondub keskelt — üks toode
   ei veni üle ekraani, mitu toodet jaotuvad ühtlaselt ja wrap'ivad ridadesse */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}
.product-card {
  width: min(300px, 100%);      /* standard 300px, kitsal ekraanil mahub */
  flex: 0 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-image-placeholder {
  font-size: 64px;
  opacity: 0.2;
}
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.product-badge-out {
  background: var(--error);
  color: white;
}
.product-badge-featured {
  background: #ffd60a;
  color: #1d1d1f;
}
.product-info {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.product-short {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}
.product-prices {
  margin-top: 8px;
}
.product-price-main {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.product-price-secondary {
  font-size: 12px;
  color: var(--text-subtle);
}
.product-add-btn {
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.product-add-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}
.product-add-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.product-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-subtle);
}

/* Ostukorvi nupp navi'sse */
.cart-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: var(--text);
}
.cart-toggle:hover { background: var(--border-light); }
.cart-toggle svg { width: 20px; height: 20px; }
.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 980px;
  min-width: 18px;
  text-align: center;
}

/* Ostukorvi modal (paremalt sisse) */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  justify-content: flex-end;
}
.cart-modal[hidden] { display: none; }
.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: cartOverlayFade 0.3s ease;
}
@keyframes cartOverlayFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cart-panel {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cartPanelSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}
@keyframes cartPanelSlide {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.cart-header .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
  border: none;
  cursor: pointer;
}
.cart-header .icon-btn:hover { background: var(--border); }
.cart-header .icon-btn svg { width: 16px; height: 16px; }
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.cart-empty {
  text-align: center;
  color: var(--text-muted);
  margin: 60px 0;
}
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--bg-section);
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px;
}
.cart-item-price {
  font-size: 13px;
  color: var(--text-muted);
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-qty-btn:hover { background: var(--bg-section); }
.cart-qty {
  font-size: 13px;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}
.cart-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
}
.cart-remove:hover { color: var(--error); }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-section);
  flex-shrink: 0;
}
.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.cart-total-grand {
  font-size: 16px !important;
  color: var(--text) !important;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
}
.btn-checkout {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-checkout:hover:not(:disabled) { background: var(--accent-hover); }
.btn-checkout:active:not(:disabled) { transform: scale(0.98); }
.btn-checkout:disabled { opacity: 0.6; cursor: not-allowed; }

/* Checkout vormi väljad */
#checkoutForm label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
#checkoutForm input,
#checkoutForm textarea,
#checkoutForm select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}
#checkoutForm input:focus,
#checkoutForm textarea:focus,
#checkoutForm select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.checkout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.checkout-row:has(label:nth-child(3)) {
  grid-template-columns: 1fr 1fr 1fr;
}
.checkout-summary {
  margin: 20px 0;
  padding: 14px;
  background: var(--bg-section);
  border-radius: 10px;
  font-size: 13px;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.checkout-summary-total {
  font-weight: 600;
  font-size: 15px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.checkout-status {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 12px 0;
}
.checkout-status.error { background: var(--accent-soft); color: var(--error); }
.checkout-status.success { background: rgba(52,199,89,0.15); color: var(--success); }

/* --- Saatmisviiside valik (Faas 17a) --- */
.checkout-shipping { margin-bottom: 8px; }
.shipping-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.shipping-opt:hover { border-color: var(--accent); }
.shipping-opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.shipping-opt input { accent-color: var(--accent); }
.shipping-opt-name { flex: 1; font-size: 14px; }
.shipping-opt-price { font-weight: 600; font-size: 14px; }
.shipping-free {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(52,199,89,0.12);
  color: var(--success);
  font-size: 14px;
  font-weight: 500;
}
.shipping-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

/* Pakiautomaadi valik */
.checkout-parcel { margin: 10px 0 4px; }
.checkout-parcel select { width: 100%; }

/* Makseviisi valik */
.checkout-payment { margin-bottom: 8px; }
.payment-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.payment-opt:hover { border-color: var(--accent); }
.payment-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.payment-opt input { accent-color: var(--accent); margin-top: 2px; }
.payment-opt-text { display: flex; flex-direction: column; gap: 2px; }
.payment-opt-name { font-size: 14px; font-weight: 500; }
.payment-opt-desc { font-size: 12px; color: var(--text-muted); }

/* Vormi vea-stiilid (checkout) */
#checkoutForm input.invalid,
#checkoutForm select.invalid,
#checkoutForm textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.field-error {
  display: block;
  margin-top: 4px;
  color: var(--error);
  font-size: 12px;
}

/* Tasuta saatmise silt tootekaardil */
.product-free-shipping {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(52,199,89,0.12);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .checkout-row { grid-template-columns: 1fr !important; }
  .cart-panel { max-width: 100%; }
}

/* ============================================================
   10c. GDPR COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 2000;
  background: var(--nav-bg-solid);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 20px 24px;
  animation: cookieBannerSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner[hidden] {
  display: none;
}
@keyframes cookieBannerSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  min-width: 280px;
}
.cookie-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.cookie-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.cookie-customize {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cookie-customize[hidden] { display: none; }
.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-section);
  transition: background 0.2s;
}
.cookie-option:hover { background: var(--bg-elevated); }
.cookie-option-disabled { opacity: 0.7; cursor: not-allowed; }
.cookie-option input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: inherit;
}
.cookie-option-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.cookie-option-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 980px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}
.cookie-btn:active { transform: scale(0.97); }
.cookie-btn-primary {
  background: var(--accent);
  color: white;
}
.cookie-btn-primary:hover { background: var(--accent-hover); }
.cookie-btn-secondary {
  background: var(--bg-section);
  color: var(--text);
  border: 1px solid var(--border);
}
.cookie-btn-secondary:hover { background: var(--bg-elevated); }
.cookie-btn-ghost {
  background: transparent;
  color: var(--accent);
}
.cookie-btn-ghost:hover { background: var(--accent-soft); }

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 16px;
  }
  .cookie-banner-inner {
    flex-direction: column;
    gap: 16px;
  }
  .cookie-buttons {
    width: 100%;
    justify-content: stretch;
  }
  .cookie-buttons .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

/* ============================================================
   11. RESPONSIVE — MOBIIL JA TABLET
   ============================================================ */

/* Tablet ja allapoole */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-col:first-child {
    grid-column: 1 / -1;
  }
}

/* Split layout mobile — stacks vertically */
@media (max-width: 900px) {
  .split-grid,
  .split-grid-text {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split-image {
    order: 2;
  }
}

/* Mobiil */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height, 64px);
    left: 0;
    right: 0;
    /* Peaaegu läbipaistmatu — avatud menüü peab sisu selgelt katma */
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
  }

  :root[data-theme="dark"] .nav-links {
    background: rgba(18, 18, 20, 0.97);
  }

  /* Avatud menüü ajal ka ülemine riba läbipaistmatuks (brauserites, mis :has toetavad) */
  nav:has(.nav-links.mobile-open) {
    background: rgba(255, 255, 255, 0.97);
  }
  :root[data-theme="dark"] nav:has(.nav-links.mobile-open) {
    background: rgba(18, 18, 20, 0.97);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: 17px;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .hamburger {
    display: flex;
  }

  /* Sektsioonid */
  section {
    padding: 100px 20px 60px;
    min-height: auto;
  }

  /* Hero */
  #hero, .hero-section { padding-top: 120px; min-height: 100vh; min-height: 100dvh; }
  .hero-logo {
    /* 55% desktop-suurusest (vaikimisi 200px → 110px), admin-suurus skaleerub kaasa */
    width: 100%;
    height: min(calc(var(--hero-logo-size, 200px) * 0.55), 32vh);
    border-radius: 26px;
    margin-bottom: 32px;
  }
  #hero h1, .hero-section h1 { font-size: 52px; }
  .hero-tagline { font-size: 19px; }
  .hero-scroll-hint { bottom: 24px; }

  /* Visiitkaart */
  #image { padding: 40px 16px; }
  .image-frame { border-radius: 20px; }

  /* Vorm */
  .form-group input,
  .form-group textarea {
    padding: 14px 18px;
    font-size: 16px;     /* 16px+ väldib iOS auto-zoom'i fookusel */
    border-radius: 12px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  footer { padding: 60px 20px 32px; }
}

/* Väike mobiil */
@media (max-width: 380px) {
  .nav-logo span { display: none; }
  #hero h1, .hero-section h1 { font-size: 44px; }
}

/* Lai ekraan */
@media (min-width: 1280px) {
  .section-inner {
    max-width: 1100px;
  }
}

/* ─────────────────────────────────────────────────────────
   LUCIDE-STIILIS SVG IKOONID (vt includes/icons.php)
   .icon — vaikimisi stiil kõigi <?= icon("name") ?> kutsete jaoks
───────────────────────────────────────────────────────── */
.icon {
  display: inline-block;
  vertical-align: -2px;          /* tasakaalusta text-baseline'iga */
  flex-shrink: 0;
  color: inherit;                /* päib teksti värvist (currentColor) */
}
/* Kui ikoon on nupul/lingil teksti ees, lisa väike vahe */
button > .icon, a > .icon, .btn > .icon, label > .icon { margin-right: 4px; }
/* Status-värvilised ikoonid */
.icon-success { color: #10b981; }
.icon-warning { color: #f59e0b; }
.icon-danger  { color: #ef4444; }
.icon-info    { color: #0071e3; }
.icon-muted   { color: var(--text-muted, #6e6e73); }
