/* ========================================
   Lucevano — Coming Soon
   ======================================== */

/* --- Fonts --- */

@font-face {
  font-family: 'Alegreya';
  src: url('../fonts/Alegreya-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nord';
  src: url('../fonts/Nord-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display Pro';
  src: url('../fonts/NeueHaasGroteskDisplayPro-55Roman.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Retrouvailles';
  src: url('../fonts/Retrouvailles-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- Design Tokens --- */

:root {
  --color-off-white: #f9f5ed;
  --color-ivory: #e7e2d4;
  --color-pearl: #d0c8b6;
  --color-mocha: #493223;
  --color-coffee: #302016;
  --color-copper: #c45626;

  --font-title: 'Alegreya', 'Georgia', serif;
  --font-subtitle: 'Nord', 'Arial', sans-serif;
  --font-body: 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', sans-serif;
  --font-accent: 'Retrouvailles', 'Georgia', serif;

  --ease-luxury: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-reveal: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset --- */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--color-ivory);
  background-image: url('../images/background-ivory.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-coffee);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* --- Selection --- */

::selection {
  background-color: var(--color-mocha);
  color: var(--color-off-white);
}

::-moz-selection {
  background-color: var(--color-mocha);
  color: var(--color-off-white);
}

/* --- Scrollbar (when visible on short viewports) --- */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-ivory);
}

::-webkit-scrollbar-thumb {
  background: var(--color-pearl);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-mocha);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-pearl) var(--color-ivory);
}

/* --- Screen-reader only --- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Hero Layout --- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  padding: 3rem 1.5rem;
  gap: 0;
}

/* --- Beeldmerk (Monogram) --- */

.logo-beeldmerk {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.logo-beeldmerk svg {
  width: clamp(120px, 22vw, 200px);
  height: auto;
  overflow: visible;
}

.beeldmerk-path {
  fill: var(--color-coffee);
  fill-opacity: 0;
  stroke: var(--color-coffee);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--path-length, 0);
  stroke-dashoffset: var(--path-length, 0);
  stroke-opacity: 0;
}

/* Entrance: stroke draws, then fill appears */
.beeldmerk-path.animate {
  stroke-opacity: 1;
  animation: draw-stroke 2.8s var(--ease-luxury) forwards;
}

@keyframes draw-stroke {
  0% {
    stroke-dashoffset: var(--path-length);
    stroke-opacity: 1;
    fill-opacity: 0;
  }
  65% {
    stroke-dashoffset: 0;
    stroke-opacity: 1;
    fill-opacity: 0;
  }
  100% {
    stroke-dashoffset: 0;
    stroke-opacity: 0;
    fill-opacity: 1;
  }
}

/* Ambient breathing after entrance */
.beeldmerk-path.resting {
  fill-opacity: 1;
  stroke-opacity: 0;
  stroke-dashoffset: 0;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.015);
  }
}

/* --- Wordmark --- */

.logo-wordmark {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.logo-wordmark svg {
  width: clamp(180px, 38vw, 380px);
  height: auto;
  overflow: visible;
}

.wordmark-letter {
  fill: var(--color-coffee);
  opacity: 0;
  transform: translateY(8px);
}

.wordmark-letter.reveal {
  animation: letter-reveal 0.7s var(--ease-reveal) forwards;
}

@keyframes letter-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delays — applied via JS */

/* --- Message --- */

.message {
  text-align: center;
}

.subtitle {
  font-family: var(--font-subtitle);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: clamp(0.6rem, 1.1vw, 0.8rem);
  color: var(--color-coffee);
  opacity: 0;
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.subtitle.reveal {
  animation: fade-in 1s ease forwards;
}

.accent-text {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--color-copper);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  opacity: 0;
}

.accent-text.reveal {
  animation: fade-in 1s ease forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Footer / Instagram --- */

.footer {
  position: absolute;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  opacity: 0;
}

.footer.reveal {
  animation: fade-in 1s ease forwards;
}

.instagram-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-coffee);
  opacity: 0.45;
  transition: opacity 0.3s ease;
  padding: 0.75rem;
  margin: -0.75rem;
}

.instagram-link:hover {
  opacity: 1;
}

.instagram-link span {
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}

/* --- Responsive --- */

@media (max-height: 500px) {
  html, body {
    overflow-y: auto;
  }
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding: 2rem 1.5rem;
  }
}

/* Safe areas for notched devices */
@supports (padding: env(safe-area-inset-top)) {
  .hero {
    padding-top: max(3rem, env(safe-area-inset-top));
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* --- Accessibility: Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  .beeldmerk-path {
    fill-opacity: 1 !important;
    stroke-opacity: 0 !important;
    stroke-dashoffset: 0 !important;
  }

  .beeldmerk-path.animate,
  .beeldmerk-path.resting {
    animation: none !important;
  }

  .wordmark-letter {
    opacity: 1 !important;
    transform: none !important;
  }

  .wordmark-letter.reveal {
    animation: none !important;
  }

  .subtitle,
  .accent-text,
  .footer {
    opacity: 1 !important;
  }

  .subtitle.reveal,
  .accent-text.reveal,
  .footer.reveal {
    animation: none !important;
  }
}
