:root {
  --color-bg: #f6f1e8;
  --color-primary: #b1633f;
  --color-text: #2c2620;
  --color-accent: #a4855a;
  --color-surface: #ffffff;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--color-primary); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary); color: #fff;
  padding: .5em 1em; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header { background: var(--color-surface); border-bottom: 1px solid rgba(44,38,32,.08); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--color-text); }
.brand-mark { height: 32px; width: auto; display: block; }
.brand-text { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { width: 22px; height: 2px; background: var(--color-text); display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.primary-nav { display: flex; gap: 1.5rem; }
.primary-nav > ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.primary-nav a { text-decoration: none; color: var(--color-text); font-weight: 500; font-size: .95rem; }
.primary-nav > ul > li > a:hover, .primary-nav > ul > li.has-dropdown:hover > a { color: var(--color-primary); }

.has-dropdown { position: relative; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--color-surface); box-shadow: 0 12px 24px rgba(44,38,32,.12); min-width: 300px; padding: .5rem 0; list-style: none; margin: 0; border-radius: 4px; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a { display: block; padding: .55rem 1.1rem; font-size: .9rem; }
.dropdown li a:hover { background: var(--color-bg); }
.dropdown-empty-note { padding: .55rem 1.1rem; font-size: .82rem; color: #8a8378; font-style: italic; }

/* Buttons */
.btn { display: inline-block; padding: .8rem 1.6rem; border-radius: 3px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #96502f; }
.btn-outline { border: 1px solid var(--color-text); color: var(--color-text); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }
.hero p.lede { max-width: 640px; margin: 0 auto 1.5rem; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--color-surface); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; }
}

.card { background: var(--color-surface); border-radius: 6px; padding: 1.5rem; box-shadow: 0 4px 14px rgba(44,38,32,.06); }
.card h3 { margin-top: 0; }

/* Home page cards auto-built from content/services/*.json — see render_home_service_cards() */
a.card-link { display: block; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s; }
a.card-link:hover { box-shadow: 0 8px 22px rgba(44,38,32,.14); }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-top: 0; }

/* Auto-generated photo galleries — see build.py render_gallery() / render_portfolio_gallery() */
.gallery-photo-single { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; margin: 2rem 0; }
.gallery-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.photo-gallery .gallery-photo { border-radius: 6px; }
@media (max-width: 860px) { .photo-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .photo-gallery { grid-template-columns: 1fr; } }

.photo-placeholder {
  background: repeating-linear-gradient(45deg, #eee3d3, #eee3d3 10px, #f2e9dc 10px, #f2e9dc 20px);
  border: 1px dashed var(--color-accent);
  color: #8a7355;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4/3; border-radius: 6px; font-size: .85rem; text-align: center; padding: 1rem;
}
/* Full-width fallback used by render_gallery() when a service has no photos yet */
.gallery-placeholder { aspect-ratio: 21/9; max-height: 260px; margin: 2rem 0; }

.badge { display: inline-block; font-size: .75rem; padding: .2em .7em; border-radius: 999px; background: var(--color-bg); border: 1px solid var(--color-accent); color: var(--color-accent); margin-bottom: .75rem; }

/* Contact form */
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); max-width: 720px; margin: 0 auto; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .9rem; }
input, select, textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid rgba(44,38,32,.2); border-radius: 4px;
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--color-text);
}
fieldset { border: 1px solid rgba(44,38,32,.2); border-radius: 4px; padding: .75rem 1rem; }
legend { font-weight: 500; font-size: .9rem; padding: 0 .4rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem .8rem; }
.checkbox-grid label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.checkbox-grid input { width: auto; }

/* Footer */
.site-footer { background: var(--color-text); color: #ece5d8; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 1.25rem 2rem; }
.footer-inner a { color: #ece5d8; }
.footer-inner h3 { color: #d8c9a8; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner ul li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 1.25rem; font-size: .8rem; opacity: .75; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: 1rem 1.25rem; display: none; box-shadow: 0 12px 24px rgba(44,38,32,.12); }
  .primary-nav.is-open { display: flex; }
  .primary-nav > ul { flex-direction: column; align-items: flex-start; gap: .25rem; width: 100%; }
  .dropdown { position: static; box-shadow: none; display: none; padding-left: 1rem; min-width: 0; }
  .has-dropdown.is-open .dropdown { display: block; }
}

.verified-note { font-size: .82rem; color: #8a7355; margin-top: .5rem; }
