/* ==========================================================================
   PLANT MATTER — PC (plantmatter.kr)
   톤: 앱과 같은 화이트 · 모노톤 · 각진 모서리 · 대문자 라벨 · 이탤릭 학명
   서체: Figtree (영문·숫자 300/700, 큰 숫자 800) + Noto Sans KR (한글 300/700)
   ========================================================================== */

:root {
  --text: #171717;
  --accent: #222;
  --mid: #555;
  --muted: #777;
  --line: #e8e8e8;
  --bg: #fff;

  --font: "Figtree", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --gnb-h: 96px;
  --side: clamp(24px, 3.4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 960px;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.7;
  font-synthesis: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
}
p, h1 { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 상단 바 ---------- */
.gnb {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--gnb-h); padding: 0 var(--side);
  display: flex; align-items: center;
}
.gnb__logo img { width: 200px; height: auto; }
.gnb__menu { display: flex; gap: 48px; margin-left: 80px; }
.gnb__menu a {
  position: relative; padding: 8px 0;
  font-size: 14px; font-weight: 700; letter-spacing: .16em;
}
.gnb__menu a::after {
  content: ""; position: absolute; left: 0; right: .16em; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.gnb__menu a:hover::after, .gnb__menu a.is-current::after { transform: scaleX(1); }
.gnb__util { display: flex; gap: 6px; margin-left: auto; margin-right: -8px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.icon-btn:hover svg { stroke-width: 1.9; }

/* ---------- 홈 (한 화면 가득) ---------- */
.hero {
  position: relative;
  height: 100vh; min-height: 680px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--gnb-h) var(--side) 48px;
  overflow: hidden;
}
.hero__media { display: flex; justify-content: center; }
.hero__media img {
  width: auto; height: auto; max-width: 100%;
  /* 화면 높이 - 상단 바 - 아래 여백 */
  max-height: min(calc(max(100vh, 680px) - var(--gnb-h) - 72px), 1100px);
  animation: hero-in 1.8s var(--ease) both;
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }


/* ---------- 검색 ---------- */
.search { position: fixed; inset: 0; z-index: 40; visibility: hidden; transition: visibility 0s .45s; }
.search.is-open { visibility: visible; transition: none; }
.search__panel {
  position: relative; z-index: 1;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 140px var(--side) 72px;
  transform: translateY(-100%); transition: transform .45s var(--ease);
}
.search.is-open .search__panel { transform: none; }
.search__form { display: flex; align-items: center; max-width: 760px; margin: 0 auto; border-bottom: 1px solid var(--text); }
.search__form input {
  flex: 1; min-width: 0; height: 64px; padding: 0; border: 0; background: none; outline: none;
  font-size: 26px; font-weight: 300; letter-spacing: -.02em;
}
.search__form input::placeholder { color: #bbb; }
.search__form input::-webkit-search-cancel-button { display: none; }
.search__msg { max-width: 760px; margin: 18px auto 0; min-height: 1.6em; font-size: 14px; color: var(--muted); }
.search__logo { position: absolute; top: 40px; left: var(--side); width: 200px; height: auto; }
.search__close {
  position: absolute; top: 34px; right: var(--side);
  padding: 8px 0; border: 0; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .16em;
}
.search__dim { position: absolute; inset: 0; background: rgba(23, 23, 23, .18); opacity: 0; transition: opacity .45s var(--ease); }
.search.is-open .search__dim { opacity: 1; }

/* ---------- 안내 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 22px; background: var(--accent); color: #fff;
  font-size: 13px; letter-spacing: .02em; white-space: nowrap;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.to-mobile {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  padding: 10px 14px; background: #fff; border: 1px solid #bcbcbc;
  font-size: 13px; font-weight: 700;
}
.to-mobile[hidden] { display: none; }
/* 휴대폰에서는 화면이 약 1/3로 축소되므로 버튼을 크게 */
.pc-on-phone .to-mobile { right: 32px; bottom: 32px; padding: 26px 40px; border-width: 2px; font-size: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
