/* ===================================================================
   TKM | Digital Icons — Global Styles (shared across all pages)
   =================================================================== */

/* --- Dark Theme (default) --- */
:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-alt: #050505;
  --bg-card: #111111;
  --accent: #b99654;
  --accent-dark: #8f6f36;
  --text: #ffffff;
  --text-muted: #a6a198;
  --text-dim: #6d6760;
  --border: #211d16;
  --overlay-bg: rgba(0, 0, 0, 0.85);
  --overlay-text: #f6f0e4;
  --nav-fg: #ffffff;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "DM Sans", sans-serif;
  --font-body: "Inter", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg: #f1ece3;
  --bg-alt: #e7dfd2;
  --bg-card: #ffffff;
  --accent: #2f2418;
  --accent-dark: #1f170f;
  --text: #110d09;
  --text-muted: #26201a;
  --text-dim: #3b3229;
  --border: #b7aa99;
  --overlay-bg: rgba(9, 8, 7, 0.74);
  --overlay-text: #f2ece0;
  --nav-fg: #15120f;
}

/* --- Global Reset --- */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
}
[data-theme="light"] p {
  color: #221c16;
}
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] .logo,
[data-theme="light"] .menu-trigger,
[data-theme="light"] .nav-control-btn {
  color: #120e0a;
}
[data-theme="light"] .section-tag,
[data-theme="light"] .suite-num {
  color: #241a10;
}
body.menu-open {
  overflow: hidden;
}

/* --- Noise Overlay --- */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(https://upload.wikimedia.org/wikipedia/commons/7/76/Noise_1.png);
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}
[data-theme="light"] body::after {
  opacity: 0.015;
}

/* --- Typography --- */
h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
}
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}
p {
  line-height: 1.9;
  color: var(--text-muted);
  font-weight: 300;
  font-size: 1rem;
  font-family: var(--font-body);
}
em {
  font-style: italic;
}

.section-tag {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.55em;
  display: block;
  margin-bottom: 28px;
}

/* --- Nav --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 40px 60px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: normal;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  backdrop-filter: blur(6px);
  transition: background-color 0.45s ease;
}
[data-theme="light"] nav {
  background: linear-gradient(
    to bottom,
    rgba(241, 236, 227, 0.98),
    rgba(241, 236, 227, 0.8)
  );
  border-bottom: 1px solid rgba(129, 102, 55, 0.18);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.logo {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.25em;
  color: var(--nav-fg);
  text-decoration: none;
  transition: color 0.3s ease;
}
.menu-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--nav-fg);
  transition: color 0.3s ease;
}
.burger-line {
  width: 30px;
  height: 1px;
  background: var(--nav-fg);
  position: relative;
  transition: background-color 0.3s ease;
}
.burger-line::before {
  content: "";
  position: absolute;
  top: -9px;
  width: 100%;
  height: 1px;
  background: var(--nav-fg);
}

/* --- Nav Controls (lang + theme) --- */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-control-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--nav-fg);
  padding: 0;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav-control-btn:hover {
  opacity: 1;
  color: var(--accent);
}
.nav-control-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.25);
}
[data-theme="light"] .nav-control-divider {
  background: rgba(26, 26, 26, 0.24);
}

/* --- Menu Overlay --- */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-alt);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 42px;
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease);
  border-top: 1px solid var(--border);
}
#menu-overlay.active {
  clip-path: inset(0 0 0% 0);
}
.menu-close {
  position: absolute;
  top: 40px;
  right: 60px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  background: none;
  border: none;
  transition: color 0.4s ease;
}
[data-theme="light"] .menu-close {
  color: rgba(26, 26, 26, 0.4);
}
.menu-close:hover {
  color: var(--accent);
}
.menu-links {
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 980px;
  display: grid;
  gap: 10px;
}
.menu-links a {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6.4vw, 4.8rem);
  font-weight: 300;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin: 0;
  line-height: 1.03;
  text-transform: none;
  transition:
    color 0.4s ease,
    letter-spacing 0.4s ease;
}
.menu-links a:hover {
  color: var(--accent);
  font-style: italic;
  letter-spacing: 0.03em;
}
.menu-links a.is-current {
  color: var(--accent);
}
.menu-note {
  margin-top: 26px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.57rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  max-width: 760px;
}
[data-theme="light"] .menu-note {
  color: #2b231b;
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(35px);
}

/* --- Clip Reveal (images) --- */
.clip-wrap {
  overflow: hidden;
}
.clip-inner {
  transform: translateY(40px);
  opacity: 0;
  transition: none;
}

/* word-split reveal wrappers */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.word-inner {
  display: inline-block;
  transform: translateY(110%);
}

/* --- Buttons --- */
.btn-lux {
  border: 1px solid var(--accent);
  padding: 18px 52px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.38em;
  font-family: var(--font-sans);
  text-decoration: none;
  font-size: 0.68rem;
  transition: 0.45s var(--ease);
  display: inline-block;
  cursor: pointer;
  font-weight: 400;
  background: transparent;
}
.btn-lux:hover {
  background: var(--accent);
  color: var(--bg);
  letter-spacing: 0.42em;
}
.btn-lux-filled {
  border: 1px solid var(--accent);
  padding: 18px 52px;
  background: var(--accent);
  color: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.38em;
  font-family: var(--font-sans);
  text-decoration: none;
  font-size: 0.68rem;
  transition: 0.45s var(--ease);
  display: inline-block;
  cursor: pointer;
  font-weight: 400;
}
.btn-lux-filled:hover {
  background: transparent;
  color: var(--accent);
  letter-spacing: 0.42em;
}

/* --- Stats Bar --- */
.stats-bar {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 10px;
}
[data-theme="light"] .stat-label {
  color: #2f261e;
}

/* --- Suite Number (used across pages) --- */
.suite-num {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.4em;
  margin-bottom: 12px;
  display: block;
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(197, 160, 89, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  display: none;
  will-change: transform;
}
.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  display: none;
  transform: translate(-50%, -50%);
}
@media (hover: hover) {
  body {
    cursor: none;
  }
  .cursor,
  .cursor-dot {
    display: block;
  }
}

/* --- Page Transition --- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  will-change: clip-path, opacity;
}

/* --- Scroll Down Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.scroll-indicator span {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}
[data-theme="light"] .scroll-indicator span {
  color: rgba(17, 13, 10, 0.84);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}
@keyframes headerAuraFloat {
  0% {
    transform: translate(-50%, 0) scale(0.98);
    opacity: 0.55;
  }
  50% {
    transform: translate(-48%, -3.5%) scale(1.05);
    opacity: 0.75;
  }
  100% {
    transform: translate(-52%, 1.5%) scale(1);
    opacity: 0.58;
  }
}
@keyframes heroImageBreath {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1);
  }
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 25px 0;
}
.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.4s ease;
}
[data-theme="light"] .footer-links a {
  color: #2f261e;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-links a.is-current {
  color: var(--accent);
}
.footer-copy {
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
[data-theme="light"] .footer-copy {
  color: #3a3129;
}
html[data-theme="light"] .page-header::before {
  background:
    linear-gradient(
      to bottom,
      rgba(241, 236, 227, 0.36),
      rgba(241, 236, 227, 0.24) 36%,
      rgba(241, 236, 227, 0.7)
    ),
    radial-gradient(circle at 20% 26%, rgba(96, 73, 38, 0.16), transparent 44%),
    radial-gradient(circle at 78% 74%, rgba(96, 73, 38, 0.14), transparent 50%);
}
html[data-theme="light"] .page-header::after {
  background: radial-gradient(circle, rgba(96, 73, 38, 0.14), rgba(96, 73, 38, 0));
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 40px auto;
}

/* --- Page Header (inner pages) --- */
.page-header {
  height: 78vh;
  height: 78dvh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  isolation: isolate;
  border-bottom: 1px solid var(--border);
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.3) 36%, rgba(0, 0, 0, 0.82)),
    radial-gradient(circle at 20% 26%, rgba(185, 150, 84, 0.22), transparent 44%),
    radial-gradient(circle at 78% 74%, rgba(185, 150, 84, 0.16), transparent 50%);
  pointer-events: none;
}
.page-header::after {
  content: "";
  position: absolute;
  width: 54vw;
  height: 54vw;
  min-width: 420px;
  min-height: 420px;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(185, 150, 84, 0.26), rgba(185, 150, 84, 0));
  filter: blur(24px);
  animation: headerAuraFloat 13s ease-in-out infinite;
}
.page-header-title {
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 300;
  margin-bottom: 20px;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}

/* --- Hero --- */
.hero {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  isolation: isolate;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3;
  filter: grayscale(60%) contrast(1.15);
  transition: filter 0.6s ease;
  transform: scale(1.05);
  animation: heroImageBreath 12s ease-in-out infinite alternate;
}
[data-theme="light"] .hero-bg-image {
  filter: grayscale(18%) contrast(1.04) brightness(0.98);
  opacity: 0.36;
}
[data-theme="light"] .hero-title,
[data-theme="light"] .page-header-title {
  color: #120d08;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  padding: 0 16px;
}
.hero-title {
  font-size: clamp(3.5rem, 11vw, 8rem);
  margin-bottom: 40px;
  font-weight: 300;
  overflow: hidden;
}

/* --- Image hover color effect (shared) --- */
.img-hover-color {
  filter: grayscale(100%) saturate(0.8) contrast(1);
  transition: filter 1s var(--ease), transform 1s var(--ease);
  transform-origin: center;
}
.img-hover-color:hover {
  filter: grayscale(0%) saturate(1.15) contrast(1.04);
  transform: scale(1.02);
}
.clip-wrap:hover .img-hover-color,
.work-item:hover .img-hover-color,
.portfolio-card:hover .img-hover-color,
.journal-card:hover .img-hover-color,
.team-card:hover .img-hover-color {
  filter: grayscale(0%) saturate(1.15) contrast(1.04);
}
.image-fallback {
  object-fit: cover;
  filter: none !important;
  background: #0f0e0d;
}

/* --- Language toggle: hide/show content --- */
[data-lang="en"] [data-i18n-hr] {
  display: none !important;
}
[data-lang="hr"] [data-i18n-en] {
  display: none !important;
}

/* --- Mobile --- */
@media (max-width: 1200px) {
  nav {
    padding: 28px 36px;
  }
  .nav-right {
    gap: 20px;
  }
  .menu-links a {
    font-size: clamp(1.9rem, 6vw, 4rem);
  }
}
@media (max-width: 992px) {
  nav {
    padding: 20px 24px;
  }
  .logo {
    font-size: 1.5rem;
    letter-spacing: 0.18em;
  }
  .menu-trigger {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    gap: 9px;
  }
  .burger-line {
    width: 22px;
  }
  .burger-line::before {
    top: -7px;
  }
  .menu-close {
    top: 24px;
    right: 24px;
    font-size: 0.56rem;
    letter-spacing: 0.24em;
  }
  .menu-links {
    gap: 8px;
  }
  .menu-links a {
    font-size: clamp(1.6rem, 7vw, 3.2rem);
    line-height: 1.06;
  }
  .section-tag {
    letter-spacing: 0.35em;
  }
}
@media (max-width: 768px) {
  nav {
    padding: 18px 16px;
  }
  .nav-right {
    gap: 12px;
  }
  .nav-controls {
    gap: 8px;
  }
  .nav-control-btn {
    font-size: 0.48rem;
    letter-spacing: 0.22em;
  }
  .nav-control-divider {
    height: 10px;
  }
  .hero-title {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }
  .stat-num {
    font-size: 3rem;
  }
  .btn-lux,
  .btn-lux-filled {
    padding: 14px 26px;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
  }
  .page-header {
    height: 58vh;
    height: 58dvh;
    min-height: 410px;
  }
  .menu-links a {
    font-size: clamp(1.45rem, 9vw, 2.2rem);
  }
  .menu-close {
    right: 16px;
    top: 16px;
  }
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
}
@media (max-width: 540px) {
  .page-header::after {
    width: 88vw;
    height: 88vw;
    min-width: 280px;
    min-height: 280px;
  }
  .menu-links {
    gap: 5px;
  }
  .menu-links a {
    font-size: clamp(1.2rem, 8.4vw, 1.8rem);
  }
  .menu-note {
    letter-spacing: 0.18em;
    font-size: 0.5rem;
  }
  .section-tag {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
  }
  .footer-copy {
    letter-spacing: 0.2em;
  }
}
