/* Philos Investments — mobile first */

:root {
  --paper: #F6F1E8;
  --paper-2: #FCFAF5;
  --linen: #E9E0D2;
  --ink: #231F1A;
  --ink-2: #5A5148;
  --olive: #56603C;
  --olive-hover: #454E2F;
  --oak: #B98A5A;
  --night: #1F1C17;
  --olive-light: #C3CBA4;
  --on-night: #F6F1E8;
  --line: rgba(35, 31, 26, 0.14);
  --mullion: rgba(35, 31, 26, 0.22);

  --serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", "Batang", ui-serif, Georgia, serif;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  --header-h: 60px;
  --gutter: 24px;
  --section-y: 100px;
  --band-y: 100px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

main:focus { outline: none; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.grid > * { min-width: 0; }

.section { padding: var(--section-y) 0; }

/* ---------- type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--olive);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  flex: 0 0 24px;
  height: 1px;
  background: var(--oak);
}

.hero-title,
.h2,
.h3,
.lead,
.band-quote,
.fields {
  font-family: var(--serif);
  font-weight: 400;
}

.hero-title {
  font-size: clamp(48px, 14vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-title .line { display: block; }

.h2 {
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h3 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
}

.body-text {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

.note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

.small-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.credit {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
}
.credit a { text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--olive); }

/* ---------- links & buttons ---------- */

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 180ms var(--ease);
}
.text-link:hover { color: var(--olive); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 9999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.96); }
.btn-arrow { display: inline-block; transition: transform 200ms var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-olive { background: var(--olive); color: #fff; }
.btn-olive:hover { background: var(--olive-hover); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }

.btn-block { width: 100%; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark { flex: 0 0 auto; color: currentColor; }
.logo-text {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-desktop { display: none; }

.menu-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
}
.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 220ms var(--ease), opacity 160ms var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--paper);
  overflow-y: auto;
  padding: 32px 0 120px;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu-list li { border-bottom: 1px solid var(--line); }
.mobile-menu-list a {
  display: flex;
  align-items: center;
  min-height: 72px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu-list a:hover { color: var(--olive); }
.mobile-menu-mail { margin-top: 32px; }

main { padding-top: var(--header-h); }

/* ---------- 1. hero ---------- */

.hero { position: relative; }

.hero-inner { position: relative; z-index: 1; }

.hero-text { padding: 56px 0 48px; }

.hero-title { margin-bottom: 24px; }

.hero-lead {
  max-width: 34em;
  color: var(--ink-2);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--linen);
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

/* ---------- 2. about ---------- */

.about-head .h2 { margin-bottom: 40px; }
.about-body .lead { margin-bottom: 24px; }

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 40px 0 24px;
}

.fields {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
}
.fields .dot { color: var(--oak); }

/* ---------- 3. services ---------- */

.services { padding-top: 0; }

.services-head .h2 { margin-bottom: 16px; }

/* 휴대폰: 옆으로 넘기는 슬라이드 (다음 장이 살짝 보임). 600px부터는 격자 */
.cards {
  margin-top: 64px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.card { min-width: 0; flex: 0 0 82%; scroll-snap-align: start; }
.slider-count {
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}

.card-media {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: var(--linen);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-num {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.card .h3 { margin-top: 8px; }

.card-items { margin-top: 16px; }
.card-items li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- 4. sash window list ---------- */

.list { background: var(--paper); border-top: 1px solid var(--line); }

.list-head .h2 { max-width: 20em; }

.window { margin-top: 64px; }

.window-frame {
  border: 2px solid var(--ink);
  background: var(--paper-2);
}

.sash {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--mullion);
  margin: 0;
}

.pane {
  min-width: 0;
  min-height: 72px;
  padding: 24px;
  background: var(--paper-2);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.pane-num {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.pane-name {
  min-width: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
}

.meeting-rail {
  height: 6px;
  background: var(--oak);
}

.window-sill {
  height: 10px;
  margin: 0 -8px;
  background: var(--linen);
  border-bottom: 1px solid var(--line);
}

.list-foot {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

/* ---------- 5. dark band ---------- */

.band {
  background: var(--night);
  color: var(--on-night);
  padding: var(--band-y) 0;
  text-align: center;
}
.band-inner { display: flex; flex-direction: column; align-items: center; }
.band-mark { color: var(--olive-light); margin-bottom: 40px; }
.band-quote {
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 18em;
}
.band-sub {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--olive-light);
}

/* ---------- 6. contact ---------- */

.contact-info .h2 { margin-bottom: 24px; }

.email-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}
.email-big {
  min-width: 0;
  max-width: 100%;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
  word-break: break-all;
  padding: 10px 0;
  transition: color 180ms var(--ease);
}
.email-big:hover { color: var(--olive); }

.copy-btn {
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 180ms var(--ease);
}
.copy-btn:hover { color: var(--olive); }
.copy-btn.is-done { color: var(--olive); }

.contact-info > .note { margin-top: 8px; }

.contact-figure { margin-top: 40px; }
.contact-media {
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  overflow: hidden;
  background: var(--linen);
}
.contact-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.contact-form-wrap { margin-top: 64px; }

.form-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px -24px rgba(35, 31, 26, .35);
  padding: 32px 24px;
}
.form-title { margin-bottom: 24px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; min-width: 0; }
.field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.field-row { display: grid; grid-template-columns: minmax(0, 1fr); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(35, 31, 26, 0.24);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field input,
.field select {
  height: 52px;
  padding: 0 20px;
  border-radius: 9999px;
}
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 48px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235A5148' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  cursor: pointer;
}
.field textarea {
  min-height: 148px;
  padding: 16px 20px;
  border-radius: 16px;
  resize: vertical;
  line-height: 1.6;
}
.field textarea::placeholder { color: rgba(90, 81, 72, 0.8); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 2px var(--olive);
}

.form-card .btn { margin-top: 8px; }

.notice {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--linen);
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.notice:empty { display: none; }
.notice p + p { margin-top: 4px; }
.notice a {
  overflow-wrap: anywhere;
  word-break: break-all;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.notice a:hover { color: var(--olive); }

/* ---------- 7. footer ---------- */

.site-footer {
  background: var(--night);
  color: var(--on-night);
  padding: 80px 0 calc(40px + 80px);
}
.site-footer :focus-visible { outline-color: var(--olive-light); }

.footer-grid { row-gap: 40px; }

.logo-light { color: var(--on-night); }

.footer-line {
  margin-top: 16px;
  font-size: 15px;
  color: rgba(246, 241, 232, 0.72);
}

.footer-nav a,
.footer-mail a,
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-night);
  text-decoration: none;
  font-size: 15px;
  transition: color 180ms var(--ease);
}
.footer-nav a:hover,
.footer-mail a:hover,
.footer-bottom a:hover { color: var(--olive-light); }

.footer-mail a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(246, 241, 232, 0.14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: rgba(246, 241, 232, 0.72);
}
.footer-bottom a { font-size: 13px; }

/* ---------- 8. mobile contact bar ---------- */

.contact-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  min-height: 64px;
  padding: 6px 16px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
}

/* ================= ≥600px ================= */
@media (min-width: 600px) {
  .cards {
    display: grid;
    align-items: normal;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px 24px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .card { flex: none; scroll-snap-align: none; }
  .slider-count { display: none; }
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
  .form-card { padding: 40px; }
}

/* ================= ≥900px ================= */
@media (min-width: 900px) {
  :root {
    --header-h: 84px;
    --gutter: 40px;
    --section-y: 160px;
    --band-y: 180px;
  }

  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
  }

  .lead { font-size: 24px; }

  /* header */
  .logo-text { font-size: 18px; }
  .menu-toggle { display: none; }
  .mobile-menu,
  .mobile-menu[hidden] { display: none; }

  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 40px;
  }
  .nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  .nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    transition: color 180ms var(--ease);
  }
  .nav-list a:hover { color: var(--olive); }
  .nav-mail { font-size: 14px; }

  /* hero */
  .hero {
    min-height: min(88vh, 860px);
    display: flex;
    align-items: center;
  }
  .hero-inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
  }
  .hero-text {
    grid-column: 1 / span 7;
    min-width: 0;
    padding: 96px 0;
  }
  .hero-title {
    font-size: clamp(56px, 7.4vw, 120px);
    line-height: 1.08;
    margin-bottom: 32px;
  }
  .hero-lead { max-width: 26em; }
  .hero-actions { margin-top: 48px; }

  .hero-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }
  .hero-media img { object-position: 50% 45%; }
  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(246,241,232,.94) 0%, rgba(246,241,232,.78) 38%, rgba(246,241,232,0) 68%);
    pointer-events: none;
  }

  /* about */
  .about-head { grid-column: 1 / 6; }
  .about-head .h2 { margin-bottom: 0; }
  .about-body { grid-column: 7 / 13; padding-top: 40px; }

  /* services */
  .services-head { grid-column: 1 / 8; }
  .cards {
    margin-top: 80px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }

  /* sash */
  .list-head { text-align: center; }
  .list-head .eyebrow { justify-content: center; }
  .list-head .eyebrow::after {
    content: "";
    flex: 0 0 24px;
    height: 1px;
    background: var(--oak);
  }
  .list-head .h2 { margin: 0 auto; }
  .window { margin-top: 80px; }
  .sash { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pane {
    min-height: 160px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
  }
  .pane-name { font-size: 20px; }
  .list-foot { justify-content: center; margin-top: 48px; }

  /* band */
  .band-inner { grid-column: 3 / 11; }

  /* contact */
  .contact-info { grid-column: 1 / 6; }
  .contact-media { aspect-ratio: 4 / 5; }
  .contact-form-wrap {
    grid-column: 7 / 13;
    margin-top: 0;
    align-self: start;
  }
  .form-card { padding: 48px; }

  /* footer */
  .site-footer { padding: 100px 0 40px; }
  .footer-brand { grid-column: 1 / 6; }
  .footer-nav { grid-column: 7 / 10; }
  .footer-mail { grid-column: 10 / 13; }
  .footer-bottom { grid-column: 1 / -1; margin-top: 24px; }

  /* bottom bar off */
  .contact-bar { display: none; }
}

@media (min-width: 1200px) {
  .hero-text { grid-column: 1 / 7; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .btn:active { transform: none; }
}

/* 사진 판 고르기용 감싸개 (optimize_images.py): 배치에 끼지 않음 */
picture{display:contents}
