/* ==========================================================
   Leonardo Takashi ~ Elan — portfolio
   Palette e regole: 01_Brand Identity/BRAND-IDENTITY.md
   ========================================================== */

/* Font pixel del sito originale (Elan Wtf), self-hosted */
@font-face {
  font-family: "Pixter-Architekt";
  src: url("../assets/fonts/pixter-architekt-bold.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --border: #262626;
  --text: #F4F4F4;
  --muted: #9A9A9A;
  --accent: #B6FF2E;
  --accent-grad: linear-gradient(100deg, #B6FF2E 10%, #EAFF45 90%);

  --font-display: "Clash Display", "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-pixel: "Pixter-Architekt", "JetBrains Mono", monospace;

  --pad: clamp(20px, 5vw, 64px);
  --gutter: clamp(10px, 1.6vw, 20px); /* margine esterno card + allineamento griglia */
  --radius: 10px;                     /* stondamento unico per card e copertine */
}

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

html { scroll-behavior: smooth; }

body {
  background: #050505;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* testo verde con leggero gradient verde -> giallo */
.tilde,
.hero__elan,
.card__area {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- panel: card scura arrotondata (stile sito originale) ---------- */
.panel {
  background: var(--surface);
  border: 1px solid #2A2A2A;
  border-radius: var(--radius);
  margin: 0 var(--gutter) clamp(14px, 2vw, 20px);
}

/* ---------- hero row: card descrizione 3/4 + card connect 1/4 ---------- */
.hero-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: clamp(14px, 2vw, 20px);
  margin: var(--gutter) var(--gutter) clamp(14px, 2vw, 20px);
}

.hero-row > .panel { margin: 0; min-width: 0; }

/* ---------- section label ---------- */
.label {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 24px;
}

/* ---------- hero ---------- */
.hero {
  --hero-pad-x: clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 40px) var(--hero-pad-x) clamp(20px, 2.5vw, 32px);
  overflow: hidden;
}

.hero__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.hero__hey {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 29px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero__elan {
  font-family: var(--font-pixel);
  color: var(--accent);
  font-size: 1.05em;
  margin-left: 3px;
}

.hero__role {
  margin-top: 2px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--muted);
}

.hero__bio {
  margin-top: 24px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 15px);
  line-height: 1.65;
  color: #C4C4C4;
  max-width: 38em;
}

.hero__tools {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.hero__origin {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

/* mantra dentro la hero card */
.hero .mantra__title {
  margin-top: 28px;
}

.hero .marquee--pills {
  margin: 18px calc(-1 * var(--hero-pad-x)) 4px;
  align-self: stretch;
  min-width: 0;
  max-width: none;
  /* fade allineato al margine dei testi della card:
     invisibile fino al margine, poi rampa di ~90px */
  -webkit-mask-image: linear-gradient(to right,
    transparent var(--hero-pad-x),
    black calc(var(--hero-pad-x) + 90px),
    black calc(100% - var(--hero-pad-x) - 90px),
    transparent calc(100% - var(--hero-pad-x)));
  mask-image: linear-gradient(to right,
    transparent var(--hero-pad-x),
    black calc(var(--hero-pad-x) + 90px),
    black calc(100% - var(--hero-pad-x) - 90px),
    transparent calc(100% - var(--hero-pad-x)));
}

/* pulsanti dentro la hero card: solo su mobile */
.hero__buttons {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---------- connect card ---------- */
.connect {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.5vw, 36px);
}

.connect__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.connect__links {
  list-style: none;
  flex: 1;
}

.connect__links a {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  font-weight: 500;
  color: #A6A6A6;
  transition: color 0.2s;
}

.connect__links a:hover { color: var(--accent); }

.connect__buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--accent {
  background: var(--accent-grad);
  color: #0A0A0A;
}

.btn--accent:hover { box-shadow: 0 6px 24px rgba(182, 255, 46, 0.25); }

.btn--light {
  background: #F2F2F2;
  color: #0A0A0A;
}

/* ---------- work ---------- */
/* padding orizzontale = gutter delle card, così le cover sono a filo;
   niente titolo: la griglia segue direttamente le card hero */
.work { padding: 0 var(--gutter) clamp(14px, 2vw, 20px); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover img,
.card:focus-visible img {
  transform: scale(1.04);
}

.card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.35));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover .card__overlay,
.card:focus-visible .card__overlay {
  opacity: 1;
}

.card__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

.card__area {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- brands marquee ---------- */
.brands {
  padding: clamp(36px, 5vw, 64px) 0;
  overflow: hidden;
}

.brands .label { padding: 0 clamp(24px, 4vw, 56px); }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  padding-right: clamp(48px, 7vw, 96px);
}

.marquee__group img {
  height: var(--h, 32px);
  width: auto;
  opacity: 0.72;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- mantra: Making sound + servizi rotanti ---------- */
.mantra__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 32px);
  letter-spacing: -0.015em;
  line-height: 1.2;
  max-width: 20em;
}

.mantra__green { color: var(--text); }
.mantra__grey { color: #9A9A9A; }

.marquee__track--pills {
  animation-duration: 30s;
}

.marquee__group--pills {
  gap: 12px;
  padding-right: 12px;
}

.pill {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid #2E2E2E;
  border-radius: 999px;
  background: #1A1A1A;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.pill:hover {
  background: var(--accent-grad);
  border-color: transparent;
  color: #0A0A0A;
}

/* ---------- footer ---------- */
.footer {
  padding: 28px var(--pad) 40px;
  text-align: center;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(6px);
  padding: clamp(16px, 4vw, 48px);
}

.lightbox[hidden] { display: none; }

.lightbox__frame {
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.lightbox__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lightbox__close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-row { grid-template-columns: 1fr; }
  .connect { display: none; }        /* su mobile la card Connect sparisce */
  .hero__buttons { display: flex; }  /* ...e i pulsanti vivono nella hero card */
}

@media (max-width: 560px) {
  .work__grid { grid-template-columns: 1fr; }
}
