/* ------------------------------------------------------------------
   pedrovictor.com
   Black background. Neutral greys. One typeface family, one mono.
   ------------------------------------------------------------------ */

:root {
  --bg:        #000000;
  --bg-2:      #0a0a0a;
  --bg-3:      #111111;
  --text:      #e6e6e6;
  --text-2:    #a8a8a8;
  --muted:     #6b6b6b;
  --dim:       #2a2a2a;
  --line:      rgba(255, 255, 255, .10);
  --line-2:    rgba(255, 255, 255, .22);

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 500; }
::selection { background: var(--text); color: var(--bg); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* masked line reveal: the text slides up from behind a clip, once, when in view */
.mask { display: block; overflow: hidden; }
.mask > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: var(--d, 0s); }
.mask.is-in > span { transform: none; }

/* reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 110; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--text); }

/* ------------------------------------------------------------------
   Nav
   ------------------------------------------------------------------ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 22px 0; transition: padding .4s var(--ease), background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { padding: 14px 0; background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav__brand { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.nav__links { position: relative; display: flex; gap: 28px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.nav__links a { padding: 4px 0; transition: color .3s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
/* indicator slides under the active section's link */
.nav__ind {
  position: absolute; bottom: -2px; left: 0; height: 1px; width: 0;
  background: var(--text); opacity: 0;
  transition: left .5s var(--ease), width .5s var(--ease), opacity .3s;
}
.nav__clock { text-align: right; }
@media (max-width: 720px) {
  .nav { padding: 16px 0; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__clock { display: none; }
  .nav__links { gap: 16px; }
  .nav__links a[data-section="press"] { display: none; }
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 48px; overflow: hidden; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .9; }
.hero__inner { position: relative; }
.hero__label { margin-bottom: 28px; color: var(--text-2); }
.hero__title {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 132px);
  line-height: .98; letter-spacing: -.035em;
  margin: 0 0 56px;
}
.hero__title .mask:nth-child(1) > span { --d: .05s }
.hero__title .mask:nth-child(2) > span { --d: .13s }
.hero__title .mask:nth-child(3) > span { --d: .21s }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero__lead { max-width: 60ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--text-2); }
.hero__lead > span { --d: .35s }
.hero__lead a { color: var(--text); border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.hero__lead a:hover { border-color: var(--text); }
.hero__scroll { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); transition: color .3s; }
.hero__scroll:hover { color: var(--text); }
.hero__scroll svg { animation: nudge 2.4s var(--ease-io) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(6px) } }
@media (max-width: 720px) {
  .hero { padding-top: 110px; }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}

/* ------------------------------------------------------------------
   Facts
   ------------------------------------------------------------------ */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 40px 28px 40px 0; display: flex; flex-direction: column; gap: 10px; }
.fact + .fact { padding-left: 28px; border-left: 1px solid var(--line); }
.fact__num { font-family: var(--display); font-size: clamp(40px, 4.6vw, 64px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fact__label { font-size: 13px; color: var(--muted); max-width: 24ch; }
@media (max-width: 860px) {
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 28px 20px 28px 0; }
  .fact + .fact { padding-left: 20px; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(4) { border-top: 1px solid var(--line); }
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */
.section { padding: clamp(96px, 12vw, 180px) 0; }
.section__head { margin-bottom: clamp(48px, 6vw, 88px); }
.section__label { margin-bottom: 20px; }
.section__title { font-family: var(--display); font-size: clamp(32px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -.03em; }

/* ---------- About: words brighten as you scroll past them ---------- */
.about { border-bottom: 1px solid var(--line); }
.about__inner { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.about__text {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(24px, 3vw, 42px); line-height: 1.25; letter-spacing: -.02em;
  max-width: 24em;
}
.about__text .w { color: var(--dim); transition: color .25s linear; }
.about__text .w.is-lit { color: var(--text); }
@media (max-width: 860px) { .about__inner { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Timeline: a rail that fills as you scroll ---------- */
.tl { position: relative; display: grid; grid-template-columns: 1px minmax(0, 1fr); gap: 0 56px; }
.tl__rail { position: relative; width: 1px; background: var(--line); }
.tl__rail-fill { position: absolute; top: 0; left: 0; width: 100%; height: 0; background: var(--text); }
.tl__list { border-top: 1px solid var(--line); }
.tl__item {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px;
  padding: 44px 0; border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color .5s;
}
.tl__item.is-active { color: var(--text); }
.tl__meta { display: flex; flex-direction: column; gap: 8px; color: inherit; }
.tl__idx { color: inherit; }
.tl__year { color: inherit; }
.tl__body h3 { font-family: var(--display); font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 12px; color: inherit; }
.tl__body p { max-width: 58ch; font-size: 16px; color: inherit; opacity: .8; }
.tl__src { margin-top: 16px; text-transform: none; letter-spacing: 0; }
.tl__src a { color: inherit; border-bottom: 1px solid var(--line-2); transition: color .3s, border-color .3s; }
.tl__item.is-active .tl__src a:hover { color: var(--text); border-color: var(--text); }
.tl__body figure { margin: 24px 0 0; max-width: 640px; }
.tl__body img { width: 100%; height: auto; display: block; filter: grayscale(1) contrast(1.05); transition: filter .6s; }
.tl__item.is-active img { filter: none; }
.tl__body figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
@media (max-width: 860px) {
  .tl { grid-template-columns: 1px minmax(0, 1fr); gap: 0 20px; }
  .tl__item { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .tl__meta { flex-direction: row; justify-content: space-between; }
}

/* ---------- Companies: rows, not cards ---------- */
.companies { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.co { border-top: 1px solid var(--line); }
.co__row {
  display: grid; grid-template-columns: 60px minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 34px 0; border-bottom: 1px solid var(--line);
  position: relative;
}
.co__row::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--text); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.co__row:hover::before { transform: scaleX(1); }
.co__name { font-family: var(--display); font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -.035em; transition: transform .6s var(--ease); }
.co__row:hover .co__name { transform: translateX(10px); }
.co__what { color: var(--text-2); font-size: 15px; }
.co__link { color: var(--muted); transition: color .3s; display: inline-flex; gap: 8px; align-items: center; }
.co__link i { font-style: normal; display: inline-block; transition: transform .5s var(--ease); }
.co__row:hover .co__link { color: var(--text); }
.co__row:hover .co__link i { transform: translate(3px, -3px); }
.co__note { margin-top: 28px; }
@media (max-width: 720px) {
  .co__row { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; padding: 26px 0; }
  .co__what { grid-column: 2; }
  .co__link { grid-column: 2; }
  .co__row:hover .co__name { transform: none; }
}

/* ---------- Exits: the arrow draws itself when in view ---------- */
.ex { border-top: 1px solid var(--line); }
.ex__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 40px 0; border-bottom: 1px solid var(--line);
}
.ex__from, .ex__to { font-family: var(--display); font-size: clamp(30px, 4.4vw, 64px); line-height: 1; letter-spacing: -.035em; }
.ex__to { opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ease) .9s, transform .6s var(--ease) .9s; }
.ex__row.is-in .ex__to { opacity: 1; transform: none; }
.ex__arrow { width: 100%; height: 24px; overflow: visible; }
.ex__arrow path { fill: none; stroke: var(--text-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; }
.ex__row.is-in .ex__arrow path { animation: draw 1s var(--ease-io) forwards; }
.ex__row.is-in .ex__arrow .ex__head { animation-delay: .75s; animation-duration: .4s; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.ex__when { text-align: right; }
@media (max-width: 720px) {
  .ex__row { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); row-gap: 10px; }
  .ex__when { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Press ---------- */
.press { border-top: 1px solid var(--line); }
.pr { border-top: 1px solid var(--line); }
.pr__row {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: baseline; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  color: var(--text-2); transition: color .3s;
}
.pr__row:hover { color: var(--text); }
.pr__title { font-size: 17px; font-weight: 400; }
.pr__outlet { white-space: nowrap; transition: color .3s; }
.pr__outlet i { font-style: normal; display: inline-block; transition: transform .5s var(--ease); }
.pr__row:hover .pr__outlet { color: var(--text); }
.pr__row:hover .pr__outlet i { transform: translate(3px, -3px); }
@media (max-width: 720px) {
  .pr__row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(64px, 8vw, 120px); }
.contact__mail {
  display: inline-block; margin-top: 8px;
  font-family: var(--display); font-size: clamp(28px, 6.4vw, 96px); line-height: 1; letter-spacing: -.04em;
  position: relative;
}
.contact__mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--text); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.contact__mail:hover::after { transform: scaleX(1); transform-origin: left; }
.contact__note { margin-top: 28px; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .mask > span { transform: none; transition: none; }
  .hero__scroll svg { animation: none; }
  .about__text .w { color: var(--text); }
  .ex__to { opacity: 1; transform: none; transition: none; }
  .ex__arrow path { stroke-dashoffset: 0; }
  .hero__field { display: none; }
}
