/* ==========================================================================
   Looking For Fael — static site styles
   Tailwind (CDN, play build) supplies utility classes + preflight reset.
   This file covers: self-hosted fonts, design tokens, decorative/interactive
   details that aren't plain Tailwind utilities, and the multi-language
   show/hide mechanism.
   ========================================================================== */

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: "Averia Serif Libre";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/averia-serif-libre-400-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Averia Serif Libre";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/averia-serif-libre-700-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Averia Serif Libre";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/averia-serif-libre-400-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Averia Serif Libre";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/averia-serif-libre-700-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-400-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-400-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-600-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-600-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-400-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-400-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-500-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-500-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Base ---------- */
html {
  font-family: "Inter", system-ui, sans-serif;
}

/* Visible focus indicator for keyboard users on every focusable element.
   Single source of truth — every other focus rule in this file defers to
   this one instead of redeclaring outline color/offset. */
:focus-visible {
  outline: 3px solid #ffd43b;
  outline-offset: 3px;
  border-radius: 2px;
}
/* :focus-visible support on <iframe> (the media embed) is inconsistent —
   some engines fall back to the platform's native focus ring (often blue)
   instead of matching this rule. Force it with plain :focus + !important
   so the embed never shows a color outside the site's palette. */
iframe:focus,
iframe:focus-visible {
  outline: 3px solid #ffd43b !important;
  outline-offset: 3px !important;
}

.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;
}

/* Skip-to-content link — hidden until focused */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #3d2a24;
  color: #fbf3e4;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
  /* outline color/offset comes from the shared :focus-visible rule above */
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Header nav link — underline on hover */
.nav-link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
a[href] {
  cursor: pointer;
}
button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

/* ---------- Grain overlay ---------- */
.grain-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@media (prefers-reduced-motion: reduce) {
  .grain-overlay { display: none; }
}

/* ---------- Language show/hide ---------- */
/* Pages that embed all 5 languages set html[lang] before first paint (inline
   blocking script in <head>). Only the matching [data-lang-*] block shows. */
[data-lang-block] { display: none; }
html[lang="en"] [data-lang-block="en"],
html[lang="fr"] [data-lang-block="fr"],
html[lang="de"] [data-lang-block="de"],
html[lang="es"] [data-lang-block="es"],
html[lang="pt"] [data-lang-block="pt"] {
  display: block;
}
/* html[lang] is set by a blocking inline script in <head>, before the
   browser parses <body> — combined with the render-blocking <link> to this
   stylesheet, the correct language block is the only one ever painted. */

/* ---------- Hero glitch ---------- */
.hero-logo {
  transition: filter 0.2s, transform 0.2s;
}
.hero-logo.is-glitching {
  filter: drop-shadow(3px 0 0 #4dabf7) drop-shadow(-3px 0 0 #ffd43b);
  transform: translateX(-2px);
}

/* ---------- Peephole (judas) ---------- */
.peephole {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(70vh, 90vw);
  max-width: 560px;
  user-select: none;
  border-radius: 9999px;
  background: #000;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 14px #1a1a1a, 0 0 0 18px #2a2a2a;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><ellipse cx='20' cy='20' rx='18' ry='10' fill='white' stroke='black' stroke-width='2'/><circle cx='20' cy='20' r='6' fill='black'/><circle cx='22' cy='18' r='2' fill='white'/></svg>") 20 20, zoom-in;
}
.peephole.is-blinking {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><path d='M2 20 Q20 26 38 20' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/></svg>") 20 20, zoom-in;
}
.peephole-mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 9999px;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 99%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%, #000 99%, transparent 100%);
  box-shadow: inset 0 0 60px 20px rgba(0, 0, 0, 0.85);
}
.peephole-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.1s ease-out;
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
}
.peephole-video-mobile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Below md: video only. From md up: static image only.
   Set directly here (not via Tailwind's hidden/md:block utilities) because
   those classes only exist once the Tailwind CDN script scans the DOM and
   injects its stylesheet client-side — on first paint they don't exist yet,
   so the image would flash before the utility classes take over. This rule
   lives in the statically-loaded stylesheet, so it's correct from frame one. */
@media (max-width: 767px) {
  .peephole-img { display: none; }
  .peephole-hint { display: none; }
}
@media (min-width: 768px) {
  .peephole-video-mobile { display: none; }
}
.peephole-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: radial-gradient(circle at center, transparent 55%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0.95) 100%);
}
.peephole-hint {
  pointer-events: none;
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.3s;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(2px);
}
.peephole:hover .peephole-hint { opacity: 1; }

/* ---------- Hint reveal cards ---------- */
@keyframes hintFadeIn {
  0% { opacity: 0; filter: blur(8px); transform: translateY(4px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.hint-revealed { animation: hintFadeIn 0.5s ease; }
.hint-btn:disabled { opacity: 0.95; pointer-events: none; }

/* ---------- Scroll fade-in ---------- */
[data-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-fade] { opacity: 1; transform: none; }
}

/* ---------- Media carousel ---------- */
.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}
.carousel-slide.is-active { opacity: 1; cursor: zoom-in; }

/* ---------- Media lightbox ---------- */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 12, 10, 0.92);
  padding: 2rem;
}
.media-lightbox-img {
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  object-fit: contain;
  border: 2px solid #3d2a24;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
}
.media-lightbox-close,
.media-lightbox-prev,
.media-lightbox-next {
  position: absolute;
  background: #fbf3e4;
  color: #3d2a24;
  border: 2px solid #3d2a24;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  cursor: pointer;
}
.media-lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
}
.media-lightbox-prev,
.media-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
}
.media-lightbox-prev { left: 1.5rem; }
.media-lightbox-next { right: 1.5rem; }
.media-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: #3d2a24;
  color: #fbf3e4;
}
@media (max-width: 640px) {
  .media-lightbox-prev, .media-lightbox-next { padding: 0.5rem 0.75rem; }
  .media-lightbox-close { width: 2.25rem; height: 2.25rem; font-size: 1.25rem; }
}

/* ---------- Buttons that lift + tilt on hover ---------- */
/* The Tailwind CDN build generates a full `transform:` shorthand per
   utility class instead of composing them through one rule, so combining
   e.g. hover:-translate-y-1 with hover:rotate-[Xdeg] silently drops one of
   the two on hover (last rule in the stylesheet wins outright). This class
   composes rotate + lift through real custom properties in a single
   declaration so both always apply together. */
.tilt-hover {
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease;
}
.tilt-hover:hover,
.tilt-hover:focus-visible {
  transform: rotate(var(--tilt-hover, var(--tilt, 0deg))) translateY(var(--lift, -4px));
}
@media (prefers-reduced-motion: reduce) {
  .tilt-hover,
  .tilt-hover:hover,
  .tilt-hover:focus-visible {
    transition: none;
  }
}

/* ---------- Language switcher dropdown options ---------- */
/* The currently-selected option carries an inline background (higher
   specificity than any class), so a plain hover: utility class can't show
   through on it. !important guarantees hover always wins, on every option,
   selected or not — and the coral fill reads clearly against the cream
   dropdown background instead of the near-invisible tint used before. */
.lang-option {
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-option:hover,
.lang-option:focus-visible {
  background: #d96666 !important;
  color: #fbf3e4 !important;
}
