/* Torrie Jones portfolio. Apple Marcom inspired design language. */

:root {
  --bg: #000000;
  --surface: #101013;
  --text: #f5f5f7;
  --muted: #86868b;
  --hairline: rgba(255, 255, 255, 0.12);
  --accent: #2997ff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad-x: clamp(20px, 6vw, 80px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease;
}
.nav.scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a { color: var(--muted); transition: color 0.25s ease; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--hairline);
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.25s ease;
}
.nav-cta:hover { background: rgba(255, 255, 255, 0.18); }

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

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(140px, 22vh, 220px) var(--pad-x) clamp(60px, 10vh, 110px);
}

.hero-eyebrow {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.hero-headline {
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.hero-headline .dim { color: var(--muted); }

.hero-sub {
  max-width: 560px;
  margin-top: 30px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(50px, 8vh, 90px);
  padding-top: 36px;
  border-top: 1px solid var(--hairline);
}

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---------- Brand strip ---------- */

.brands {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(70px, 12vh, 130px);
  text-align: center;
}

.brands-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 26px;
}

.brands-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 26px clamp(30px, 4.5vw, 56px);
}

.brand-logo {
  display: block;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.brand-logo:hover { opacity: 0.9; }

.logo-apple { height: 30px; }
.logo-akai { height: 22px; }
.logo-ni { height: 24px; }
.logo-moises { height: 17px; }
.logo-motiversity { height: 13px; }
.logo-athletic { height: 19px; }

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

main { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad-x); }

.section-head { padding: clamp(40px, 8vh, 90px) 0 clamp(36px, 6vh, 64px); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head h2,
.about h2,
.contact h2 {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

/* ---------- Feature case studies ---------- */

.feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vh, 56px) 0;
}
.feature.flip .feature-media { order: 2; }
.feature.flip .feature-text { order: 1; }

.feature-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.feature-media img {
  transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.feature-media:hover img { transform: scale(1.035); }

.feature-text h3 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.feature-text .dim-inline { color: var(--muted); font-weight: 600; }

.feature-text p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.chips li {
  font-size: 12px;
  font-weight: 500;
  color: rgba(245, 245, 247, 0.75);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 13px;
  letter-spacing: 0.02em;
}

/* ---------- Work grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.card {
  display: block;
}
.card-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}
.card-media img { transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1); }
.card:hover .card-media img { transform: scale(1.04); }

.card-text { padding: 16px 4px 6px; }
.card-text h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.card-text p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 3px;
}

.archive-link {
  text-align: center;
  padding: clamp(44px, 7vh, 80px) 0 clamp(30px, 5vh, 60px);
  font-size: 17px;
}
.archive-link a {
  color: var(--accent);
  transition: opacity 0.25s ease;
}
.archive-link a:hover { opacity: 0.75; }

/* ---------- About ---------- */

.about {
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, #060607 0%, #000 100%);
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) var(--pad-x);
}

.about-copy {
  max-width: 720px;
  margin-top: 28px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: rgba(245, 245, 247, 0.85);
  letter-spacing: -0.01em;
}

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(44px, 7vh, 72px);
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
}
.about-cols h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}
.about-cols p { color: rgba(245, 245, 247, 0.8); font-size: 16px; line-height: 1.6; }

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

.contact {
  text-align: center;
  padding: clamp(90px, 16vh, 170px) var(--pad-x);
  border-top: 1px solid var(--hairline);
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  background: var(--text);
  color: #000;
}
.btn-primary:hover { transform: scale(1.03); background: #fff; }
.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.7); transform: scale(1.03); }

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

.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--pad-x) 44px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Case study pages ---------- */

.case-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(120px, 18vh, 180px) var(--pad-x) clamp(36px, 6vh, 64px);
}

.case-title {
  font-size: clamp(36px, 5.6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.case-lead {
  max-width: 680px;
  margin-top: 24px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.case-media {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
}

.media-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.media-item img { width: 100%; height: auto; }
.media-item.video {
  aspect-ratio: 16 / 9;
}
.media-item.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.case-pager {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(50px, 9vh, 90px) var(--pad-x) clamp(30px, 5vh, 50px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.pager-link { display: flex; flex-direction: column; gap: 4px; max-width: 40%; }
.pager-link.next { text-align: right; }
.pager-link.all {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 20px;
  flex-direction: row;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.pager-link.all:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }
.pager-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pager-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: color 0.25s ease;
}
.pager-link:hover .pager-title { color: var(--accent); }

@media (max-width: 640px) {
  .case-pager { flex-wrap: wrap; }
  .pager-link.all { order: 3; margin: 18px auto 0; }
  .pager-link { max-width: 46%; }
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feature-media img, .card-media img { transition: none; }
}

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

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip .feature-media { order: 0; }
  .feature.flip .feature-text { order: 1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
}

@media (max-width: 640px) {
  .hero-headline br, .section-head h2 br, .about h2 br, .contact h2 br { display: none; }
  .grid { grid-template-columns: 1fr; }
  .about-cols { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .contact-actions { flex-direction: column; align-items: center; }
}
