/* V62 refinement layer — loaded last on every page.
   Typography, button finish, spacing rhythm, card tone, image hover and
   scroll-reveal states. No content is hidden or removed here. */

:root {
  --radius-button: 8px;
  --radius-card: 10px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --shadow-card: 0 1px 2px #143e320a, 0 6px 18px -12px #143e3226;
  --shadow-card-hover: 0 2px 4px #143e320d, 0 22px 44px -26px #143e3247;
  --line-soft: #e4e9e3;
}

/* ---------- 1. Typography (Pretendard) ---------- */
body {
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.hero h1 { font-weight: 600; letter-spacing: -.045em; line-height: 1.2; }
h2 { font-weight: 600; letter-spacing: -.035em; line-height: 1.38; }
h3 { letter-spacing: -.025em; }
.contact h2 { letter-spacing: -.035em; line-height: 1.35; }
.large-copy { letter-spacing: -.028em; line-height: 1.62; font-weight: 500; }
.project-description h4, .project-story h3 { letter-spacing: -.03em; }
.search-content > h1 { letter-spacing: -.035em; line-height: 1.3; }
.wordmark { letter-spacing: -.05em; }

/* Numbers & Latin subtitles: calmer, evenly spaced */
.eyebrow, .contact .eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.hero-copy > .eyebrow { font-weight: 600; letter-spacing: .06em; }
.service-en, .image-title > small, .wordmark > small {
  font-weight: 500; letter-spacing: .12em;
}
.service-number, .step, .project-year-heading h3, .project-meta,
.certification-details, .completed-project-meta, .about-signature, .footer-main > p {
  font-variant-numeric: tabular-nums;
}
.service-number, .step { font-weight: 500; letter-spacing: .04em; }
.project-year-heading h3 { font-weight: 600; letter-spacing: -.03em; }

/* ---------- 2. Buttons ---------- */
.button, .header-contact, .button-light, .button-outline,
.project-years > a, .project-lightbox button {
  border-radius: var(--radius-button);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out),
              border-color .3s var(--ease-out), box-shadow .35s var(--ease-out),
              transform .35s var(--ease-out);
}
.header-contact { border-radius: 6px; }
.button span, .header-contact > span, .text-link span {
  display: inline-block; transition: transform .35s var(--ease-out);
}
.button:hover, .project-years > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px #143e3273;
}
.button:hover span, .header-contact:hover > span, .text-link:hover span {
  transform: translateX(4px);
}
.button-dark:hover, .header-contact:hover, .project-years > a:hover { background: #1b4d3e; }
.button:active, .project-years > a:active { transform: translateY(0); box-shadow: none; }
.text-link { transition: color .3s var(--ease-out), border-color .3s var(--ease-out); }
.text-link:hover { color: #1f5e48; }
.button-light:hover { background: #eef3ee; box-shadow: 0 14px 30px -18px #0000004d; }

/* ---------- 3. Spacing rhythm ---------- */
.section { padding-block: 136px; }
.section-top { margin-bottom: 64px; }
.eyebrow { margin-bottom: 22px; }
.hero { min-height: 740px; }
.hero-visual { min-height: 740px; }
.hero-description { margin-top: 30px; line-height: 1.95; }
.hero-copy > .button { margin-top: 40px; }
.partner-section { padding-bottom: 128px; }
.certification-section { padding-bottom: 136px; }
.contact { padding-block: 120px; }
.project-year-section + .project-year-section { margin-top: 80px; }

@media (max-width: 1180px) {
  .section { padding-block: 104px; }
  .hero, .hero-visual { min-height: 660px; }
}
@media (max-width: 900px) {
  .section { padding-block: 88px; }
  .certification-section { padding-bottom: 88px; }
  .partner-section { padding-bottom: 96px; }
}
@media (max-width: 640px) {
  .section { padding-block: 72px; }
  .section-top { margin-bottom: 34px; }
  .hero { min-height: 0; }
  .hero-visual { min-height: 350px; }
  .hero h1 { letter-spacing: -.04em; line-height: 1.24; }
  h2 { letter-spacing: -.03em; }
  .certification-section { padding-bottom: 64px; }
  .partner-section { padding-bottom: 72px; }
  .contact { padding-block: 80px; }
  .project-year-section + .project-year-section { margin-top: 56px; }
}

/* ---------- 4. Cards: quieter border, radius and shadow ---------- */
.partner-card, .certification-card {
  background: #f6f8f5;
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--green);
  border-radius: 4px 4px var(--radius-card) var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow .45s var(--ease-out), transform .45s var(--ease-out);
}
.certification-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.certification-preview, .partner-certificate a {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px #143e320f, 0 14px 30px -18px #143e3240;
}
.project-feature { border-radius: var(--radius-card); overflow: hidden; }
.service-list li { border-radius: var(--radius-card); background: #f6f8f5; border: 1px solid var(--line-soft); }
.case-links a {
  border-radius: var(--radius-card); border-color: var(--line-soft);
  transition: border-color .3s var(--ease-out), box-shadow .35s var(--ease-out), transform .35s var(--ease-out);
}
.case-links a:hover { border-color: #b9c8bd; box-shadow: var(--shadow-card-hover); transform: translateY(-2px); text-decoration: none; }
.photo-open-label { border-radius: 6px; backdrop-filter: blur(6px); }
.project-visual figcaption, .hero-visual figcaption { border-radius: 4px; }

/* ---------- 5. Image hover zoom ---------- */
.project-cover, .project-visual, .certification-preview,
.partner-certificate a, .tile-repair-photos figure, .restroom-photos figure {
  overflow: hidden;
}
.project-cover img, .project-visual > img, .certification-preview img,
.partner-certificate img, .tile-repair-photos img, .restroom-photos img {
  transition: transform .9s var(--ease-out);
  will-change: transform;
}
.project-cover:hover img, .project-visual:hover > img, .certification-preview:hover img,
.partner-certificate a:hover img, .tile-repair-photos figure:hover img, .restroom-photos figure:hover img {
  transform: scale(1.035);
}
/* Gallery thumbnails carry their caption inside the same link, so they
   lift gently instead of zooming past their box. */
.project-gallery img {
  border-radius: 6px;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), filter .5s var(--ease-out);
}
.project-gallery > a:hover img {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -20px #143e3266;
  filter: saturate(1.05) brightness(1.02);
}

/* ---------- 6. Scroll reveal (enabled only by reveal.mjs) ---------- */
.reveal-ready .reveal {
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}

/* ---------- Motion & print safety ---------- */
@media (hover: none) {
  .button:hover, .project-years > a:hover, .certification-card:hover, .case-links a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .button:hover, .certification-card:hover, .case-links a:hover,
  .project-gallery > a:hover img, .project-cover:hover img, .project-visual:hover > img,
  .certification-preview:hover img, .partner-certificate a:hover img,
  .tile-repair-photos figure:hover img, .restroom-photos figure:hover img { transform: none; }
}
@media print {
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
}
