/*
Theme Name: Studiomate
Author: Keziah
Description: Custom minimal theme for Studiomate architectural firm.
Version: 1.2
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,200;9..40,300;9..40,400;9..40,500&display=swap');

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #2a2a2a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── HEADER ────────────────────────────────────────── */
.sm-header {
  width: 100%;
  position: relative;
}
.sm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sm-logo {
  display: inline-block;
  line-height: 0;
}
.sm-logo img {
  width: 180px;
  height: 16px;
  display: block;
}
.sm-nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.sm-nav a {
  font-size: 0.78rem;
  font-weight: 300;
  color: #2a2a2a;
  letter-spacing: 0.03em;
  padding: 8px 8px;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.sm-nav a:hover,
.sm-nav a.active {
  color: #2a2a2a;
  border-bottom-color: #2a2a2a;
}

/* ── HAMBURGER BUTTON ──────────────────────────────── */
.sm-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.sm-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #2a2a2a;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.sm-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.sm-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.sm-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── FOOTER ────────────────────────────────────────── */
.sm-footer {
  width: 100%;
}
.sm-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sm-footer-copy {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #aaa;
}
.sm-footer-icons {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.sm-footer-icons a {
  color: #aaa;
  transition: color 0.2s;
}
.sm-footer-icons a:hover { color: #2a2a2a; }
.sm-footer-icons svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.sm-footer-copy a { text-decoration: none; }
.sm-footer-copy a:hover,
.sm-footer-copy a:active { text-decoration: underline; }

/* ── BREADCRUMB ────────────────────────────────────── */
.sm-bc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #aaa;
}
.sm-bc a, .sm-bc .current {
  display: inline-block;
  padding: 8px 8px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  text-decoration: none;
}
.sm-bc a { color: #aaa; }
.sm-bc a:hover {
  color: #aaa;
  border-bottom-color: #aaa;
}
.sm-bc .current {
  color: #aaa;
  border-bottom-color: #aaa;
}
.sm-bc .sep { color: #ccc; padding: 0; border: none; }
.sm-bc a:first-child,
.sm-bc .current:first-child { margin-left: -8px; }

/* ── SHARED GRID (Projects + Featured) ─────────────── */
.sm-archive-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}
.sm-archive-wrap .sm-bc { margin-bottom: 2rem; }
.sm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
}
.sm-card { display: block; }
.sm-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e6e1;
}
.sm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sm-card:hover .sm-card-img img { transform: scale(1.04); }
.sm-card-title {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a2a2a;
  line-height: 1.5;
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.sm-card:hover .sm-card-title { border-bottom-color: #2a2a2a; }

/* ── CARD REVEAL ───────────────────────────────────── */
.sm-card {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.sm-card.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 768px) {
  .sm-header-inner,
  .sm-footer-inner {
    padding: 1.2rem 1.5rem;
  }

  .sm-footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
  }

  .sm-logo img {
    width: 130px;
    height: auto;
  }

  .sm-hamburger { display: flex; }

  /* Nav hidden by default, shown when open */
  #sm-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 1000;
    padding: 1rem 2rem 1.5rem;
  }
  #sm-nav-menu.is-open { display: block; }

  .sm-nav {
    flex-direction: column;
    gap: 0;
  }
  .sm-nav li { border-bottom: 1px solid #f0f0f0; }
  .sm-nav li:last-child { border-bottom: none; }
  .sm-nav a {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
  }

  .sm-archive-wrap { padding: 0 1.5rem 3rem; }
  .sm-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.2rem; }
}

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