/* ===========================================================
   Leo Gatell — Portfolio
   =========================================================== */

:root {
  --bg: #0a0a0c;
  --bg-alt: #101013;
  --panel: #141417;
  --panel-border: #232227;
  --text: #f2ede2;
  --text-dim: #b3ada0;
  --text-faint: #77726a;
  --gold: #cda434;
  --gold-bright: #e8c869;
  --gold-dim: #8a6f28;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

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

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(205, 164, 52, 0.12);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand span { color: var(--gold); font-style: italic; font-weight: 500; }
.brand.small { font-size: 1.1rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  transition: color 0.25s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--gold-bright); }

.main-nav .nav-cta {
  border: 1px solid var(--gold-dim);
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--gold-bright);
}
.main-nav .nav-cta:hover {
  background: var(--gold);
  color: #0a0a0c;
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--gold-bright);
  width: 100%;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(205, 164, 52, 0.14) 0%, rgba(205, 164, 52, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 780px;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 1;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.hero-name span { font-style: italic; color: var(--gold-bright); font-weight: 500; }

.hero-roles {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 20px;
  line-height: 1.7;
}
.hero-roles .dot { color: var(--gold-dim); margin: 0 4px; }

.hero-impact {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--gold-bright);
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  transition: all 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #0a0a0c;
  box-shadow: 0 8px 24px rgba(205, 164, 52, 0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(205, 164, 52, 0.28); }
.btn-outline {
  border: 1px solid rgba(242, 237, 226, 0.25);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim));
}
.scroll-cue span {
  position: absolute;
  top: 0;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: scrollDown 2.2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { top: 0; opacity: 0; }
  30% { opacity: 1; }
  100% { top: 46px; opacity: 0; }
}

/* ---------- Stats band ---------- */

.stats-band {
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  background: var(--bg-alt);
  padding: 64px 0;
}

.stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--gold-bright);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.stat-label small { color: var(--text-faint); font-size: 0.78rem; }

/* ---------- Section heads ---------- */

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head h2 em { color: var(--gold-bright); font-style: italic; }

.gold-rule {
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.gold-rule.center { margin-left: auto; margin-right: auto; background: var(--gold); }

.section-head.center { text-align: center; margin-bottom: 56px; }
.contact-sub {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 1rem;
}

/* ---------- Story ---------- */

.story { padding: 120px 0; }

.story-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
}

.story-head { position: sticky; top: 120px; align-self: start; }

.story-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0;
}
.story-head h2 em { color: var(--gold-bright); font-style: italic; font-weight: 400; }

.story-body p {
  font-size: 1.08rem;
  color: var(--text-dim);
  margin: 0 0 22px;
  line-height: 1.85;
}

.story-year {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 6px !important;
}

.story-close {
  color: var(--text) !important;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem !important;
  border-left: 2px solid var(--gold);
  padding-left: 20px;
  margin-top: 32px !important;
}

/* ---------- Pillars ---------- */

.pillars { padding: 100px 0; background: var(--bg-alt); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 36px 30px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.pillar-card:hover {
  border-color: rgba(205, 164, 52, 0.4);
  transform: translateY(-4px);
}

.pillar-index {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-dim);
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.pillar-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  margin: 0 0 10px;
  line-height: 1.35;
}

.pillar-brand {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.pillar-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 22px;
}

.pillar-link {
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.pillar-link:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

/* ---------- Timeline ---------- */

.timeline-section { padding: 120px 0; }

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
  border-left: 1px solid var(--panel-border);
}

.tl-item {
  position: relative;
  padding-bottom: 56px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(205, 164, 52, 0.15);
}

.tl-year {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.tl-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.tl-content p {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.7;
  margin: 0;
  max-width: 520px;
}

/* ---------- Manifesto ---------- */

.manifesto {
  padding: 130px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.manifesto-inner {
  max-width: 720px;
  text-align: center;
  position: relative;
}

.quote-mark {
  display: block;
  font-family: var(--serif);
  font-size: 5rem;
  color: var(--gold-dim);
  line-height: 1;
  margin-bottom: 8px;
}

.manifesto-inner p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0 0 26px;
}

.manifesto-close {
  color: var(--text) !important;
  font-style: italic;
}

.signature {
  display: block;
  margin-top: 20px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------- Contact ---------- */

.contact { padding: 120px 0 140px; }

.contact-form {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-row label {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-faint);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(205, 164, 52, 0.15);
}

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23cda434' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-row select option {
  background: var(--panel);
  color: var(--text);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--sans);
  line-height: 1.6;
}

.form-submit {
  align-self: center;
  min-width: 220px;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  margin-top: 6px;
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.form-status {
  text-align: center;
  font-size: 0.92rem;
  margin: 0;
  padding-top: 4px;
}
.form-status.is-success { color: var(--gold-bright); }
.form-status.is-error { color: #e0745a; }

.contact-form.is-sent .form-row,
.contact-form.is-sent .form-submit {
  display: none;
}
.contact-form.is-sent .form-status {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  padding: 12px 0 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px 0 40px;
  text-align: center;
  border-top: 1px solid var(--panel-border);
}
.footer-inner p {
  color: var(--text-faint);
  font-size: 0.85rem;
  max-width: 520px;
  margin: 14px auto 0;
  line-height: 1.6;
}
.footer-copy { margin-top: 8px !important; font-size: 0.78rem !important; }

/* ---------- Reveal on scroll ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-head { position: static; }
  .pillars-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--bg);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid rgba(205, 164, 52, 0.12);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--panel-border);
    font-size: 0.95rem;
  }
  .main-nav .nav-cta {
    margin-top: 12px;
    text-align: center;
    border-bottom: 1px solid var(--gold-dim);
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .form-grid-2 { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 520px) {
  .hero { padding-top: 120px; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .story, .pillars, .timeline-section, .manifesto, .contact { padding-top: 80px; padding-bottom: 80px; }
  .timeline { padding-left: 24px; }
  .tl-item::before { left: -29px; }
  .contact-form { padding: 32px 22px; }
}
