/* ========================================================================
   Aleš Lukek — refined minimal
   Purple kept as a single confident accent gradient; everything else
   strips away the dated chrome so the word clock can breathe.
   ========================================================================*/

:root {
  --bg:        #fafaf9;
  --surface:   #ffffff;
  --ink:       #0f0e17;
  --ink-soft:  #3c3a4a;
  --muted:     #6b6478;
  --line:      #e7e5e4;

  --violet-1:  #4338ca;   /* indigo-700 */
  --violet-2:  #6d28d9;   /* violet-700 */
  --violet-3:  #7c3aed;   /* violet-600 */
  --orange:    #ff5d02;   /* brand */

  --gradient:  linear-gradient(135deg, var(--violet-1) 0%, var(--violet-2) 100%);

  --font-sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-1:  0 1px 2px rgba(15, 14, 23, 0.04), 0 2px 6px rgba(15, 14, 23, 0.04);
  --shadow-2:  0 4px 12px rgba(15, 14, 23, 0.06), 0 12px 32px rgba(15, 14, 23, 0.06);
}

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

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;   /* prevent rubber-band revealing the fixed clock */
}

body {
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overscroll-behavior-y: none;   /* belt-and-suspenders with html rule */
}

main { flex: 1; position: relative; z-index: 3; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav (sits over hero) ──────────────────────────────────────────────*/

.hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  background: linear-gradient(to bottom, rgba(15, 14, 23, 0.35), transparent);
  pointer-events: none;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-content > * { pointer-events: auto; }

.logo {
  width: 42px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Sleeker language toggle */
.language-toggle {
  display: inline-flex;
  gap: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}

.lang-btn + .lang-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.25);
}

.lang-btn:hover { color: rgba(255, 255, 255, 0.9); }

.lang-btn.active {
  color: #fff;
}

.lang-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 1.5px;
  background: var(--orange);
  border-radius: 1px;
}

/* ── Hero photo ────────────────────────────────────────────────────────*/

.hero-main {
  position: relative;
  z-index: 20;
  height: 92vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image,
.hero-image picture { position: absolute; inset: 0; }

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 14, 23, 0.45) 0%, rgba(15, 14, 23, 0.25) 35%, rgba(15, 14, 23, 0.55) 100%),
    linear-gradient(135deg, rgba(67, 56, 202, 0.25), rgba(109, 40, 217, 0.18));
  z-index: 2;
}

/* Scrolling text — calm cross-fade */
.scrolling-text-container {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding-bottom: 4vh;
  box-sizing: border-box;
}

.scrolling-text {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  opacity: 0;
  width: 92%;
  max-width: 720px;
  gap: 0.65rem;
  will-change: opacity, transform;
}

.headline {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--orange);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.subtitle {
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  font-weight: 300;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
  font-family: var(--font-mono);
  font-style: italic;
}

/* Three texts, 4s each: 0.7s in, 2.6s hold, 0.7s out. Total 12s cycle. */
.scrolling-text:nth-child(1) { animation: textFade 12s ease-in-out infinite; animation-delay: 0s; }
.scrolling-text:nth-child(2) { animation: textFade 12s ease-in-out infinite; animation-delay: 4s; }
.scrolling-text:nth-child(3) { animation: textFade 12s ease-in-out infinite; animation-delay: 8s; }

@keyframes textFade {
  0%   { opacity: 0; transform: translateY(8px); }
  5.5% { opacity: 1; transform: translateY(0); }
  27%  { opacity: 1; transform: translateY(0); }
  33.3%{ opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; transform: translateY(8px); }
}

/* Scroll cue */
.scroll-indicator {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  opacity: 0.7;
  animation: bounce 2.4s ease-in-out infinite;
  cursor: pointer;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
}

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

/* ── Projects / clock section ──────────────────────────────────────────*/

.section { padding: 6rem 0 5rem; }

.projects {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-2);
  text-align: center;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.project-description {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.project-description p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* Editorial gallery — 3 cols on desktop, varied row heights for rhythm */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 120px;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.45s ease;
}

/* Layout pattern (asymmetric but balanced):
   1: 3 wide × 2 tall   (large)
   2: 3 wide × 2 tall   (large)
   3: 2 wide × 2 tall   (medium)
   4: 2 wide × 2 tall   (medium)
   5: 2 wide × 2 tall   (medium)
   6: 6 wide × 2 tall   (panorama)                          */

.gallery-item:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 3; grid-row: span 2; }
.gallery-item:nth-child(3) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(5) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(6) { grid-column: span 6; grid-row: span 2; }

.gallery-item picture,
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.gallery-item:hover img { transform: scale(1.04); }

/* ── Word-clock background (the star) ──────────────────────────────────*/

.word-clock-background {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 900px);
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  padding-top: 5rem;
  box-sizing: border-box;
  will-change: transform;
}

.word-clock-background svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: geometricPrecision;
}

/* Blur layer that hides the clock while the gallery is on */
.blur-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(250, 250, 249, 0.55), rgba(250, 250, 249, 0.55)),
    linear-gradient(rgba(15, 14, 23, 0.25), rgba(15, 14, 23, 0.25));
  -webkit-backdrop-filter: blur(3.5px);
  backdrop-filter: blur(3.5px);
  pointer-events: none;
  z-index: 2;
  transition: background 0.75s ease, backdrop-filter 0.75s ease, -webkit-backdrop-filter 0.75s ease;
}

@supports not (backdrop-filter: blur(1px)) {
  .blur-overlay {
    background:
      linear-gradient(rgba(250, 250, 249, 0.78), rgba(250, 250, 249, 0.78)),
      linear-gradient(rgba(15, 14, 23, 0.30), rgba(15, 14, 23, 0.30));
  }
}

/* Clock language swapping */
.clock-svg {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.clock-svg.fade-in { opacity: 1; }

body[data-language="sl"] .clock-sl { display: block; }
body[data-language="en"] .clock-en { display: block; }
body[data-language="nl"] .clock-nl { display: block; }
body:not([data-language]) .clock-en { display: block; }

/* Z-order for content above the clock */
.projects .container { position: relative; z-index: 10; }
.section-title,
.section-eyebrow,
.project-description,
.gallery { position: relative; z-index: 15; transition: opacity 0.75s ease; }
.gallery-item { transition: opacity 0.75s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease; }

.content-transparent .section-title,
.content-transparent .section-eyebrow,
.content-transparent .project-description,
.content-transparent .gallery,
.content-transparent .gallery-item { opacity: 0.01; }

/* ── Footer ────────────────────────────────────────────────────────────*/

.footer {
  margin-top: auto;
  position: relative;
  z-index: 5;
  padding: 2.5rem 0 2.25rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-content p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
}

.footer-content strong { font-weight: 500; color: var(--ink); }

.footer-content a {
  color: inherit;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-content .copyright {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ── Responsive ────────────────────────────────────────────────────────*/

@media (max-width: 860px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 4rem 0 3.5rem; }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }
  .gallery-item:nth-child(n) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(6) { grid-column: span 2; grid-row: span 2; }

  .hero-main { height: 84vh; }
  .hero { padding: 1rem 1.25rem; }
  .word-clock-background { padding-top: 4rem; }
}

@media (max-width: 480px) {
  .headline { font-size: 2.2rem; }
  .subtitle { font-size: 0.95rem; }
  .logo { width: 36px; }
  .gallery { grid-auto-rows: 110px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .scrolling-text:nth-child(1) { opacity: 1; }
  .scrolling-text:nth-child(2),
  .scrolling-text:nth-child(3) { display: none; }
}
