/* rodgerwang.com — recreated from the Squarespace design tokens
   Original: Halyard Display 300 (Adobe Fonts). Substitute: Figtree 300 (Google Fonts). */

:root {
  --font: "Figtree", "Halyard Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --black: #000;
  --ink: #171717;          /* Squarespace "accent" */
  --dark: #39393b;         /* Squarespace "darkAccent" — homepage background */
  --light: #f0f0f0;        /* Squarespace "lightAccent" */
  --white: #fff;
  --muted: #6b6b6b;

  --h1: 2.5rem;
  --h2: 1.7rem;
  --h3: 1.5rem;
  --h4: 1.3rem;
  --gutter: 18px;
  --pad: clamp(20px, 4vw, 60px);
  --max: 1400px;
  --header-h: 96px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { opacity: .7; }

h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.25;
  margin: 2rem 0 1rem;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); margin: 1rem 0 1.5rem; color: var(--muted); }
p { margin: 1rem 0; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  height: var(--header-h);
  position: relative;
  z-index: 20;
}
.site-title {
  font-size: 1.5rem;
  letter-spacing: .02em;
  text-decoration: none;
}
.site-nav { display: flex; gap: 2.2rem; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; }

.menu-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: inherit;
  width: 44px; height: 44px; position: relative; z-index: 30;
}
.menu-toggle span {
  display: block; height: 1px; background: currentColor; width: 24px; margin: 7px auto; transition: transform .25s;
}
.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Pages with a full-bleed hero or the homepage: header floats over the image */
.home .site-header,
.has-hero .site-header { position: absolute; top: 0; left: 0; right: 0; color: var(--white); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 3rem var(--pad);
  text-align: center;
  font-size: .9rem;
}
.site-footer .social { display: flex; justify-content: center; gap: 1.2rem; margin-bottom: .5rem; }
.site-footer svg { width: 20px; height: 20px; fill: currentColor; }
.home .site-footer { display: none; }

/* ---------------------------------------------------------------- homepage */

.theme-dark { background: var(--dark); color: var(--white); }

.portfolio-index {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) var(--pad) 4rem;
  overflow: hidden;
}
.portfolio-index .backgrounds { position: absolute; inset: 0; }
.portfolio-index .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .6s ease;
}
.portfolio-index .bg.active { opacity: 1; }
.portfolio-index .backgrounds::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25);
}
.project-list {
  position: relative; list-style: none; margin: 0; padding: 0;
}
.project-list li { margin: .35em 0; }
.project-list a {
  font-size: var(--h1);
  letter-spacing: .02em;
  line-height: 1.25;
  text-decoration: none;
  transition: opacity .3s;
}
.project-list:hover a { opacity: .5; }
.project-list a:hover,
.project-list a:focus-visible { opacity: 1; }

/* ---------------------------------------------------------------- content pages */

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 2rem var(--pad) 3rem; }
.container.narrow { max-width: 860px; }
.container > :first-child { margin-top: 0; }

.about p:first-of-type,
.about h3:first-child + p { font-size: var(--h2); letter-spacing: .02em; margin-bottom: 1.5rem; }

.hero {
  height: 85vh; min-height: 420px;
  background-size: cover; background-position: center;
  background-color: var(--black);
}

.button {
  display: inline-block;
  padding: .9em 2.2em;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border: 0;
  font: inherit;
  letter-spacing: .05em;
  cursor: pointer;
}
.button:hover { opacity: .8; }

/* galleries */
.gallery { margin: 2rem 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; }
.masonry { columns: 2; column-gap: var(--gutter); }
.masonry figure { break-inside: avoid; margin-bottom: var(--gutter); }
.grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(2, 1fr); align-items: start; }
.grid-1 { grid-template-columns: 1fr; }
.lightbox-link { display: block; cursor: zoom-in; }
.lightbox-link:hover { opacity: .92; }

/* videos */
.videos { display: grid; gap: 2.5rem var(--gutter); margin: 2rem 0 3rem; }
.videos.cols-2 { grid-template-columns: repeat(2, 1fr); }
.video { margin: 0; }
.ratio { position: relative; aspect-ratio: 16 / 9; background: var(--light); }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: .8rem; }

/* brand & campaigns page */
.work-brand-and-campaigns .intro { max-width: 900px; font-size: 1.15rem; padding: 2rem 0 1rem; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem;
  padding: 4rem 0;
  border-top: 1px solid #e3e3e3;
}
.project h1, .project h2 { font-size: var(--h2); margin-top: 0; }
.project-media > :first-child { margin-top: 0; }
.project-media .masonry { columns: 2; }

/* contact form */
.contact-form { display: grid; gap: 1.2rem; margin-top: 2rem; }
.contact-form fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form legend { padding: 0; margin-bottom: .5rem; }
.contact-form legend span, .contact-form em { font-style: normal; color: var(--muted); font-size: .85em; }
.contact-form label { display: grid; gap: .4rem; }
.contact-form fieldset label span { font-size: .85em; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  font: inherit; letter-spacing: normal;
  padding: .8rem; border: 1px solid var(--black); background: #fafafa; border-radius: 0; color: var(--black);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.contact-form .button { justify-self: start; }

/* previous / next */
.pagination {
  display: flex; justify-content: space-between; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 2rem var(--pad);
  border-top: 1px solid #e3e3e3;
}
.pagination a { text-decoration: none; font-size: var(--h2); letter-spacing: .02em; display: grid; }
.pagination a span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pagination .next { text-align: right; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(255, 255, 255, .97);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; font: inherit; font-size: 2rem; cursor: pointer;
  padding: 1rem; color: var(--ink); line-height: 1;
}
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 767px) {
  :root { --h1: 2rem; --h2: 1.4rem; --h3: 1.3rem; --h4: 1.15rem; --header-h: 72px; }

  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 25;
    flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
    background: var(--white); color: var(--ink); font-size: 1.6rem;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .theme-dark .site-nav { background: var(--dark); color: var(--white); }
  .menu-open .site-nav { opacity: 1; pointer-events: auto; }
  .menu-open .site-header { color: var(--ink); }
  .theme-dark.menu-open .site-header { color: var(--white); }

  .masonry, .project-media .masonry { columns: 1; }
  .grid { grid-template-columns: 1fr; }
  .videos.cols-2 { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 1rem; padding: 3rem 0; }
  .contact-form fieldset { grid-template-columns: 1fr; }
  .hero { height: 60vh; min-height: 300px; }
  .pagination a { font-size: 1.1rem; }
}
