/* =====================
   RESET & BASE
   ===================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

/* =====================
   NAV
   ===================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(48px, calc((100vw - 1280px) / 2 + 48px), 9999px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8e8e8;
  transition: border-color 0.3s;
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: #666;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #111;
}

/* =====================
   HERO
   ===================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 80px;
  padding: 120px 48px 80px;
}

.hero-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-label {
  font-size: 12px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-name {
  font-size: clamp(56px, 8vw, 128px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 36px;
}

.hero-tagline {
  font-size: clamp(16px, 1.6vw, 20px);
  color: #555;
  max-width: 380px;
  line-height: 1.5;
  margin-bottom: 48px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: #aaa;
}

/* Hero visual — stacked cards */
.hero-visual {
  flex-shrink: 0;
  width: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.hero-cards {
  position: relative;
  width: 300px;
  height: 420px;
  cursor: pointer;
}

.hero-card {
  display: block;
  position: absolute;
  width: 100%;
  border: 1px solid #e8e8e8;
  overflow: hidden;
  background: #fff;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.6s ease,
              opacity 0.6s ease;
  text-decoration: none;
}

.hero-card img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-card-label {
  display: block;
  padding: 8px 12px;
  font-size: 11px;
  color: #999;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Resting — clearly stacked, depth visible */
.hero-card--front {
  bottom: 0;
  left: 0;
  z-index: 3;
  transform: rotate(-3deg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.hero-card--mid {
  bottom: 0;
  left: 0;
  z-index: 2;
  transform: rotate(3deg) translate(8px, -60px);
  opacity: 0.85;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hero-card--back {
  bottom: 0;
  left: 0;
  z-index: 1;
  transform: rotate(7deg) translate(16px, -120px);
  opacity: 0.65;
}

/* Hover — fan upward, z-index never changes */
.hero-cards:hover .hero-card--front {
  transform: rotate(-4deg) translate(-16px, -16px);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.14);
  opacity: 1;
}

.hero-cards:hover .hero-card--mid {
  transform: rotate(0deg) translate(8px, -220px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10);
  opacity: 1;
}

.hero-cards:hover .hero-card--back {
  transform: rotate(4deg) translate(24px, -360px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  opacity: 1;
}

/* =====================
   SECTION BASE
   ===================== */

section {
  padding: 112px 48px;
}

.section-header {
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.section-header h2 {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =====================
   WORK
   ===================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #e8e8e8;
  border: 1px solid #e8e8e8;
}

.project-card {
  background: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.25s;
}

.project-card:hover {
  background: #fafafa;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-number {
  font-size: 11px;
  color: #bbb;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.project-company {
  font-size: 11px;
  color: #bbb;
  letter-spacing: 0.05em;
}

.project-status {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.project-status.in-production {
  background: #ecf7ee;
  color: #2a7a34;
}

.project-status.in-development {
  background: #fff4e5;
  color: #b85c00;
}

.project-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 6px;
}

.project-role {
  font-size: 12px;
  color: #888;
  letter-spacing: 0.02em;
}

.project-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  flex: 1;
}

.project-outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #ebebeb;
  border-bottom: 1px solid #ebebeb;
  margin-top: 4px;
}

.project-outcome {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  border-right: 1px solid #ebebeb;
}

.project-outcome:last-child {
  border-right: none;
  padding-left: 16px;
}

.project-outcome:not(:first-child) {
  padding-left: 16px;
}

.outcome-number {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.outcome-label {
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.project-link {
  font-size: 13px;
  font-weight: 500;
  color: #111;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  transition: gap 0.2s ease;
}

.project-link:hover {
  gap: 10px;
  text-decoration: underline;
}

.project-image-link {
  display: block;
  text-decoration: none;
}

/* =====================
   ABOUT
   ===================== */

.about {
  background: #f8f8f8;
}

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 88px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: cover;
}

.about-lead {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.about-text p {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 18px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.about-skills span {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 100px;
  color: #555;
  background: #fff;
  letter-spacing: 0.01em;
}

/* =====================
   CONTACT
   ===================== */

.contact {
  text-align: center;
  padding: 160px 48px;
}

.contact-content {
  max-width: 640px;
  margin: 0 auto;
}

.contact h2 {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 20px;
}

.contact p {
  font-size: 16px;
  color: #888;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  padding: 13px 28px;
  border: 1px solid #ddd;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contact-link:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* =====================
   CONTACT FORM
   ===================== */

.contact-form {
  margin-top: 64px;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 15px;
  color: #111;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
  resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #bbb;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: #111;
}

.form-submit {
  align-self: flex-start;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 100px;
  padding: 13px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.form-submit:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* =====================
   FOOTER
   ===================== */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-top: 1px solid #e8e8e8;
  font-size: 12px;
  color: #bbb;
}

/* =====================
   IMAGES
   ===================== */

/* Homepage card thumbnail */
.project-image {
  margin: -48px -48px 24px -48px;
  overflow: hidden;
  border-bottom: 1px solid #e8e8e8;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.02);
}

/* Case study hero image */
.case-hero-image {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid #e8e8e8;
}

.case-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 640;
  object-fit: cover;
}

/* Case study inline image */
.case-inline-image {
  margin: 0 0 72px 0;
  border: 1px solid #e8e8e8;
  overflow: hidden;
}

.case-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.case-inline-image figcaption {
  padding: 12px 16px;
  font-size: 12px;
  color: #aaa;
  border-top: 1px solid #e8e8e8;
  background: #fafafa;
}

/* =====================
   ANIMATION
   ===================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger project cards */
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.05s; }
.project-card:nth-child(4) { transition-delay: 0.15s; }

/* =====================
   CASE STUDY PAGES
   ===================== */

.nav-back {
  font-size: 13px;
  color: #666;
  transition: color 0.2s;
}

.nav-back:hover {
  color: #111;
}

.case-header {
  padding: 160px 48px 80px;
  border-bottom: 1px solid #e8e8e8;
}

.case-header-inner {
  max-width: 900px;
}

.case-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.case-company {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.05em;
}

.case-dot {
  color: #ddd;
  font-size: 12px;
}

.case-role {
  font-size: 12px;
  color: #999;
}

.case-live-link {
  font-size: 12px;
  font-weight: 500;
  color: #111;
  transition: opacity 0.2s;
}

.case-live-link:hover {
  opacity: 0.6;
}

.case-access-note {
  font-size: 12px;
  color: #999;
}

.case-title {
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}

.case-subtitle {
  font-size: clamp(16px, 1.8vw, 20px);
  color: #555;
  line-height: 1.55;
  max-width: 640px;
}

/* Outcomes bar */
.outcomes-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e8e8e8;
}

.outcome-item {
  padding: 40px 48px;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outcome-item:last-child {
  border-right: none;
}

.outcome-item .outcome-number {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.outcome-item .outcome-label {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  max-width: 200px;
}

/* Case body */
.case-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 48px 120px;
}

.case-section {
  margin-bottom: 72px;
}

.case-section h2 {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.case-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-top: 32px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.case-section p {
  font-size: 16px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

.case-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-list li {
  font-size: 16px;
  color: #444;
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}

.case-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #ccc;
  font-size: 12px;
  top: 4px;
}

/* Challenge grid */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #e8e8e8;
  border: 1px solid #e8e8e8;
  margin-top: 8px;
}

.challenge-item {
  background: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge-label {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.01em;
}

.challenge-item p {
  font-size: 14px;
  color: #666;
  line-height: 1.65;
  margin: 0;
}

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #e8e8e8;
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
}

.result-card {
  background: #f8f8f8;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-number {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.result-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.case-results-note {
  font-size: 15px;
  color: #666;
  line-height: 1.75;
  font-style: italic;
}

/* Next project */
.next-project {
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}

.next-project-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 48px;
  transition: background 0.2s;
}

.next-project-link:hover {
  background: #fafafa;
}

.next-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.next-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 100px 24px 64px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 4px;
  }

  .hero-visual {
    display: none;
  }

  section {
    padding: 80px 24px;
  }

  .project-card {
    padding: 32px 24px;
  }

  .project-image {
    margin: -32px -24px 20px -24px;
  }

  .contact {
    padding: 100px 24px;
  }

  .footer {
    padding: 24px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* About responsive */
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo {
    position: static;
    max-width: 240px;
  }

  /* Case study responsive */
  .case-header {
    padding: 100px 24px 56px;
  }

  .outcomes-bar {
    grid-template-columns: 1fr;
  }

  .outcome-item {
    padding: 28px 24px;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }

  .outcome-item:last-child {
    border-bottom: none;
  }

  .case-body {
    padding: 64px 24px 80px;
  }

  .challenge-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .next-project-link {
    padding: 32px 24px;
  }
}
