:root {
  /* 컬러 시스템 (Figma 07) */
  --c-forest: #2f4a3a;   /* MAIN · 신뢰 — 헤더·제목·푸터, 전문 농가(모두싹) */
  --c-olive: #6b8e4e;    /* SUB · 안전 — 아이콘·강조 텍스트, 친환경 인증 */
  --c-brown: #9a7550;    /* SUB · 친근함 — 텃밭 입문(왕잘커), 재배 이야기·후기 */
  --c-sage: #5b7f73;     /* SUB · 지속가능 — 기술·저탄소, 데이터·인포그래픽 */
  --c-gold: #d6a63a;     /* POINT · 제독 유황 — 구매·문의·상담 버튼, 핵심 수치 */

  --c-cream: #f7f4ee;    /* 페이지 배경 */
  --c-white: #fff;       /* 카드·콘텐츠 박스 */
  --c-light-green: #dce5d0; /* 선택·강조 배경 */
  --c-charcoal: #26332b; /* 본문 텍스트 */

  --c-text: #26332b;
  --c-text-sub: #4a5a50;
  --c-text-muted: #5f6a61;
  --c-lead: #4e6b57;

  --c-green-1: #5a7a63;
  --c-green-2: #4a6953;
  --c-green-3: #3b5745;
  --c-green-4: #2f4a3a;
  --c-green-5: #22352a;

  --c-accent: #d6a63a;
  --c-bg-soft: #f3f1ea;
  --c-line: #e5e1d8;

  --c-footer: #26332b;
  --c-footer-bar: #1e2822;
  --c-footer-text: #afb8b0;

  --f-title: 'Noto Sans KR', sans-serif;
  --f-body: 'Gowun Dodum', 'Noto Sans KR', sans-serif;

  /* 텍스트 스타일 (Figma Desktop/*) — font: weight size/line-height family */
  --t-h1: 900 64px/1.25 var(--f-title);       /* 히어로 제목 · 자간 -2% */
  --t-h2: 700 40px/1.3 var(--f-title);        /* 섹션 제목 · 자간 -1% */
  --t-h3: 700 26px/1.4 var(--f-title);        /* 카드 제목 */
  --t-number: 900 48px/1.2 var(--f-title);    /* 수치 · 자간 -1% */
  --t-label: 700 18px/1.4 var(--f-title);     /* 라벨 */
  --t-button: 700 18px/1.2 var(--f-title);    /* 버튼 */
  --t-body: 400 18px/1.7 var(--f-body);       /* 본문 */
  --t-caption: 400 16px/1.5 var(--f-title);   /* 보조 정보 */
  --t-quick: 700 14px/1.2 var(--f-title);     /* 퀵메뉴 */

  --radius: 12px;

  --inner: 1280px;
  --gutter: 20px;
  --sub-hero-h: 320px;       /* 서브 히어로 높이 (모든 서브페이지 공통, 모바일 240px) */
  --header-h: 50px;          /* 헤더 높이 (메인·서브 공통, 모바일은 아래 @media에서 48px) */
  --header-h-scrolled: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font: var(--t-body);
  color: var(--c-text);
  background: var(--c-cream);
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--f-title);
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.inner {
  width: 100%;
  max-width: calc(var(--inner) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.blind {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 로고 (헤더·푸터 공통) */
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; color: inherit; white-space: nowrap; }
.brand img { width: clamp(142px, 15vw, 190px); height: auto; object-fit: contain; }

/* 서브페이지 헤더: 흰 바탕 · 컬러 로고. 로고와 메뉴를 본문 폭(.inner) 안에 두고 메뉴는 오른쪽 끝 정렬
   (메인 헤더는 main.css. 이 규칙은 .site-header--sub에만 적용) */
/* 스크롤해도 화면 위에 붙어 있음 (자리를 차지한 채 고정돼 본문이 밀리지 않음) */
.site-header--sub { position: sticky; top: 0; z-index: 20; height: var(--header-h); border-bottom: 1px solid var(--c-line); background: #fff; color: var(--c-text); }
.site-header--sub .site-header__inner { display: flex; align-items: center; gap: 32px; max-width: calc(var(--inner) + var(--gutter) * 2); height: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.site-header--sub .brand img { width: clamp(96px, 9.6vw, 122px); }
/* 메뉴 글씨는 메인(main.css)과 같은 서체·크기·간격, 색만 어둡게 */
.site-header--sub .primary-nav { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: calc(clamp(18px, 3.2vw, 48px) + 1em); color: var(--c-text); font: 700 17px/1.2 var(--f-title); }
.site-header--sub .primary-nav__item { position: relative; padding: 14px 0; white-space: nowrap; }
/* 지금 보고 있는 메뉴는 글자색만 진한 녹색 (밑줄 없음) */
.site-header--sub .primary-nav__item.is-current { color: var(--c-forest); }
.site-header--sub .menu-toggle { display: grid; width: 34px; height: 34px; flex: none; align-content: center; justify-items: center; gap: 4px; border: 1px solid var(--c-line); border-radius: 50%; }
.site-header--sub .menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
/* 세 줄 → X: 가운데 줄은 사라지고 위·아래 줄이 엇갈림 */
.site-header--sub .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.site-header--sub .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header--sub .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
/* 페이지 안 이동(#weekly 등) 때 고정 헤더에 제목이 가리지 않게 */
html:has(.site-header--sub) { scroll-padding-top: var(--header-h); }
.mega-menu[hidden] { display: none; }
/* 메가메뉴 (전 페이지 공통): 헤더 메뉴에 마우스를 올리거나 ☰를 누르면 내려옴 — js/common.js */
.mega-menu { position: absolute; z-index: 11; top: 100%; right: 0; left: 0; border-top: 1px solid rgb(47 74 58 / 12%); background: rgb(255 255 255 / 99%); color: var(--c-text); box-shadow: 0 16px 24px rgb(25 42 31 / 12%); }
.mega-menu__inner { display: grid; width: min(1280px, calc(100% - 48px)); grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 auto; border-bottom: 1px solid var(--c-line); }
.mega-menu.is-aligned { border-top: 0; background: transparent; box-shadow: none; pointer-events: none; }
.mega-menu.is-aligned .mega-menu__inner { border-top: 1px solid rgb(47 74 58 / 12%); background: rgb(255 255 255 / 99%); box-shadow: 0 16px 24px rgb(25 42 31 / 12%); pointer-events: auto; }
.mega-menu.is-aligned .mega-menu__inner { width: max-content; }
.mega-menu.is-aligned .mega-menu__group { align-items: center; padding-right: 6px; padding-left: 6px; text-align: center; white-space: nowrap; }
.mega-menu.is-aligned .mega-menu__group:first-child { border-left: 0; }
.mega-menu.is-aligned .mega-menu__group:last-child { border-right: 0; }
.mega-menu__group { display: flex; min-width: 0; min-height: 154px; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 8px 20px 0; border-right: 1px solid #f0eee8; transition: background-color .18s ease; }
.mega-menu__group:first-child { border-left: 1px solid #f0eee8; }
.mega-menu__group:hover, .mega-menu__group.is-active { background: #f1efe8; }
.mega-menu__group h2 { margin-bottom: 2px; color: var(--c-forest); font: 700 15px/1.4 var(--f-title); }
.mega-menu__group a { color: #657168; font: 400 14px/1.45 var(--f-title); transition: color .16s ease; }
.mega-menu__group h2, .mega-menu__group a { max-width: 100%; overflow-wrap: anywhere; }
.mega-menu__group a:hover, .mega-menu__group a:focus-visible { color: var(--c-forest); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .mega-menu__inner { width: calc(100% - 40px); grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mega-menu__group { padding-right: 10px; padding-left: 10px; }
  .mega-menu__group h2 { font-size: 14px; }
  .mega-menu__group a { font-size: 13px; }
}
@media (max-width: 640px) {
  /* 좁은 화면에서는 뒤 내용과 겹치지 않게 불투명한 흰 바탕 */
  .mega-menu { max-height: calc(100svh - var(--header-h)); overflow-y: auto; background: #fff; }
  .mega-menu__inner { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-menu__group { min-height: 150px; padding: 16px 18px; border-bottom: 1px solid #f0eee8; }
  .mega-menu__group:first-child { border-left: 0; }
  .mega-menu__group:nth-child(2n) { border-right: 0; }
  .mega-menu__group h2 { margin-bottom: 4px; }
}
@media (max-width: 900px) {
  .site-header--sub .primary-nav { gap: 12px; font-size: 15px; }
}

/* 떠 있는 버튼 '뒤로' · 'TOP' (전 페이지 공통, js/common.js가 만듦) */
.float-actions { position: fixed; z-index: 19; right: 24px; bottom: 24px; display: grid; gap: 8px; opacity: 0; transform: translateY(12px); visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s; }
.float-actions.is-visible { opacity: 1; transform: none; visibility: visible; }
.float-actions__btn { display: block; width: 96px; height: auto; padding: 0; border: 0; background: none; filter: drop-shadow(0 6px 12px rgb(25 42 31 / 30%)); transition: transform .18s ease; }
.float-actions__btn img { display: block; width: 100%; height: auto; }
.float-actions__btn:hover, .float-actions__btn:focus-visible { transform: translateY(-4px) scale(1.06); }
.float-actions__btn:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 4px; border-radius: 8px; }
@media (max-width: 640px) {
  .float-actions { right: 14px; bottom: 16px; }
  .float-actions__btn { width: 72px; }
  /* 메인 모바일 하단 메뉴 바 위로 띄움 */
  body:has(.mobile-bottom-nav) .float-actions { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* 서브 히어로 (서브페이지 공통): 오른쪽에 배경 사진, 왼쪽은 같은 사진을 흐리게(::before, 페이지별 CSS에서 지정), 글자 쪽은 그늘 */
.sub-hero { position: relative; height: var(--sub-hero-h); flex: none; overflow: hidden; background: var(--c-forest); color: #fff; }
.sub-hero::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(22 38 30 / 45%) 0%, rgb(22 38 30 / 22%) 40%, rgb(22 38 30 / 0%) 65%); content: ""; }
.sub-hero__bg { position: absolute; right: 0; bottom: 0; width: auto; max-width: none; height: 130%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
/* 모두싹 마크: 메인 히어로와 같이 오른쪽 햄버거(☰) 버튼 아래에서 빙글빙글(세로축) 회전 */
.sub-hero__mark { position: absolute; z-index: 2; top: 28px; right: max(var(--gutter), calc((100% - var(--inner)) / 2)); width: clamp(168px, 14vw, 216px); height: auto; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 35%)); animation: sub-hero-mark-spin 4s linear infinite; }
@keyframes sub-hero-mark-spin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .sub-hero__mark { animation: none; } }
.sub-hero__inner { position: relative; z-index: 1; display: flex; height: 100%; flex-direction: column; justify-content: center; text-shadow: 0 1px 3px rgb(10 20 15 / 45%), 0 2px 12px rgb(10 20 15 / 35%); }
.breadcrumb ol { display: flex; flex-wrap: wrap; color: rgb(255 255 255 / 85%); font: 400 15px/1.4 var(--f-title); }
.breadcrumb li + li::before { margin: 0 8px; content: "›"; }
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: #fff; text-decoration: underline; }
.sub-hero h1 { margin: 10px 0 14px; font: 900 48px/1.25 var(--f-title); letter-spacing: -.02em; }
.sub-hero__lead { font: 400 20px/1.6 var(--f-title); }
@media (max-width: 640px) {
  :root { --sub-hero-h: 240px; }
  .sub-hero__bg { right: -60px; height: 120%; }
  .sub-hero::after { background: linear-gradient(90deg, rgb(22 38 30 / 55%) 0%, rgb(22 38 30 / 25%) 70%, rgb(22 38 30 / 10%) 100%); }
  .sub-hero h1 { margin: 6px 0 8px; font-size: 32px; }
  .sub-hero__mark { top: 16px; width: 128px; }
  .sub-hero__lead { font-size: 16px; }
}

/* 소식 · 고객지원 히어로 (news.html · post.html · tv.html 공통): 황금빛 논과 태블릿을 든 농부 사진을 꽉 채우고 왼쪽 글자 쪽만 그늘 */
.sub-hero.sub-hero--news .sub-hero__bg { right: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; -webkit-mask-image: none; mask-image: none; }
.sub-hero.sub-hero--news::after { background: linear-gradient(90deg, rgb(22 38 30 / 70%) 0%, rgb(22 38 30 / 40%) 40%, rgb(22 38 30 / 0%) 70%); }

/* 푸터 (전 페이지 공통) */
.site-footer { background: #1e2b24; color: #fff; }
.footer-main { display: flex; align-items: center; gap: 40px; padding-top: 36px; padding-bottom: 36px; }
.footer-main .brand { flex: none; }
.footer-info { display: grid; flex: 1; gap: 6px; color: #bdc7bf; font: 400 15px/1.6 var(--f-title); }
.footer-info p { display: flex; flex-wrap: wrap; row-gap: 4px; }
.footer-info span + span::before { display: inline-block; width: 1px; height: 12px; margin: 0 14px; background: rgb(255 255 255 / 22%); content: ""; vertical-align: -1px; }
.footer-info b { margin-right: 8px; color: #fff; font-weight: 700; }
.footer-info a:hover, .footer-info a:focus-visible { color: #fff; text-decoration: underline; }
.footer-cs { flex: none; text-align: right; }
/* 오른쪽 아래 떠 있는 뒤로·TOP 버튼(폭 약 80px)이 고객센터 전화번호를 가리지 않게, 화면이 좁을수록 그만큼 왼쪽으로 */
.footer-cs { margin-right: max(0px, calc(70px - (100vw - 1320px) / 2)); }
.footer-cs > span { display: block; color: #bdc7bf; font: 700 14px/1.4 var(--f-title); }
.footer-phone { display: block; margin: 2px 0 4px; font: 900 30px/1.2 var(--f-title); }
.footer-cs p { color: #bdc7bf; font: 400 14px/1.4 var(--f-title); }
.footer-bottom { display: flex; justify-content: space-between; padding: 14px max(24px, calc((100% - 1280px)/2)); background: #17211c; color: #aab4ac; font: 400 13px/1.4 var(--f-title); }

/* 태블릿: 회사 정보가 두 줄 이상으로 넘어가면 줄 앞에 구분선이 남으므로 한 항목씩 줄바꿈 */
@media (max-width: 1180px) {
  .footer-info p { flex-direction: column; }
  .footer-info span + span::before { display: none; }
}

@media (max-width: 640px) {
  .brand img { width: 142px; }
  :root { --header-h: 48px; }
  .site-header--sub .primary-nav { display: none; }
  .site-header--sub .menu-toggle { margin-left: auto; }
  .footer-main { align-items: flex-start; flex-direction: column; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
  .footer-info { font-size: 13px; }
  .footer-info p { flex-direction: column; }
  .footer-info span + span::before { display: none; }
  .footer-cs { margin-right: 0; text-align: left; }
  .footer-phone { font-size: 26px; }
  .footer-bottom { gap: 8px; flex-direction: column; padding: 14px 20px; font-size: 12px; }
}