/* ===== TarkLend – mobile-first, warm child-friendly ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Custom cursor at 1/3 size (scaled via transform) */
.custom-cursor,
.custom-cursor * {
  cursor: none;
}
.custom-cursor a,
.custom-cursor button,
.custom-cursor [role="button"] {
  cursor: none;
}

.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 96px;
  height: 96px;
  pointer-events: none;
  z-index: 99999;
  background: url('../cursors/cursor.png') 0 0 / 96px 96px no-repeat;
  transform: scale(0.333);
  transform-origin: 8px 8px;
}
.cursor-dot.is-pointer {
  background-image: url('../cursors/pointer.png');
  background-size: 96px 96px;
}
.cursor-dot.is-hidden {
  opacity: 0;
  visibility: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', system-ui, sans-serif;
  color: #3d3a36;
  background: #fdf8f4;
  line-height: 1.55;
  position: relative;
}

.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* Child-friendly animated background */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(165deg, #fdf8f4 0%, #fceee6 35%, #fae5d9 70%, #fdf8f4 100%);
  background-size: 200% 200%;
  animation: bgGradient 18s ease-in-out infinite;
  overflow: hidden;
  pointer-events: none;
}

.page-bg::before,
.page-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: float 20s ease-in-out infinite;
}

.page-bg::before {
  width: min(80vw, 400px);
  height: min(80vw, 400px);
  background: radial-gradient(circle, #e59e6d 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
  animation-duration: 22s;
}

.page-bg::after {
  width: min(60vw, 280px);
  height: min(60vw, 280px);
  background: radial-gradient(circle, #c46b3c 0%, transparent 70%);
  bottom: -5%;
  right: -5%;
  animation-delay: -8s;
  animation-duration: 25s;
}

@keyframes bgGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  .page-bg,
  .page-bg::before,
  .page-bg::after {
    animation: none;
  }
  .intro-media,
  .intro-text,
  .intro-img,
  .atmosphere-img {
    animation: none;
  }
  .site-header {
    animation: none;
  }
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(229, 158, 109, 0.25);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: slideDown 0.5s ease-out;
}

.header-top {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-link {
  display: inline-block;
  line-height: 0;
}

.logo-img {
  display: block;
  height: auto;
  max-width: 60px;
  width: 100%;
  object-fit: contain;
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.75rem;
  position: relative;
}

/* Nav: centered */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  justify-content: center;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5c534a;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(229, 158, 109, 0.2);
  color: #8b4512;
}

/* Language: right side (absolute on desktop so nav stays centered) */
.lang-wrap {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5c534a;
  background: #fff;
  border: 1px solid rgba(229, 158, 109, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lang-trigger:hover {
  background: #fff8f2;
  border-color: #e59e6d;
}

.lang-trigger[aria-expanded="true"] {
  background: #fff;
  border-color: #e59e6d;
  box-shadow: 0 0 0 2px rgba(229, 158, 109, 0.25);
}

.lang-trigger-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 2px;
  transition: transform 0.25s ease;
}

.lang-trigger[aria-expanded="true"] .lang-trigger-icon {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 10rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid rgba(229, 158, 109, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(61, 58, 54, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
}

.lang-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3d3a36;
  background: none;
  border: none;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover,
.lang-option:focus {
  background: rgba(229, 158, 109, 0.15);
  color: #8b4512;
}

.lang-option[aria-selected="true"] {
  background: rgba(229, 158, 109, 0.2);
  color: #a85a32;
  font-weight: 600;
}

/* ----- Main: intro (left image, right text) ----- */
.main {
  flex: 1 0 auto;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  width: 100%;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.intro-media {
  order: 1;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.intro-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(61, 58, 54, 0.1);
  animation: softPulse 6s ease-in-out infinite;
}

.intro-text {
  order: 2;
  animation: fadeInUp 0.7s ease-out 0.25s both;
}

.tagline {
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  color: #8b4512;
  line-height: 1.4;
}

.welcome-long {
  margin: 0;
  font-size: 1rem;
  color: #4a4540;
}

/* Atmosphere strip: sun, garden, cubes */
.atmosphere {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(229, 158, 109, 0.2);
}

.atmosphere-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  animation: fadeInUp 0.6s ease-out both;
}

.atmosphere-img:nth-child(1) { animation-delay: 0.2s; }
.atmosphere-img:nth-child(2) { animation-delay: 0.35s; }
.atmosphere-img:nth-child(3) { animation-delay: 0.5s; }

/* Tablet: intro side-by-side */
@media (min-width: 640px) {
  .intro {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
  }

  .intro-media {
    order: 0;
  }

  .intro-text {
    order: 0;
  }

  .tagline {
    font-size: 1.3rem;
  }

  .welcome-long {
    font-size: 1.05rem;
  }
}

/* Mobile: lang below nav when no room */
@media (max-width: 520px) {
  .header-bar {
    flex-direction: column;
  }

  .lang-wrap {
    position: static;
    transform: none;
  }
}

@media (min-width: 768px) {
  .main {
    padding: 2rem 1.5rem 3rem;
  }

  .atmosphere {
    gap: 0.75rem;
    margin-top: 2.5rem;
  }
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  padding: 2rem 1rem 1.5rem;
  background: #fff8f2;
  border-top: 1px solid rgba(229, 158, 109, 0.25);
  text-align: center;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #5c534a;
  background: #fff;
  border: 1px solid rgba(229, 158, 109, 0.35);
  border-radius: 50%;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.footer-icon:hover {
  color: #c46b3c;
  background: rgba(229, 158, 109, 0.12);
  border-color: #e59e6d;
  transform: translateY(-2px);
}

.footer-icon .icon {
  flex-shrink: 0;
}

.footer-legal {
  font-size: 0.8rem;
  color: #6b6359;
  line-height: 1.5;
}

.footer-company {
  margin: 0 0 0.25rem;
}

.footer-copy {
  margin: 0;
}
