/* ============================================================
   STYLE.CSS — Global styles
   Achraf Aamiri Portfolio
   ============================================================ */

/* ---- RESET & BOX SIZING ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- CSS VARIABLES ---- */
:root {
  --ink: #0a0a0a;
  --paper: #f7f5f0;
  --warm: #ede9e0;
  --green: #1c5c44;
  --green-mid: #2d7a5e;
  --green-light: #4aad87;
  --sand: #c8b89a;
  --muted: #7a7570;
  --border: rgba(10, 10, 10, 0.1);
}

/* ---- BASE ---- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  transition: background 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  background: rgba(247, 245, 240, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

/* Nav su sfondo scuro (hero dark) */
nav.nav-on-dark:not(.scrolled) .nav-logo            { color: #fff; }
nav.nav-on-dark:not(.scrolled) .nav-links a         { color: rgba(255,255,255,0.55); }
nav.nav-on-dark:not(.scrolled) .nav-links a:hover,
nav.nav-on-dark:not(.scrolled) .nav-links a.active  { color: #fff; }
nav.nav-on-dark:not(.scrolled) .nav-hamburger span  { background: #fff; }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-logo span {
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--paper) !important;
  padding: 0.55rem 1.3rem;
  border-radius: 100px;
  font-size: 0.78rem !important;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  background: var(--green) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

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

.nav-mobile a {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-mobile a:hover {
  color: var(--green);
}

.nav-mobile a.active {
  color: var(--green);
}

/* ---- MARQUEE ---- */
.marquee-strip {
  background: var(--ink);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
}

.marquee-track span {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}

.marquee-track .dot {
  color: var(--green-light);
  font-size: 1.2rem;
  line-height: 0;
  vertical-align: middle;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(28, 92, 68, 0.25);
}

.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(28, 92, 68, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  padding: 0.9rem 2rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}

/* ---- FOOTER ---- */
footer {
  background: var(--ink);
  padding: 3rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.footer-logo span {
  color: var(--green-light);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 5% 5rem;
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(28, 92, 68, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.page-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--green);
}

.page-hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--ink);
  max-width: 800px;
}

.page-hero-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}

/* ---- TAG PILLS ---- */
.tag {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  border: 1.5px solid rgba(28, 92, 68, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

@media (max-width: 600px) {
  footer {
    flex-direction: column;
    text-align: center;
  }
}
