/* ============================================================
   TerraElix — wellness hero landing (ukázkový koncept)
   Breakpointy: sm 640px · md 768px · lg 1024px · xl 1280px
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: #101510;
}

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
}

/* ===== Stránka / pozadí ===== */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-image: url('assets/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== Navbar ===== */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 16px 20px;
}

.brand {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.05em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}

.nav-links {
  display: none;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 32px;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 4px;
  transition: opacity 0.2s ease;
}

.icon-btn:hover {
  opacity: 0.7;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  object-fit: cover;
}

/* ===== Mobilní overlay menu ===== */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 24px;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.menu-close {
  position: absolute;
  top: 18px;
  right: 20px;
}

/* ===== Hero ===== */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 5;
  padding: 32px 20px;
}

.headline {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: -0.05em;
  color: #fff;
  font-size: 48px;
  line-height: 50px;
}

.hl-line {
  display: block;
}

/* Slova — odhalení po slovech (signature interakce) */

.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-right: 0.08em; /* aby ohraničení neuřízlo kurzívní přesah */
  margin-right: 0.1em;
}

.word-inner {
  display: inline-block;
  opacity: 0;
  animation: wordReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.word.dim .word-inner {
  color: rgba(255, 255, 255, 0.45);
}

.capsule-img {
  display: none;
  height: clamp(60px, 10vw, 160px);
  width: auto;
  vertical-align: middle;
  margin-left: 8px;
}

/* ===== CTA ===== */

.cta-row {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: 6px;
  width: 100%;
  height: 56px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  background: #1c1c1c;
  transform: translateY(-2px);
}

.btn svg {
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

.cta-text {
  color: #fff;
  max-width: 310px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.03em;
}

/* ===== Produkt — mobil / tablet ===== */

.product-mobile {
  display: block;
  margin-bottom: -180px;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.product-mobile img {
  display: block;
  width: 180%;
  max-width: 1296px;
  object-fit: contain;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
}

/* ===== Spodní 3 panely ===== */

.panels {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 10;
}

.panel {
  padding: 28px 24px;
  min-height: 190px;
}

/* --- Panel 1 --- */

.panel-1 {
  background: #ECEDEC;
  color: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.panel1-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  max-width: 350px;
  position: relative;
  z-index: 1;
}

.panel1-link {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -0.03em;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.panel1-link:hover {
  opacity: 0.6;
}

.panel1-deco {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* --- Panel 2 (karusel) --- */

.panel-2 {
  background: #FEFDF9;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.carousel {
  position: relative;
  flex: 1;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  opacity: 0;
  transform: translateY(16px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}

.icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ic-black   { background: #000000; }
.ic-emerald { background: #065F46; }
.ic-cyan    { background: #155E75; }
.ic-amber   { background: #B45309; }

.card-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  height: 2px;
  flex: 1;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.2);
  padding: 0;
  transition: background 0.3s ease;
}

.dot.active {
  background: #000;
}

/* --- Panel 3 --- */

.panel-3 {
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.panel3-img {
  width: 120px;
  height: 82px;
  object-fit: cover;
  flex-shrink: 0;
}

.stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.05em;
  color: #fff;
}

.stat-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;
  margin-top: 6px;
  max-width: 300px;
}

.credit {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 11px;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.35);
}

.credit a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.credit a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Produkt — desktop (plovoucí) ===== */

.product-desktop {
  display: none;
  position: absolute;
  z-index: 0;
  width: clamp(600px, 80vw, 1412px);
  max-width: none;
  height: auto;
  bottom: -10%;
  right: clamp(-400px, -20vw, -100px);
  pointer-events: none;
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
}

/* ===== Demo upozornění (toast) ===== */

.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: -0.01em;
  padding: 11px 20px;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}

.demo-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Animace
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes wordReveal {
  from { opacity: 0; transform: translateY(100%); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0px); }
}

.anim-fade-up     { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-fade-in     { animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-slide-left  { animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-slide-right { animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-scale-in    { animation: scaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) both; }

.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }
.delay-700  { animation-delay: 0.7s; }
.delay-800  { animation-delay: 0.8s; }
.delay-900  { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1.0s; }
.delay-1100 { animation-delay: 1.1s; }

/* ============================================================
   Responzivita
   ============================================================ */

/* ----- sm ≥ 640px ----- */
@media (min-width: 640px) {
  .navbar { padding: 16px 32px; }

  .hero { padding-left: 32px; padding-right: 32px; }

  .headline { font-size: 80px; line-height: 72px; }

  .capsule-img { display: inline-block; }

  .cta-row {
    margin-top: 48px;
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

  .btn { width: 240px; height: 64px; font-size: 20px; }

  .cta-text { font-size: 16px; }

  .product-mobile { margin-bottom: -220px; }
  .product-mobile img { width: 151%; }

  .panel { padding: 32px; }

  .panel1-title { font-size: 28px; }

  .icon-circle { width: 48px; height: 48px; }
  .icon-circle svg { width: 22px; height: 22px; }

  .card-text { font-size: 16px; }

  .panel3-img { width: 160px; height: 110px; }
  .stat-num { font-size: 30px; }
  .stat-text { font-size: 16px; }
}

/* ----- md ≥ 768px ----- */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }

  .headline { font-size: 110px; line-height: 95px; }

  .btn { width: 280px; }

  .panels { grid-template-columns: 2fr 1fr 2fr; }
}

/* ----- lg ≥ 1024px ----- */
@media (min-width: 1024px) {
  .navbar { padding: 20px 40px; }

  .nav-links { gap: 40px; }
  .nav-actions { gap: 20px; }

  .avatar { width: 40px; height: 40px; }

  .hero { padding-left: 40px; padding-right: 40px; }

  .headline { font-size: 130px; line-height: 110px; }

  .capsule-img { margin-left: 16px; }

  .cta-row { margin-top: 75px; gap: 50px; }

  .btn { width: 310px; height: 72px; font-size: 24px; }

  .cta-text { font-size: 18px; }

  .product-mobile { display: none; }
  .product-desktop { display: block; }

  .panel { padding: 36px 40px; min-height: 220px; }

  .panel1-title { font-size: 35px; }
  .panel1-link { font-size: 18px; }

  .card-text { font-size: 18px; }

  .panel3-img { width: 208px; height: 142px; }
  .stat-num { font-size: 35px; }
  .stat-text { font-size: 18px; }
}

/* ----- xl ≥ 1280px ----- */
@media (min-width: 1280px) {
  .headline { font-size: 155px; line-height: 125px; }
}

/* ===== Omezený pohyb ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
