/* ============================================
   팀지드 (TEAM JID) — 스타일시트
   디자인 토큰은 02_디자인/디자인가이드.md 기준
   ============================================ */

:root {
  /* Color */
  --color-primary: #1F1D1B;
  --color-accent: #B08968;
  --color-accent-deep: #8C6A4E;
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-text: #1F1D1B;
  --color-text-sub: #6E6A65;
  --color-border: #E7E2DB;
  --color-photo: #D6D0C8;

  /* Type */
  --font-body: 'Pretendard', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif KR', serif;

  /* Spacing */
  --space-sm: 16px; --space-md: 24px; --space-lg: 48px; --space-xl: 96px;

  /* Radius & Shadow */
  --radius-sm: 6px; --radius-md: 12px;
  --shadow-card: 0 4px 20px rgba(31, 29, 27, 0.06);
  --shadow-header: 0 2px 12px rgba(31, 29, 27, 0.05);

  --container: 1200px;
  --header-h: 74px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .2s, transform .2s; font-family: inherit;
}
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-accent-deep); transform: translateY(-2px); }
.btn--sm { padding: 11px 20px; font-size: 15px; }
.btn--lg { padding: 16px 34px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: var(--shadow-header); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { font-weight: 800; font-size: 22px; letter-spacing: 1px; }
.logo--light { color: #fff; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav > a { font-weight: 500; font-size: 15px; color: var(--color-text-sub); transition: color .2s; }
.nav > a:hover { color: var(--color-primary); }
.nav > a.btn { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-primary); transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 66vh; margin-top: var(--header-h);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: -20%; height: 140%;
  background: url('../images/hero.jpg') center 35% / cover no-repeat;
  transform: translateY(var(--parallax, 0px)); will-change: transform; z-index: -2;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(rgba(18,16,14,.48), rgba(18,16,14,.62)); z-index: -1; }
.hero__content { position: relative; z-index: 1; padding: 40px 24px; max-width: 900px; }
.hero__label { color: var(--color-accent); font-weight: 500; letter-spacing: 4px; margin-bottom: 22px; font-size: 15px; }
.hero__title { font-size: clamp(42px, 6.5vw, 72px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 24px; }
.hero__sub { font-size: clamp(16px, 2vw, 20px); opacity: .9; margin-bottom: 40px; font-weight: 300; }

/* ---------- Philosophy ---------- */
.philosophy { padding: var(--space-xl) 0; text-align: center; background: var(--color-bg); }
.philosophy__quote { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 4vw, 42px); margin-bottom: 24px; }
.philosophy__body { color: var(--color-text-sub); font-size: 18px; line-height: 1.9; margin-bottom: 20px; }
.philosophy__by { color: var(--color-accent); font-size: 15px; }

/* ---------- Trust ---------- */
.trust { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 52px 24px; }
.trust__item { text-align: center; padding: 0 12px; }
.trust__item strong { display: block; color: var(--color-accent); font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.trust__item span { color: var(--color-text-sub); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: var(--space-xl) 0; }
.services, .reviews { background: var(--color-bg); }
.portfolio { background: var(--color-surface); }
.pricing { background: var(--color-bg); }
.section__head { text-align: center; margin-bottom: 56px; }
.section__title { font-size: clamp(28px, 4vw, 36px); font-weight: 800; margin-bottom: 14px; }
.section__sub { color: var(--color-text-sub); font-size: 18px; }

/* ---------- Cards (services / reviews) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(31,29,27,.1); }
.card__photo { height: 210px; background: var(--color-photo); background-size: cover; background-position: center; position: relative; }
.card__photo[data-label]::after { content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 500; }
.card__body { padding: 26px 28px 30px; }
.card__body h3 { font-size: 21px; margin-bottom: 10px; }
.card__body p { color: var(--color-text-sub); font-size: 15px; line-height: 1.6; }

/* ---------- Portfolio grid ---------- */
.portfolio__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.portfolio__more { color: var(--color-accent); font-weight: 500; font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.tile__photo { height: 230px; border-radius: 10px; background: var(--color-photo); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.tile__photo[data-label]::after { content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 500; }
.tile figcaption { margin-top: 12px; font-weight: 700; font-size: 17px; }
.tile { transition: transform .2s; }
.tile:hover { transform: translateY(-4px); }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; }
.tier { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 44px 32px; text-align: center; }
.tier--hot { background: var(--color-primary); border-color: var(--color-primary); }
.tier__name { color: var(--color-text-sub); font-weight: 500; font-size: 17px; margin-bottom: 16px; }
.tier--hot .tier__name { color: var(--color-accent); }
.tier__price { font-size: 34px; font-weight: 800; margin-bottom: 16px; }
.tier__price span { font-size: 16px; font-weight: 500; color: var(--color-text-sub); margin-left: 4px; }
.tier--hot .tier__price, .tier--hot .tier__desc { color: #fff; }
.tier--hot .tier__price span { color: rgba(255,255,255,.8); }
.tier__desc { color: var(--color-text-sub); font-size: 15px; line-height: 1.6; }
.pricing__note { text-align: center; color: var(--color-text-sub); font-size: 14px; margin-top: 40px; }

/* ---------- Reviews ---------- */
.review { background: var(--color-surface); border-radius: var(--radius-md); padding: 32px 28px; box-shadow: var(--shadow-card); }
.review p { font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.review cite { color: var(--color-accent); font-size: 14px; font-style: normal; font-weight: 600; }

/* ---------- Contact ---------- */
.contact { background: var(--color-primary); color: #fff; padding: var(--space-xl) 0; }
.contact__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contact__intro h2 { font-size: clamp(28px, 4vw, 36px); font-weight: 800; margin-bottom: 20px; }
.contact__intro > p { opacity: .8; font-size: 17px; margin-bottom: 30px; }
.contact__direct { display: flex; flex-direction: column; gap: 14px; font-size: 17px; }
.contact__direct a { border-bottom: 1px solid rgba(255,255,255,.3); }

.quote-form { background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-md); padding: 36px; }
.field { margin-bottom: 18px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: #fff; color: var(--color-text);
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent); }
.field textarea { resize: vertical; }
.agree { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--color-text-sub); margin-bottom: 20px; cursor: pointer; }
.agree input { width: 16px; height: 16px; accent-color: var(--color-accent); }
.form-msg { margin-top: 14px; font-size: 15px; font-weight: 600; text-align: center; min-height: 20px; }
.form-msg.success { color: #2e7d32; }
.form-msg.error { color: #c62828; }

/* ---------- Footer ---------- */
.footer { background: #17150F; color: #fff; padding: 54px 0 30px; }
.footer__inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer__info .logo { font-size: 20px; margin-bottom: 12px; }
.footer__info p { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.8; }
.footer__sns { display: flex; gap: 20px; }
.footer__sns a { color: rgba(255,255,255,.8); font-weight: 500; font-size: 15px; transition: color .2s; }
.footer__sns a:hover { color: #fff; }
.footer__copy { text-align: center; color: rgba(255,255,255,.4); font-size: 13px; margin-top: 40px; }

/* ---------- Mobile fixed bar ---------- */
.mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; }
.mobile-bar__btn { flex: 1; text-align: center; padding: 15px; font-weight: 700; font-size: 15px; background: var(--color-primary); color: #fff; }
.mobile-bar__btn--accent { background: var(--color-accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Certifications (자격증 강조) ---------- */
.certs { background: var(--color-primary); color: #fff; }
.certs .section__title { color: #fff; }
.certs .section__sub { color: rgba(255,255,255,.72); }
.certs__eyebrow { color: var(--color-accent); letter-spacing: 3px; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cert { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 28px 18px; text-align: center; transition: transform .2s, background .2s, border-color .2s; }
.cert:hover { background: rgba(176,137,104,.14); border-color: var(--color-accent); transform: translateY(-4px); }
.cert__seal { width: 52px; height: 52px; border-radius: 50%; background: rgba(176,137,104,.18); color: var(--color-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.cert__name { font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.cert__type { font-size: 12px; color: var(--color-accent); margin-top: 6px; letter-spacing: .5px; }
.certs__note { text-align: center; margin-top: 40px; color: rgba(255,255,255,.85); font-size: 16px; }
.certs__note strong { color: var(--color-accent); }

/* ============================================
   Gallery page (사례 전체)
   ============================================ */
.page-hero { margin-top: var(--header-h); padding: 72px 0 44px; text-align: center; background: var(--color-bg); }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-bottom: 14px; }
.page-hero p { color: var(--color-text-sub); font-size: 17px; }
.gallery-section { padding: 10px 0 90px; background: var(--color-bg); }
.filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { padding: 10px 26px; border: 1px solid var(--color-border); background: #fff; border-radius: 30px; font-size: 15px; font-weight: 600; color: var(--color-text-sub); cursor: pointer; transition: all .2s; font-family: inherit; }
.filter-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.filter-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.count-note { text-align: center; color: var(--color-text-sub); font-size: 14px; margin-bottom: 30px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; cursor: pointer; background: var(--color-photo); transition: transform .2s, box-shadow .2s; }
.gallery-grid img:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(31,29,27,.12); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 1000; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox__close { position: absolute; top: 20px; right: 28px; color: #fff; font-size: 42px; line-height: 1; cursor: pointer; background: none; border: none; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 46px; cursor: pointer; background: none; border: none; padding: 16px 20px; user-select: none; }
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }
.lightbox__counter { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .cards, .grid, .tiers { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  :root { --space-xl: 64px; }
  .nav {
    position: fixed; top: var(--header-h); right: 0; width: 70%; height: calc(100vh - var(--header-h));
    background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 20px;
    transform: translateX(100%); transition: transform .3s; box-shadow: -4px 0 20px rgba(0,0,0,.08);
  }
  .nav.open { transform: none; }
  .nav > a { width: 100%; padding: 14px 6px; font-size: 16px; border-bottom: 1px solid var(--color-border); }
  .nav > a.btn { margin-top: 14px; border-bottom: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .field--row { grid-template-columns: 1fr; }
  .quote-form { padding: 24px; }
  .mobile-bar { display: flex; }
  body { padding-bottom: 52px; }
  .footer__inner { flex-direction: column; }
}

@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .lightbox__nav { font-size: 32px; padding: 10px; } }
