/* ==========================================================================
   mira-le-fay.de — direction C "con energy"
   Palette, type and components all live here. Edit this file to restyle.
   ========================================================================== */

/* --- Self-hosted fonts -----------------------------------------------------
   Drop the .woff2 files into /assets/fonts/ and these blocks take over.
   Until then the fallback stack below is used. Fonts are self-hosted on
   purpose: no Google Fonts request = no US data transfer = no consent banner.
   Clash Display + Satoshi are free from fontshare.com
--------------------------------------------------------------------------- */
@font-face {
  font-family: 'Theme Display';
  src: url('fonts/display.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Theme Body';
  src: url('fonts/body.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --shadow-hard: 0 2px 0 rgba(0, 0, 0, .25);
  --wrap: 33rem;
  --font-display: 'Theme Display', 'Archivo Black', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Theme Body', 'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale — every font-size on the page pulls from here. Nine steps,
     each used by more than one component; nothing gets its own one-off
     number anymore. */
  --text-2xs:  .5rem;   /* corner tags (REF) */
  --text-xs:   .68rem;  /* small captions: barcode label, building label, mail-card role */
  --text-sm:   .74rem;  /* labels: badge role, field label, lang toggle */
  --text-md:   .78rem;  /* secondary text: topbar home, link meta, lightbox credit */
  --text-lg:   .85rem;  /* body-adjacent: consent text, footer links, form notice */
  --text-xl:   .95rem;  /* running copy: badge bio, page paragraphs/list items */
  --text-2xl:  1rem;    /* inputs, buttons, mail address, link titles */
  --text-3xl:  1.15rem; /* page h2 */
  --text-4xl:  1.35rem; /* building title */
  --text-hero-badge: clamp(2rem, 10vw, 2.9rem);
  --text-hero-page:  clamp(1.9rem, 8vw, 2.6rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* proximity, not mandatory — a slide taller than the viewport (a long
     link list on a small phone) can otherwise trap wheel/trackpad
     scrolling on some browsers instead of just letting it through */
  scroll-snap-type: y proximity;
}

/* Intentionally dark-only — every theme is a con-hall-at-night palette,
   there's no prefers-color-scheme / light variant to answer to. That's a
   choice tied to the badge-and-spotlight concept below, not an omission. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  /* faint spotlight, like a con hall stage */
  background-image:
    radial-gradient(120% 60% at 50% -10%, var(--glow-1), transparent 65%),
    radial-gradient(90% 50% at 80% 10%, var(--glow-2), transparent 65%);
  background-repeat: no-repeat;
}

a { color: var(--support); }

:focus-visible {
  outline: 3px solid var(--support);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

/* --- Slides — each snaps into place on scroll, like presentation pages --- */
.slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--support);
  color: var(--bg);
  padding: .6rem 1rem;
  font-weight: 700;
}

/* --- Top bar / language toggle -------------------------------------------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
}
.topbar__home {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.topbar__home:hover { color: var(--text); }

.lang {
  display: inline-flex;
  border: 2px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .12em;
  padding: .38rem .8rem;
  cursor: pointer;
}
.lang button[aria-pressed='true'] {
  background: var(--support);
  color: var(--bg);
}

/* --- Photo strip — pinned polaroids, first slide --------------------------- */
.photo-strip {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  margin: 1.75rem auto 2.5rem;
  position: relative;
  z-index: 1;
}
/* .polaroid is the frame (background, shadow, tilt) — a plain div now,
   since it holds two separate interactive children (the zoom button and
   the credit link) and those can't nest inside each other. */
.polaroid {
  position: relative;
  display: block;
  width: 360px;
  padding: 5px 5px 12px;
  background: #f3efe6;
  border-radius: 2px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
  transition: transform .2s ease, z-index .2s ease;
}
/* Fixed, bigger size in the strip itself — flex-shrink was quietly
   squashing every polaroid down to container-width ÷ 4 regardless of
   the width above. Locking it with flex-shrink:0 and letting them
   overlap slightly keeps the row centered on the badge's width. */
.photo-strip .polaroid {
  width: 108px;
  flex: 0 0 auto;
  margin: 0 -14px;
}
.polaroid:nth-child(1) { transform: rotate(-9deg) translateY(3px); }
.polaroid:nth-child(2) { transform: rotate(5deg); }
.polaroid:nth-child(3) { transform: rotate(-4deg); }
.polaroid:nth-child(4) { transform: rotate(8deg) translateY(4px); }
.polaroid:hover,
.polaroid:focus-within {
  transform: scale(1.12) rotate(0deg);
  z-index: 5;
}
.polaroid__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-lift);
}

/* Small credit tag, present on every polaroid-styled image — links straight
   to whoever the photo/reference is from (photographer, franchise, etc.). */
.polaroid__ref {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  display: inline-block;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-2xs);
  letter-spacing: .08em;
  padding: 1px 4px;
  border-radius: 3px;
  text-decoration: none;
}
.polaroid__ref:hover,
.polaroid__ref:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 22rem) {
  .photo-strip .polaroid { width: 84px; margin: 0 -11px; }
}

/* --- Lightbox — enlarged photo on click ------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: rgba(0, 0, 0, .85);
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  max-width: min(90vw, 32rem);
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.lightbox__credit {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: .04em;
  text-decoration: none;
}
.lightbox__credit:hover,
.lightbox__credit:focus-visible { color: var(--support); }
.lightbox__credit[hidden] { display: none; }
.lightbox__close {
  appearance: none;
  cursor: pointer;
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 50%;
}
.lightbox__close:hover { border-color: var(--support); color: var(--support); }

body.lightbox-open { overflow: hidden; }

/* --- Badge (the signature element) ---------------------------------------- */
.badge-block {
  padding: 2.25rem 0 .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lanyard {
  width: 26px;
  height: 62px;
  background: repeating-linear-gradient(
    -45deg,
    var(--surface-lift) 0 8px,
    var(--line) 8px 16px
  );
  border: 2px solid var(--bg);
  border-radius: 3px;
}
.clip {
  width: 46px;
  height: 14px;
  margin-top: -4px;
  background: var(--muted);
  border: 2px solid var(--bg);
  border-radius: 4px;
}

.badge {
  position: relative;
  margin-top: -2px;
  width: 100%;
  max-width: 22rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.1rem;
  text-align: center;
  cursor: zoom-in;
  transform: rotate(var(--tilt));
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), width .35s cubic-bezier(.2, .9, .3, 1.2);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .3);
}
.badge:hover { transform: rotate(0deg) scale(1.012); }

/* Flex-centers whatever sits inside it, so the badge grows from its own
   center once it's moved in here — no fixed/translate corner math. */
.badge-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: rgba(0, 0, 0, .85);
}
.badge-backdrop[hidden] { display: none; }

.badge.is-zoomed {
  width: min(92vw, 26rem);
  max-width: none;
  margin-top: 0;
  cursor: default;
  transform: rotate(0deg) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .55);
}

.badge__hole {
  position: absolute;
  top: .55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 9px;
  background: var(--bg);
  border-radius: 999px;
}

.avatar-wrap {
  position: relative;
  width: 104px;
  margin: .7rem auto .9rem;
}
.avatar {
  width: 104px;
  height: 104px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
  display: block;
  background: var(--surface-lift);
}
.avatar-wrap .polaroid__ref {
  top: auto;
  left: auto;
  bottom: -2px;
  right: -2px;
}
.avatar--placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--support);
}

.badge__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero-badge);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}
.badge__role {
  font-size: var(--text-sm);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--support);
  margin: .7rem 0 .35rem;
}
.badge__bio {
  color: var(--muted);
  font-size: var(--text-xl);
  margin: 0 0 1.1rem;
}

.barcode {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}
.barcode__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: .22em;
  color: var(--muted);
  margin-top: .4rem;
}

/* --- Link stack ------------------------------------------------------------ */
.links {
  list-style: none;
  padding: 0;
  margin: 2.25rem 0 0;
  display: grid;
  gap: .85rem;
}
.link {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-hard);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-lift);
  border-color: var(--support);
}
.link__tile {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-lift);
  color: var(--support);
}
.links li:nth-child(odd) .link__tile { color: var(--accent); }
.link__tile svg { width: 21px; height: 21px; }
.link__text { flex: 1 1 auto; min-width: 0; }
.link__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: .01em;
}
.link__meta {
  display: block;
  font-size: var(--text-md);
  color: var(--muted);
}
.link__arrow { color: var(--muted); flex: 0 0 auto; }

.link--primary { border-color: var(--accent); }

/* --- Now building ---------------------------------------------------------- */
.building {
  position: relative;
  margin-top: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.building__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.building__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  margin: .2rem 0 0;
  line-height: 1.15;
}

/* Pinned project photo — same card as the polaroid strip. Anchored flush
   against the card's bottom border (bottom: 0), so unrotated its own
   bottom edge sits exactly on that line; the clockwise tilt is what
   makes the corner peek out past the card. */
.building__pin {
  position: absolute;
  bottom: -10px;
  right: -43px;
  width: 100px;
  transform: rotate(7deg) !important;
  transition: transform .2s ease, right .25s ease, bottom .25s ease, z-index .2s ease;
  z-index: 2;
}
.building__pin:hover,
.building__pin:focus-within {
  right: 0;
  bottom: 0;
  transform: scale(1.1) rotate(2deg) !important;
  z-index: 5;
}

@media (max-width: 22rem) {
  .building__pin { width: 76px; right: -50px; }
}

/* --- Page content (contact + legal) ---------------------------------------- */
.page { padding: 2rem 0 0; }
.page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero-page);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0 0 .5rem;
}
.page h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  margin: 2rem 0 .4rem;
  color: var(--support);
}
.page h3 {
  font-size: var(--text-2xl);
  margin: 1.4rem 0 .3rem;
}
.lede { color: var(--muted); margin-top: 0; }
.page p, .page li { font-size: var(--text-xl); }
.page ul { padding-left: 1.1rem; }

.mail-cards {
  display: grid;
  gap: .85rem;
  margin: 1.5rem 0 2.25rem;
}
.mail-card {
  display: block;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .16s ease;
}
.mail-card:hover { border-color: var(--support); }
.mail-card__role {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.mail-card__addr {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  word-break: break-all;
}

/* --- Form ------------------------------------------------------------------ */
.form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.field { display: grid; gap: .35rem; }
.field label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-2xl);
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: .7rem .8rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--support);
  outline: none;
}

.consent {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: var(--text-lg);
  color: var(--muted);
}
.consent input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--accent); }

.hp { position: absolute; left: -9999px; }

.btn {
  appearance: none;
  cursor: pointer;
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  padding: .8rem 1.6rem;
  box-shadow: var(--shadow-hard);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
}

/* --- Footer ---------------------------------------------------------------- */
.footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 2px solid var(--line);
  text-align: center;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1.1rem;
  margin-bottom: .6rem;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-lg);
}
.footer a:hover { color: var(--support); }
.footer small { color: var(--line); font-size: var(--text-md); }

/* --- Draft marker for the legal pages -------------------------------------- */
.todo {
  background: var(--accent-tint);
  border-bottom: 1px solid var(--accent);
  padding: 0 .2rem;
  border-radius: 3px;
}
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.1rem;
  font-size: var(--text-lg);
  margin: 1.25rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}