/* ─────────────────────────────────────────────
   FONT
   Drop BrownStd font files into /fonts/ and
   uncomment the @font-face blocks below.
───────────────────────────────────────────── */

/*
@font-face {
  font-family: 'BrownStd';
  src: url('../fonts/BrownStd-Regular.woff2') format('woff2'),
       url('../fonts/BrownStd-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'BrownStd';
  src: url('../fonts/BrownStd-Light.woff2') format('woff2'),
       url('../fonts/BrownStd-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'BrownStd';
  src: url('../fonts/BrownStd-Bold.woff2') format('woff2'),
       url('../fonts/BrownStd-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}
*/

/* ─────────────────────────────────────────────
   TOKENS
───────────────────────────────────────────── */
:root {
  --bg:        #FFFFFF;
  --red:       #E8491F;
  --text:      #636363;
  --subtext:   #E4E2DF;
  --pink:      #FAD3B7;
  --blue:      #8AA1AC;

  --font: 'BrownStd', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-h: 64px;
  --col-gap: 0px;
  --transition: 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ─────────────────────────────────────────────
   RESET
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ─────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 33.333vw;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 100;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
}

.navbar.hidden {
  opacity: 0;
  pointer-events: none !important;
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: all;
}

.nav-arrow {
  width: var(--nav-h);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: color var(--transition), transform 0.2s;
  flex-shrink: 0;
}

.nav-arrow:hover { color: var(--red); transform: scale(1.1); }
.nav-arrow:disabled { opacity: 0.18; pointer-events: none; }
.nav-arrow svg { width: 20px; height: 20px; }

.nav-project-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.5;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* ─────────────────────────────────────────────
   APP WRAPPER & PAGE TRANSITIONS
───────────────────────────────────────────── */
#app {
  position: relative;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageEnterRight 0.45s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.page.active.from-left {
  animation-name: pageEnterLeft;
}

@keyframes pageEnterRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pageEnterLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─────────────────────────────────────────────
   LANDING PAGE
───────────────────────────────────────────── */
.landing {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Left column */
.landing-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 48px;
  border-right: 1px solid var(--subtext);
}

.landing-bio h1 {
  font-size: clamp(32px, 3.5vw, 56px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 32px;
}

.landing-bio h1 span {
  color: var(--red);
}

.landing-bio p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  max-width: 280px;
  text-align: left;
}

.landing-bio .bio-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.bio-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--subtext);
  color: var(--text);
  border-radius: 100px;
}

/* Middle and Right columns */
.landing-projects-col {
  display: flex;
  flex-direction: column;
}

.landing-projects-col:nth-child(2) {
  border-right: 1px solid var(--subtext);
}

/* Project cover card */
.project-cover {
  flex: 1;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-cover + .project-cover {
  border-top: 1px solid var(--subtext);
}

.project-cover-img {
  width: 40%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.project-cover-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.project-cover:hover .project-cover-placeholder,
.project-cover:hover .project-cover-img {
  transform: scale(1.04);
}

.project-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.project-cover:hover .project-cover-overlay {
  background: rgba(255,255,255,0.08);
}

.project-cover-label {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.project-cover:hover .project-cover-label {
  opacity: 1;
  transform: translateY(0);
}

.project-cover-label span {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  padding: 8px 18px;
}

/* ─────────────────────────────────────────────
   PROJECT PAGE
───────────────────────────────────────────── */
.project-page {
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: 100vh;
}

/* Left sidebar */
.project-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--subtext);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 24px) 48px 60px;
}

.project-sidebar::-webkit-scrollbar { width: 3px; }
.project-sidebar::-webkit-scrollbar-thumb { background: var(--subtext); }

.project-number {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
}

.project-sidebar h1 {
  font-size: clamp(28px, 2.5vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 32px;
}

.project-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 48px;
  transition: opacity 0.4s;
}

.project-section-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s;
  margin-bottom: 48px;
  min-height: 60px;
}

.project-section-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-nav-btn {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 12px 0;
  text-align: left;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  opacity: 0.45;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
}

.project-nav-btn:hover,
.project-nav-btn.active {
  color: var(--red);
  opacity: 1;
  border-bottom-color: var(--red);
}

/* Right content area */
.project-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  overflow: hidden;
}

/* Section blocks */
.project-section {
  grid-column: 1 / -1;
}

.section-header {
  padding: 48px 48px 32px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.section-header h2 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.section-header .section-line {
  flex: 1;
  height: 1px;
  background: var(--subtext);
}

/* Work grid inside sections */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  overflow: hidden;
}

.work-sub-header {
  grid-column: 1 / -1;
  padding: 48px 48px 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.work-sub-header h3 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
}

.work-sub-header .section-line {
  flex: 1;
  height: 1px;
  background: var(--subtext);
}

.work-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  border-right: 1px solid var(--subtext);
  border-bottom: 1px solid var(--subtext);
}

.work-item:nth-child(even) { border-right: none; }

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.work-item:hover img { transform: scale(1.03); }

.work-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.work-item:hover .work-placeholder { transform: scale(1.03); }

.work-placeholder-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* Website embed item — spans full width */
.work-item.website {
  grid-column: 1 / -1;
  aspect-ratio: unset;
  height: auto;
  border-right: none;
  border-bottom: none;
  background: transparent;
  overflow: hidden;
  min-width: 0;
  padding: 40px 48px;
}

/* Desktop frame shell */
.desktop-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 3px solid var(--red);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.desktop-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  display: block;
}

/* Mobile pair — two phone frames side by side, height-constrained to 100vh */
.mobile-pair-frame {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 173px); /* section-header (~93px) + work-item padding (80px) */
}

.mobile-frame {
  flex: none;
  /* pick the smaller of: width-from-height-constraint vs half the available container width */
  width: min(calc((100vh - 173px) * 375 / 812), calc(50% - 10px));
  aspect-ratio: 375 / 812;
  max-height: 100%;
  border: 3px solid var(--red);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}

.mobile-iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  display: block;
}

/* URL caption sits below the frame, always visible */
.website-overlay {
  display: block;
  margin-top: 4px;
  cursor: pointer;
  pointer-events: all;
  text-align: center;
}

.website-visit-text {
  font-size: 12px;
  color: var(--text);
  margin-right: 6px;
}

.website-link-label {
  font-size: 12px;
  color: var(--subtext);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s;
}

.website-link-label:hover {
  color: var(--text);
}

.address-btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--subtext);
  padding: 10px 24px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.address-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ─────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--subtext); border-radius: 2px; }

/* ─────────────────────────────────────────────
   UTILITY
───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
