:root {
  --bg: #ffffff;
  --surface: #f6f6f4;
  --ink: #1a1c1e;
  --ink-soft: #55595e;
  --ink-faint: #8a8f96;
  --line: #e4e4e0;
  --accent: #1a1c1e;
  --maxw: 1160px;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- header --- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}

.header-contact {
  color: var(--ink-soft);
  font-size: 14px;
}

.header-contact:hover {
  color: var(--ink);
}

/* --- hero --- */
.hero {
  padding: 88px 0 40px;
}

.hero-title {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 16px;
  max-width: 18ch;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

/* --- grid --- */
.grid-section {
  padding: 24px 24px 96px;
}

.ref-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}

.ref-card a {
  display: block;
}

.thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ref-card a:hover .thumb img {
  transform: scale(1.04);
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  font-size: 14px;
  font-weight: 600;
}

.ref-card-body {
  padding: 14px 2px 0;
}

.ref-card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.ref-card-loc {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 14px;
}

.empty {
  color: var(--ink-faint);
  padding: 40px 0;
}

/* --- case study --- */
.case-hero {
  height: clamp(280px, 46vw, 560px);
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
}

.case-head {
  padding: 40px 24px 8px;
  max-width: 820px;
}

.back {
  color: var(--ink-faint);
  font-size: 14px;
}

.back:hover {
  color: var(--ink);
}

.case-meta {
  margin: 20px 0 12px;
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.case-title {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 8px;
}

.case-loc {
  color: var(--ink-faint);
  margin: 0 0 24px;
  font-size: 16px;
}

.case-summary {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.case-summary p {
  margin: 0 0 1em;
}

/* --- phases --- */
.phase {
  padding: 48px 24px 0;
}

.phase-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.phase-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.phase-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-cta {
  padding: 72px 24px 96px;
  text-align: center;
}

.case-cta p {
  font-size: 20px;
  margin: 0 0 20px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

.cta-btn:hover {
  opacity: 0.88;
}

/* --- 404 --- */
.notfound {
  text-align: center;
  padding: 120px 24px;
}

.notfound h1 {
  font-size: 64px;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.notfound p {
  color: var(--ink-soft);
  margin: 0 0 28px;
}

/* --- footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 48px;
  padding-bottom: 48px;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--ink-faint);
  margin: 0;
  font-size: 14px;
}

.footer-contact {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
  text-align: right;
}

.footer-contact a:hover {
  color: var(--ink);
}

/* --- responsive --- */
@media (max-width: 900px) {
  .ref-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .header-contact {
    display: none;
  }
  .hero {
    padding: 56px 0 24px;
  }
  .ref-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .phase-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-contact {
    text-align: left;
  }
}
