/* =============================================================
   COMPONENTS
   Reusable UI patterns identified from the Figma designs.
   All values reference tokens defined in tokens.css.
   Import order: tokens.css → base.css → components.css
   ============================================================= */


/* =============================================================
   NAVIGATION
   ============================================================= */

/* Sticky wrapper — applied to <header class="site-header">.
   Sticky must live on the element whose containing block is
   the full document scroll height, not the 60px nav child. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-line-stroke);
  height: 60px;
  display: flex;
  align-items: center;
}

.nav__inner {
  width: 100%;
  max-width: calc(var(--space-max-width) + (var(--space-section-h) * 2));
  margin-inline: auto;
  padding-inline: var(--space-section-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Logo / name wordmark — uses heading font */
.nav__logo {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-zinc-900);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav__logo:hover {
  color: var(--accent-dark);
}

/* Navigation links list */
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-menu);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-zinc-600);
  transition: color 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-zinc-900);
}

/* Mobile nav — no logo, links centered */
@media (max-width: 799px) {
  .nav__logo {
    display: none;
  }

  .nav__inner {
    justify-content: center;
  }

  .nav__links {
    gap: 24px;
  }
}


/* =============================================================
   SECTION HEADER
   Label (e.g. "WORK") + horizontal rule extending to the right.
   Usage:
     <div class="section-header">
       <span class="section-header__label">WORK</span>
     </div>
   ============================================================= */

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--space-caption-head);
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--color-line-stroke);
}

.section-header__label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-zinc-600);
  white-space: nowrap;
}


/* =============================================================
   BUTTONS
   ============================================================= */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-menu);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

/* Primary — filled with accent-dark */
.btn--primary {
  background-color: var(--accent-dark);
  color: var(--color-white);
  padding: 14px 24px;
  border: 1px solid var(--accent-dark);
}

.btn--primary:hover {
  background-color: #9E481C;
  border-color: #9E481C;
}

/* Ghost — text only, no fill, no underline */
.btn--ghost {
  background-color: transparent;
  color: var(--color-zinc-900);
  padding: 14px 4px;
  border: none;
}

.btn--ghost:hover {
  color: #9E481C;
}

/* Outline — bordered, no fill */
.btn--outline {
  background-color: transparent;
  color: var(--color-zinc-900);
  padding: 12px 20px;
  border: 1px solid var(--color-line-stroke);
}

.btn--outline:hover {
  border-color: var(--color-zinc-900);
}


/* =============================================================
   TAG CHIPS
   Small category labels on project cards.
   Usage: <span class="tag">PRODUCT DESIGN</span>
   ============================================================= */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-zinc-600);
  border: 1px solid var(--color-line-stroke);
  padding: 3px 8px;
  white-space: nowrap;
}


/* =============================================================
   PROJECT CARD GRID
   2-column bordered grid. Adjacent borders form shared dividers.
   Mobile: collapses to 1 column.
   ============================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--accent-light);
}

.project-card {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--accent-light);
  border-bottom: 1px solid var(--accent-light);
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.project-card:hover {
  background-color: #F4F4F5;
}

/* Stretched-link variant — makes the entire card a click target.
   The <a class="project-card__link"> inside the title gains a
   ::after pseudo-element that covers the card. */
.project-card--link {
  position: relative;
}

.project-card__link {
  color: inherit;
  text-decoration: none;
}

.project-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* Remove right border from even (right-column) cards */
.project-card:nth-child(even) {
  border-right: none;
}

/* Remove bottom border from last row */
.project-card:nth-last-child(-n+2):nth-child(odd),
.project-card:last-child {
  border-bottom: none;
}

/* Card meta row: number + tags */
.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 12px;
}

.project-card__number {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  color: var(--color-zinc-400);
  font-weight: 400;
  flex-shrink: 0;
}

.project-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Card title */
.project-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  padding: 0 20px 20px;
  color: var(--color-zinc-900);
}

/* Card image / media area
   aspect-ratio matches the uploaded project image (3414 × 2361).
   All placeholder cards use the same ratio for visual consistency. */
.project-card__image {
  aspect-ratio: 3414 / 2361;
  background-color: var(--color-zinc-200);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dark image variant (e.g. navy background with device mockups) */
.project-card__image--dark {
  background-color: #1B2E4A;
}

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

  /* On mobile all cards are single-column — reset border logic */
  .project-card {
    border-right: none;
    border-bottom: 1px solid var(--accent-light);
  }

  .project-card:last-child {
    border-bottom: none;
  }

  /* aspect-ratio handles sizing — no fixed min-height needed */
}


/* =============================================================
   PHILOSOPHY / FEATURE GRID
   3-column grid of numbered principle cards.
   Mobile: collapses to 1 column.
   ============================================================= */

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--color-line-stroke);
  background-color: var(--color-line-stroke); /* shows as grid lines */
  gap: 1px;
}

.philosophy-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-color: var(--color-white);
}

.philosophy-card__number {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  color: var(--color-zinc-400);
  font-weight: 400;
}

.philosophy-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  color: var(--color-zinc-900);
}

.philosophy-card__body {
  font-family: var(--font-body);
  font-size: var(--text-body-s);
  line-height: var(--lh-body-base);
  color: var(--color-zinc-600);
}

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


/* =============================================================
   CONTACT LINKS TABLE
   Rows of: label (left) | value (right)
   Separated by thin horizontal rules.
   ============================================================= */

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line-stroke);
  gap: 24px;
}

.contact-link-row__label {
  font-family: var(--font-body);
  font-size: var(--text-body-base);
  font-weight: 500;
  color: var(--color-zinc-900);
  white-space: nowrap;
}

.contact-link-row__value {
  font-family: var(--font-body);
  font-size: var(--text-body-s);
  color: var(--color-zinc-600);
  text-align: right;
  transition: color 0.2s ease;
}

.contact-link-row__value:hover {
  color: var(--accent-dark);
}

a.contact-link-row__value {
  text-decoration: none;
}


/* =============================================================
   HERO SECTION
   Above-the-fold layout with large heading and CTA buttons.
   ============================================================= */

.hero {
  padding: var(--space-section-v) var(--space-section-h);
}

.hero__inner {
  max-width: var(--space-max-width);
  margin-inline: auto;
}

.hero__heading {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  line-height: 1.15;
  font-weight: 600;
  color: var(--color-zinc-900);
  margin-bottom: 32px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body-base);
  line-height: var(--lh-body-base);
  color: var(--color-zinc-600);
  max-width: 520px;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}


/* =============================================================
   ABOUT / TEXT SECTION
   Two-column body text layout. Collapses to 1 col on mobile.
   ============================================================= */

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.about-body p {
  font-family: var(--font-body);
  font-size: var(--text-body-s);
  line-height: var(--lh-body-base);
  color: var(--color-zinc-600);
  margin-bottom: 16px;
}

.about-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 799px) {
  .about-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* =============================================================
   CONTACT SECTION LAYOUT
   Two-column: heading+body left, contact links right.
   Collapses to 1 column on mobile.
   ============================================================= */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-layout__heading {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  color: var(--color-zinc-900);
  margin-bottom: 24px;
}

.contact-layout__body {
  font-family: var(--font-body);
  font-size: var(--text-body-s);
  line-height: var(--lh-body-base);
  color: var(--color-zinc-600);
}

@media (max-width: 799px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}


/* =============================================================
   IMAGE / MEDIA PLACEHOLDER
   Used where images will be loaded or are not yet available.
   ============================================================= */

.img-placeholder {
  background-color: var(--color-zinc-200);
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-placeholder--dark {
  background-color: #1B2E4A;
}


/* =============================================================
   FOCUS / ACCESSIBILITY
   ============================================================= */

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 2px;
}
