/* =========================================================
   ALESSANDRO BIGARDI — SPORT COMMUNICATION
   Shared stylesheet for multipage website
   ========================================================= */

/* 1. VARIABLES */

:root {
  --bg: #050505;
  --text: #f2f2f2;
  --soft: #cdcdcd;
  --muted: #929292;
  --line: #262626;
  --accent: #ff7a00;

  --max-width: 1480px;
  --outer: 30px;

  --space-section: 82px;
  --space-large: 110px;
  --space-medium: 42px;
  --space-small: 12px;

  --font-display: "Urbanist", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

/* 2. RESET / BASE */

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* 3. LAYOUT */

.page {
  width: min(calc(100% - (var(--outer) * 2)), var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section-label {
  margin: 0 0 28px;
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.section-end {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-medium);
}

.back-to-top {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--muted);
}

.back-to-top:hover {
  color: var(--text);
  border-color: var(--text);
}

/* 4. HEADER / BRAND / NAVIGATION */

.site-header {
  padding-block: 34px 30px;
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-block;
  font-family: var(--font-display);
  line-height: 0.95;
}

.brand-name {
  display: block;
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 4.6rem);
  font-weight: 500;
  line-height: 0.95;
  white-space: nowrap;
}

.brand-payoff {
  display: block;
  margin: 5px 0 0;
  font-size: clamp(1.25rem, 2vw, 2.1rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--accent);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  padding-top: 4px;
  font-size: 0.92rem;
  color: var(--muted);
}

.main-nav a {
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--text);
}

/* 5. HOMEPAGE HERO */

.home-hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 34px 70px;
}

.home-hero .site-header-inner {
  display: block;
}

.home-hero .brand-name {
  font-size: clamp(3.4rem, 8vw, 8rem);
}

.home-hero .brand-payoff {
  margin-top: 6px;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
}

.home-hero .main-nav {
  justify-content: flex-start;
  margin-top: 30px;
  padding-top: 0;
}

.professional-intro {
  max-width: 760px;
  margin: 48px 0 0;
  font-size: clamp(1.15rem, 1.55vw, 1.4rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--soft);
}

.hero-copy {
  max-width: 1000px;
  margin-top: 76px;
  font-family: var(--font-display);
}

.hero-copy p {
  margin: 0;
  font-size: clamp(3rem, 6.4vw, 6rem);
  font-weight: 300;
  line-height: 0.96;
  text-wrap: balance;
}

.hero-copy span {
  display: block;
  color: var(--soft);
}

/* 6. INTERNAL PAGE INTRO */

.page-intro {
  max-width: 980px;
  padding-block: 72px 34px;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 7.6rem);
  font-weight: 300;
  line-height: 0.96;
  text-wrap: balance;
}

.page-lead {
  max-width: 820px;
  margin: 34px 0 0;
  font-size: clamp(1.12rem, 1.55vw, 1.45rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--soft);
}

/* 7. PROJECTS OVERVIEW */

.project-entry + .project-entry {
  margin-top: var(--space-large);
  padding-top: var(--space-large);
  border-top: 1px solid var(--line);
}

.project-block {
  display: grid;
  grid-template-columns: minmax(320px, 44%) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: start;
}

.project-main-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #111;
}

.project-main-image img,
.project-gallery img,
.archive-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-copy {
  padding-top: 2px;
}

.project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 7.8rem);
  font-weight: 300;
  line-height: 0.96;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.project-description {
  max-width: clamp(22rem, 55%, 34ch);
  margin: 42px 0 0;
  font-size: clamp(1.08rem, 1.55vw, 1.45rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--soft);
}

.project-link {
  display: inline-block;
  margin-top: 30px;
  padding-bottom: 4px;
  border-bottom: 1px solid #666;
  font-size: 0.95rem;
  color: var(--text);
}

.project-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.project-gallery {
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-small);
  margin-top: 50px;
}

.project-gallery figure {
  overflow: hidden;
  background: #111;
}

.project-gallery .vertical {
  aspect-ratio: 4 / 5;
}

.project-gallery .horizontal {
  aspect-ratio: 4 / 3;
}

/* 8. PROJECT DETAIL PAGE */

.project-page-header {
  padding-block: 72px 54px;
  border-bottom: 1px solid var(--line);
}

.project-page-meta {
  margin: 0 0 18px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.project-page-title {
  max-width: 1180px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8vw, 8.8rem);
  font-weight: 300;
  line-height: 0.94;
  text-wrap: balance;
}

.project-page-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: start;
}

.project-page-body {
  max-width: 780px;
}

.project-page-body p {
  margin: 0 0 1.4em;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--soft);
}

.project-page-body h2 {
  margin: 2.4em 0 0.7em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
}

.project-facts {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.project-facts dl {
  margin: 0;
}

.project-facts-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
}

.project-facts dt,
.project-facts dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.project-facts dt {
  color: var(--muted);
}

.project-facts dd {
  color: var(--soft);
}

.full-width-media {
  margin-top: 54px;
  overflow: hidden;
  background: #111;
}

.full-width-media img {
  width: 100%;
}

/* 9. ARCHIVE */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-small);
}

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

.archive-item img {
  transition: transform 0.5s ease;
}

.archive-item:hover img {
  transform: scale(1.015);
}

/* 10. ABOUT */

.about-grid {
  max-width: 950px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.about-photo {
  width: 120px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111;
}

.about-copy {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--soft);
}

.about-copy strong {
  font-weight: 400;
  color: var(--text);
}

.about-longform {
  max-width: 840px;
}

.about-longform p {
  margin: 0 0 1.4em;
  font-size: clamp(1.05rem, 1.35vw, 1.28rem);
  font-weight: 300;
  line-height: 1.68;
  color: var(--soft);
}

/* 11. CONTACT */

.contact-links {
  width: max-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1rem;
  color: var(--soft);
}

.contact-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 12. FOOTER */

.footer-wrapper {
  border-top: 1px solid var(--line);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding-block: 30px 28px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
}

.footer-right {
  text-align: right;
}

.footer-site-link {
  display: inline-block;
  margin-top: 8px;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  color: var(--accent);
  font-weight: 300;
}

.footer-site-link:hover {
  border-color: var(--accent);
}

/* 13. UTILITIES */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 14. RESPONSIVE */

@media (max-width: 900px) {
  .home-hero {
    min-height: 70vh;
  }

  .site-header-inner {
    flex-direction: column;
    gap: 26px;
  }

  .main-nav {
    justify-content: flex-start;
    padding-top: 0;
  }

  .project-block {
    grid-template-columns: minmax(240px, 40%) minmax(0, 1fr);
    gap: 34px;
  }

  .project-page-content {
    grid-template-columns: 1fr;
  }

  .project-facts {
    max-width: 680px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --outer: 20px;
    --space-section: 62px;
    --space-large: 76px;
  }

  .site-header {
    padding-block: 24px 24px;
  }

  .brand-name {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
    white-space: normal;
  }

  .brand-payoff {
    font-size: clamp(1.2rem, 5.8vw, 1.9rem);
  }

  .main-nav {
    gap: 8px 18px;
    font-size: 0.92rem;
  }

  .home-hero {
    min-height: auto;
    padding-block: 24px 50px;
  }

  .home-hero .brand-name {
    font-size: clamp(2.4rem, 10.2vw, 3.6rem);
  }

  .home-hero .brand-payoff {
    margin-top: 4px;
    font-size: clamp(1.3rem, 6vw, 1.9rem);
    white-space: nowrap;
  }

  .home-hero .main-nav {
    margin-top: 28px;
  }

  .professional-intro {
    max-width: 22rem;
    margin-top: 42px;
    font-size: 1.08rem;
    line-height: 1.55;
  }

  .hero-copy {
    margin-top: 76px;
  }

  .hero-copy p {
    font-size: clamp(2.45rem, 11.2vw, 3.9rem);
    line-height: 0.96;
  }

  .page-intro,
  .project-page-header {
    padding-block: 54px 28px;
  }

  .project-block {
    grid-template-columns: 1fr;
  }

  .home-projects .project-main-image {
    max-width: 84%;
  }

  .project-page .project-main-image {
    max-width: 100%;
  }

  .project-title {
    font-size: clamp(3.4rem, 17vw, 5.6rem);
  }

  .project-description {
    margin-top: 28px;
  }

  .project-gallery {
    max-width: 100%;
    margin-top: 38px;
    gap: 8px;
  }

  .project-facts-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  .archive-grid {
    gap: 8px;
  }

  .about-grid {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 22px;
  }

  .about-photo {
    width: 88px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-right {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .home-hero .brand-payoff {
    white-space: normal;
  }

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

  .project-gallery {
    grid-template-columns: 1fr;
  }

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

  .about-photo {
    width: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
