/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #FAFAF8;
  --ink: #1E1D1B;
  --muted: #E4E2DD;
  --accent: #B5562F;
  --sidebar-w: 200px;
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -7rem;
  right: -7rem;
  width: 860px;
  height: 860px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.14;
  pointer-events: none;
  filter: blur(120px);
}

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

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

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 8rem 1.5rem 2.5rem;
  border-right: 1px solid var(--muted);
  background: var(--bg);
  z-index: 100;
}

.sidebar__top {
  margin-bottom: 3rem;
}

.sidebar__logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-block;
}

.sidebar__logo-dot {
  color: var(--accent);
}

.sidebar__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.6;
  transition: color 0.2s;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  text-align: left;
  color: var(--ink);
  outline: none;
}

.sidebar__link:hover,
.sidebar__link--active {
  color: var(--accent);
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

.sidebar__social {
  color: var(--ink);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}

.sidebar__social:hover {
  opacity: 1;
  color: var(--accent);
}

/* ===== Mobile Header ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding: 0 1.5rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--muted);
  z-index: 200;
}

.mobile-header__toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-header__toggle.is-active span:first-child {
  transform: translateY(9px) rotate(45deg);
}

.mobile-header__toggle.is-active span:last-child {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===== Mobile Nav Overlay ===== */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav__link {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.6;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
  outline: none;
}

.mobile-nav__link:hover {
  color: var(--accent);
}

/* ===== Main ===== */
.main {
  margin-left: var(--sidebar-w);
  padding: 14rem 6rem 4rem;
  max-width: none;
}

.main.main--subpage {
  padding-top: 6rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-bottom: 6rem;
}

.hero__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(3.9rem, 7.8vw, 6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--ink);
  opacity: 0.7;
  max-width: 480px;
}

/* ===== Pages ===== */
.page {
  display: none;
}

.page--active {
  display: block;
}

/* ===== Case Studies ===== */
.work {
  padding-bottom: 6rem;
}

.case-study {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}

.case-study:last-child {
  margin-bottom: 0;
}

.case-study--alt {
  direction: rtl;
}

.case-study--alt > * {
  direction: ltr;
}

.case-study__image {
  border-radius: 8px;
  overflow: hidden;
  background: var(--muted);
}

.case-study__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.4s ease;
}

.case-study__image:hover img {
  transform: scale(1.03);
}

.case-study__chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: var(--muted);
  color: var(--ink);
  margin-bottom: 1rem;
}

.case-study__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.case-study__outcome {
  font-size: 0.9375rem;
  line-height: 1.6;
  opacity: 0.75;
  margin-bottom: 1.5rem;
  max-width: 440px;
}

.case-study__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s;
}

.case-study__link:hover {
  gap: 0.75rem;
}

/* ===== Process ===== */
.process {
  padding-bottom: 6rem;
  border-bottom: 1px solid var(--muted);
  margin-bottom: 6rem;
}

.process__heading {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 3rem;
}

.process__strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process__step {
  padding-right: 1.5rem;
}

.process__number {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.process__title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.process__desc {
  font-size: 0.8125rem;
  opacity: 0.65;
  line-height: 1.5;
}

/* ===== About ===== */
.about {
  padding-bottom: 6rem;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 38vw);
  gap: 2rem;
  align-items: stretch;
  min-height: calc(100svh - 11rem);
}

.about__text {
  grid-column: 1;
  grid-row: 1;
}

.about__photo {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.about__photo img {
  width: 100%;
  height: 100%;
  display: block;
  filter: grayscale(20%);
  object-fit: cover;
  object-position: center top;
  transition: none;
}

.about__text p {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 0.75rem;
  opacity: 0.9;
  letter-spacing: 0.01em;
}

.about__greeting {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 1 !important;
  margin-bottom: 1rem !important;
}

.about__email {
  margin-top: 1.25rem;
}

.about__email a {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.about__email a:hover {
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .main {
    padding: 5rem 3rem 3rem;
  }

  .main.main--subpage {
    padding-top: 3rem;
  }

  .case-study {
    gap: 2rem;
  }

  .process__strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 3rem;
  }
}

@media (max-width: 768px) {
  body::before {
    top: -9rem;
    right: -10rem;
    width: 420px;
    height: 420px;
    opacity: 0.1;
    filter: blur(90px);
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 4.5rem 1.25rem 2.5rem;
  }

  .main.main--subpage {
    padding-top: 5.25rem;
  }

  .hero {
    min-height: calc(100svh - 7rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
  }

  .hero__headline {
    font-size: clamp(5.6rem, 21vw, 7.1rem);
    line-height: 1.02;
    max-width: 8.5ch;
  }

  .hero__label {
    font-size: 0.75rem;
  }

  .hero__sub {
    font-size: 1.05rem;
    max-width: 22rem;
  }

  .work {
    padding-bottom: 4rem;
    margin-bottom: 4rem;
  }

  .case-study {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
  }

  .case-study--alt {
    direction: ltr;
  }

  .case-study__title {
    font-size: 1.5rem;
  }

  .process {
    padding-bottom: 4rem;
    margin-bottom: 4rem;
  }

  .process__strip {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .about {
    padding-bottom: 4rem;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
  }

  .about__text {
    order: 1;
    grid-column: auto;
    grid-row: auto;
  }

  .about__photo {
    order: 2;
    width: min(72vw, 280px);
    aspect-ratio: 4 / 5;
    height: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .contact__heading {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero__headline {
    font-size: clamp(5.1rem, 22vw, 6.3rem);
    line-height: 1.03;
  }

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