/* ÉcoWatt – Local Portfolio Site */

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

:root {
  --bg: #000000;
  --bg-card: #111111;
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --green: #b5f23d;
  --green-dim: #8ec42a;
  --border: #222222;
  --nav-height: 80px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Navigation ─────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 100;
  box-sizing: border-box;
}

.nav-logo {
  height: 32px;
  width: auto;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
  align-self: center;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-brand .sub {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  align-self: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.15s;
}

.nav-links a:hover {
  opacity: 0.7;
}

.nav-translate-btn {
  background: transparent;
  border: 1px solid rgba(181,242,61,0.4);
  color: #b5f23d;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-translate-btn:hover {
  background: rgba(181,242,61,0.1);
  border-color: #b5f23d;
}

.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Page shell ─────────────────────────────────── */

.page {
  padding-top: var(--nav-height);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2.5rem 8rem;
}

/* ── Typography ─────────────────────────────────── */

h1 {
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--green);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green);
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green);
  margin: 2rem 0 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
}

p.intro {
  font-style: italic;
  color: var(--text-muted);
}

ol, ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

strong {
  font-weight: 600;
  color: var(--text);
}

em {
  font-style: italic;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-dim);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Hero (home page) ───────────────────────────── */

.hero {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  margin-bottom: 0.75rem;
}

.hero .tagline {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 3rem;
}

.hero .scroll-hint {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero .scroll-hint::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--text-muted);
}

/* ── Project cards (home page) ───────────────────── */

.projects {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.project-card {
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.project-card:hover .card-title {
  color: var(--green);
}

.card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  padding-top: 0.2rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--text);
  transition: color 0.15s;
}

.card-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Team page ──────────────────────────────────── */

.team-grid {
  display: flex;
  flex-direction: column;
}

.team-member {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 5rem;
  padding: 5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  align-items: center;
}

.team-member:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.member-pfp {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
  cursor: pointer;
}

.member-pfp:hover {
  filter: grayscale(0%);
}

.member-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.member-name {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.member-bio {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  max-width: 520px;
}

/* ── Stat blocks (interviews) ───────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.stat-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.stat-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
}

.stat-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
}

.stat-block li {
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}

.stat-block li span {
  color: var(--green);
  font-weight: 600;
}

.interview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Persona cards ──────────────────────────────── */

.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.persona-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--green);
  border-radius: 6px;
  padding: 1.75rem;
}

.persona-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  color: var(--green);
}

.persona-card .persona-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
  display: block;
}

.persona-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Quote callout ──────────────────────────────── */

.quote-callout {
  border-left: 3px solid var(--green);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Photo gallery (homepage) ───────────────────── */
.gallery-section {
  width: 100%;
  background: #000;
  padding: 0;
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
}

/* first tall column */
.gallery-tall {
  grid-row: span 2;
}

/* centre mosaic: 2x2 sub-grid */
.gallery-mosaic {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-sub-top,
.gallery-sub-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  flex: 1;
}

/* third column: stack 3 items */
.gallery-grid > .gallery-item:not(.gallery-tall):not(.gallery-mosaic) {
  /* handled by auto-placement */
}

.gallery-item {
  overflow: hidden;
  background: #111;
  aspect-ratio: 4/3;
}

.gallery-tall {
  aspect-ratio: unset;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-tall { grid-row: span 1; }
  .gallery-mosaic { display: contents; }
  .gallery-sub-top, .gallery-sub-bottom { display: contents; }
  .gallery-item { aspect-ratio: 1; }
}

/* ── Design principles table ────────────────────── */
.design-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.design-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.92rem;
}

.design-table th {
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}

.design-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  vertical-align: middle;
  line-height: 1.55;
}

.design-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-yellow { background: rgba(234,179,8,0.18);  color: #fbbf24; border: 1px solid rgba(234,179,8,0.3); }
.badge-green  { background: rgba(74,222,128,0.15); color: #86efac; border: 1px solid rgba(74,222,128,0.3); }
.badge-orange { background: rgba(249,115,22,0.15); color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }
.badge-red    { background: rgba(248,113,113,0.15);color: #fca5a5; border: 1px solid rgba(248,113,113,0.3); }

/* ── Product stat highlights ────────────────────── */
.product-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.product-stat {
  background: rgba(181,242,61,0.07);
  border: 1px solid rgba(181,242,61,0.2);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: #b5f23d;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .product-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Persona images ─────────────────────────────── */
.persona-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  display: block;
  margin-bottom: 1.25rem;
}

/* ── Video embed ─────────────────────────────────── */
.video-wrap {
  width: 100%;
  margin: 2.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.video-wrap video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
}

/* ── Process image ───────────────────────────────── */
.process-img-wrap {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.process-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ── PDF embed ───────────────────────────────────── */
.pdf-wrap {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-embed {
  width: 100%;
  height: 80vh;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: #111;
}

.pdf-download {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b5f23d;
  border: 1px solid rgba(181,242,61,0.35);
  border-radius: 6px;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.pdf-download:hover {
  background: rgba(181,242,61,0.1);
  color: #b5f23d;
}

/* ── Footer ─────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Hamburger ──────────────────────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #b5f23d;
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 900px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 2rem 2rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    z-index: 99;
    height: auto;
    margin: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    height: auto;
  }

  .nav-translate-btn {
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 0 1.25rem;
  }

  .hero {
    padding: calc(var(--nav-height) + 2rem) 1.25rem 3rem;
  }

  .container {
    padding: 3rem 1.25rem 5rem;
  }

  .project-card,
  .team-member {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }
}
