/* ================================================================
   ALEX COANDA — PORTFOLIO 2026
   Swiss / brutalist · charcoal + international orange
   ================================================================ */

:root {
  --bg: #141414;
  --bg-2: #1a1a1a;
  --ink: #eae8e3;
  --muted: #8d8b85;
  --accent: #ff4d00;
  --line: rgba(234, 232, 227, 0.14);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
}

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

html { scroll-behavior: initial; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; }

.mono {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accent { color: var(--accent); }

/* ================================================================
   PRELOADER
   ================================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0e0e0e;
  display: flex;
  align-items: flex-end;
}
.preloader__inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: var(--pad);
}
.preloader__count { font-size: clamp(3rem, 10vw, 8rem); line-height: 1; }

/* ================================================================
   CURSOR
   ================================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 99;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.25s;
  mix-blend-mode: difference;
}
.cursor.is-hover { width: 44px; height: 44px; }
@media (hover: none) { .cursor { display: none; } }

/* ================================================================
   TOP BAR
   ================================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference;
}
.topbar__nav { display: flex; gap: 1.75rem; }
.topbar__nav a { position: relative; }
.topbar__nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.topbar__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.topbar__lang {
  margin-left: 0.35rem;
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.3s;
}
.topbar__lang:hover { color: var(--ink); }
@media (max-width: 700px) {
  .topbar__meta { display: none; }
  /* phones: five items don't fit, and the logo goes home — so the home
     link is dropped HERE. Case pages have no ABOUT link, so case.css
     spends that free slot on HOME (the logo alone isn't obvious enough). */
  .topbar__home { display: none; }
  .topbar__nav { gap: 1.1rem; }
  .topbar__lang { margin-left: 0; padding-left: 1.1rem; }
}
/* four nav items beside the logo on a small phone: tighten the chrome
   rhythm. FR binds (TRAVAUX / À PROPOS / CONTACT / EN). */
@media (max-width: 420px) {
  .topbar__nav { gap: 0.7rem; }
  .topbar__lang { padding-left: 0.7rem; }
}
/* smallest phones still in the wild (SE 1st gen, 320px): shave the mono
   tracking rather than the type size — chrome fit only, the 0.72rem
   mono tier itself is untouched */
@media (max-width: 345px) {
  .topbar .mono { letter-spacing: 0.03em; }
  .topbar__nav { gap: 0.55rem; }
  .topbar__lang { padding-left: 0.55rem; }
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--pad) * 1.5) var(--pad) var(--pad);
  position: relative;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
  margin-bottom: auto;
  margin-top: 3.2rem;
}
.hero__title {
  font-size: clamp(3rem, min(14.5vw, 18.5vh), 15rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 0.88;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 1.4rem 0 1.8rem;
}
/* FR hero — "DES MARQUES" (8.75em) is wider than the EN lines, so the
   width bound and floor are retuned; same tier, same vh bound */
.hero__title:lang(fr) { font-size: clamp(2.25rem, min(10.1vw, 18.5vh), 15rem); }
/* masked lines carry headroom above (Â À É diacritics) and below
   (the Q's tail) — padding cancelled by negative margins, so the
   visual leading is unchanged. Hidden lines sit at yPercent 140 so
   the extended window can never show their tips pre-reveal. */
.hero__title .line { display: block; overflow: hidden; padding: 0.2em 0 0.12em; margin: -0.2em 0 -0.12em; }
.hero__title .line__inner { display: inline-block; will-change: transform; }
.line--outline .line__inner {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
@media (max-width: 700px) {
  .line--outline .line__inner { -webkit-text-stroke: 1.2px var(--ink); }
}
.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.hero__blurb { max-width: 34ch; font-size: 1rem; color: var(--muted); }
.hero__blurb em { color: var(--ink); }
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}
.hero__arrow { display: inline-block; font-size: 1.1rem; }

/* ================================================================
   MARQUEE
   ================================================================ */
.marquee {
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__text {
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  text-transform: uppercase;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--muted);
}

/* ================================================================
   ABOUT
   ================================================================ */
.about { padding: clamp(5rem, 14vh, 11rem) var(--pad); }
.about__label { color: var(--muted); margin-bottom: 2.2rem; }
.about__manifesto {
  font-size: clamp(1.6rem, 3.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 22ch;
  max-width: min(92vw, 28ch);
}
.about__manifesto .w { opacity: 0.14; }
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: clamp(4rem, 9vh, 7rem);
  border-top: 1px solid var(--line);
  padding-top: 2.4rem;
}
.pillar__num { display: block; margin-bottom: 1.1rem; }
.pillar__name {
  font-size: 1.35rem;
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  margin-bottom: 0.4rem;
}
.pillar__desc { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .pillars { grid-template-columns: 1fr; } }

/* ================================================================
   FEATURED — pinned horizontal
   ================================================================ */
.featured { position: relative; }
.featured__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 var(--pad) clamp(2rem, 5vh, 4rem);
}
.featured__title,
.grid-section__title {
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 0.92;
  text-transform: uppercase;
}
.featured__range, .grid-section__range { color: var(--muted); padding-bottom: 0.5rem; }

.featured__track { display: flex; }
.case {
  position: relative;
  flex: 0 0 100vw;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.case__bignum {
  position: absolute;
  top: 50%;
  left: 2vw;
  transform: translateY(-50%);
  font-size: clamp(16rem, 44vw, 44rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(234, 232, 227, 0.16);
  user-select: none;
  z-index: 0;
}
.case__media {
  position: relative;
  z-index: 1;
  width: min(46vw, 720px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
  flex-shrink: 0;
}
.case__media .plate {
  position: absolute;
  inset: 0;
}
/* future imgs: slight overscale so the horizontal parallax never
   exposes the plate edge */
.case__media .plate img {
  will-change: transform;
  transform: scale(1.12);
}
.case__info {
  position: relative;
  z-index: 2;
  max-width: 30rem;
  margin-left: clamp(-6rem, -4vw, -2rem);
  background: transparent;
}
.case__tags { color: var(--muted); margin-bottom: 1rem; }
.case__name {
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 30px rgba(20, 20, 20, 0.55);
}
.case__outcome {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.4;
  margin-bottom: 1.8rem;
  max-width: 30ch;
}
.case__link { border-bottom: 1px solid var(--accent); padding-bottom: 3px; }

/* mobile: vertical stack */
@media (max-width: 1023px) {
  .featured__track { flex-direction: column; }
  .case {
    flex: initial;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
    padding: clamp(3rem, 8vh, 5rem) var(--pad);
  }
  .case__bignum {
    position: static;
    transform: none;
    font-size: clamp(6rem, 24vw, 12rem);
  }
  .case__media { width: 100%; }
  .case__info { margin-left: 0; }
}

/* ================================================================
   MORE WORK GRID
   ================================================================ */
.grid-section { padding: clamp(5rem, 14vh, 10rem) var(--pad); }
.grid-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.workgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.tile { cursor: pointer; }
.tile__link { display: block; color: inherit; text-decoration: none; }
.tile__media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
}
.tile__media .plate {
  position: absolute;
  inset: 0;
}
.tile__media { position: relative; }
.tile__media .plate img {
  transform: scale(1.01);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  filter: saturate(0.85);
}
.tile:hover .tile__media .plate img { transform: scale(1.06); filter: saturate(1); }
.tile__row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.9rem 0 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
}
.tile__name {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  text-transform: uppercase;
  transition: color 0.3s;
}
.tile:hover .tile__name { color: var(--accent); }
.tile__tags { color: var(--muted); margin-left: auto; white-space: nowrap; }
@media (max-width: 700px) {
  .workgrid { grid-template-columns: 1fr; }
  .tile__tags { display: none; }
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 14vh, 10rem) var(--pad) var(--pad);
  border-top: 1px solid var(--line);
}
.contact__label { color: var(--muted); margin-bottom: 2rem; }
.contact__title {
  font-size: clamp(3.5rem, min(17vw, 22vh), 17rem);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  line-height: 0.88;
  text-transform: uppercase;
}
.contact__title .line { display: block; overflow: hidden; padding: 0.2em 0 0.12em; margin: -0.2em 0 -0.12em; }
.contact__title .line__inner { display: inline-block; }
.contact__blurb {
  max-width: 36ch;
  color: var(--muted);
  margin: 2.4rem 0 1.6rem;
}
.contact__email {
  align-self: flex-start;
  font-size: clamp(1.3rem, 3.2vw, 2.6rem);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.3s;
}
.contact__email:hover { color: var(--accent); }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: auto;
  padding-top: clamp(3rem, 8vh, 5rem);
}
.footer__links { display: flex; gap: 1.75rem; }
.footer__links a:hover { color: var(--accent); }
@media (max-width: 700px) {
  .footer { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}

/* ================================================================
   ?static DEV FLAG
   (prefers-reduced-motion is deliberately ignored — Alex's call,
   2026-08-20: animations run for everyone, on every device)
   ================================================================ */
html.static .featured__track { flex-direction: column; }
html.static .featured__track .case { flex: initial; }
html.static .about__manifesto .w { opacity: 1; }
