/* =========================================================
   (주)에이원 홈페이지 스타일
   컬러: 딥 네이비/블루(기술) + 시안/틸(물·친환경) + 그린 액센트(에너지)
   ========================================================= */

:root {
  /* 자연 친화 그린 팔레트 (기술=딥 포레스트, 물·친환경=민트/틸, 에너지=리프) */
  --navy: #123d29;      /* deep forest: 제목·푸터·히어로 베이스·다크 버튼 */
  --navy-2: #1c5236;    /* forest 2 */
  --blue: #1f9d57;      /* primary green: 버튼·링크·active */
  --blue-600: #15773f;  /* primary green hover */
  --cyan: #5fd39b;      /* mint: 히어로 accent */
  --teal: #12a37a;      /* teal-green: eyebrow·보조 라벨 */
  --green: #46b96a;     /* leaf: 체크·틱 */
  --ink: #0f1c14;       /* 본문(고대비) */
  --gray-700: #33413a;
  --gray-500: #5f6b64;
  --gray-300: #c6d0ca;
  --gray-100: #eaf1ec;
  --gray-50: #f4f8f5;
  --white: #ffffff;
  --line: #dde7e0;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(11, 37, 69, .06);
  --shadow: 0 12px 34px rgba(11, 37, 69, .12);
  --maxw: 1180px;
  --header-h: 72px;

  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
          "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
html, body { overflow-x: clip; }   /* 가로 오버플로 안전장치 */
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;              /* 더 뚜렷하게: 기본 크기 상향 */
  font-weight: 450;             /* 본문 살짝 굵게 */
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.28; margin: 0; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
strong, b { font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 헤더 / GNB ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; }
.brand-text strong { display: block; font-size: 1.12rem; color: var(--navy); letter-spacing: -.03em; }
.brand-text em { font-style: normal; font-size: .72rem; color: var(--gray-500); letter-spacing: .04em; }

.gnb ul { display: flex; align-items: center; gap: 6px; }
.gnb a {
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; color: var(--ink); transition: .15s;
}
.gnb a:hover { color: var(--blue); background: var(--gray-50); }
.gnb .gnb-cta {
  background: var(--blue); color: #fff; margin-left: 6px;
}
.gnb .gnb-cta:hover { background: var(--blue-600); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  cursor: pointer; flex-direction: column; gap: 5px; justify-content: center; align-items: center;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .98rem;
  border: 1.5px solid transparent; cursor: pointer; transition: .18s;
}
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--gray-300); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- 섹션 공통 ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--gray-50); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); color: var(--navy); font-weight: 850; }
.section-head p { margin-top: 14px; color: var(--gray-700); font-size: 1.08rem; font-weight: 500; }

/* ---------- 히어로 ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(95,211,155,.42), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(70,185,106,.32), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #0e5a37 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(80% 80% at 60% 20%, #000, transparent);
}
.hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 40px; align-items: center;
  padding-top: 92px; padding-bottom: 100px;   /* 좌우 padding 은 .container(0 20px) 유지 */
}
.hero-inner > * { min-width: 0; }   /* 그리드 blowout 방지 (긴 줄 줄바꿈) */
.hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); letter-spacing: -.03em; font-weight: 850; }
.hero h1 .accent { color: #a7f3c9; }
.hero .lead { margin-top: 20px; font-size: 1.16rem; font-weight: 500; color: rgba(255,255,255,.9); max-width: 560px; }
.hero-actions { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badges { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  font-size: .82rem; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
}
.hero-visual {
  position: relative; aspect-ratio: 1/1; border-radius: 26px;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(126,227,240,.35), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center;
}
.hero-visual .ring {
  position: absolute; border: 1.5px dashed rgba(255,255,255,.28); border-radius: 50%;
  animation: spin 26s linear infinite;
}
.hero-visual .ring.r1 { inset: 8%; }
.hero-visual .ring.r2 { inset: 22%; animation-duration: 40s; animation-direction: reverse; }
.hero-visual .ring.r3 { inset: 36%; }
.hero-visual .core {
  width: 34%; height: 34%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c6f7da, var(--cyan) 60%, var(--teal));
  box-shadow: 0 0 60px rgba(31,157,87,.6);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-visual .ring { animation: none; } }

/* ---------- 통계 스트립 ---------- */
.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 34px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.stat .num em { font-style: normal; color: var(--teal); font-size: 1.3rem; }
.stat .label { font-weight: 700; margin-top: 2px; }
.stat .note { color: var(--gray-500); font-size: .86rem; margin-top: 4px; }

/* ---------- 사업분야 카드 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .card-ico {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}
.card .card-ico .ico { width: 28px; height: 28px; }
.card h3 { font-size: 1.16rem; color: var(--navy); }
.card .card-sum { color: var(--gray-500); margin-top: 10px; font-size: .96rem; }
.card ul.ticks { margin-top: 16px; display: grid; gap: 8px; }
.card ul.ticks li { position: relative; padding-left: 24px; font-size: .92rem; color: var(--gray-700); }
.card ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px;
  background: var(--green); border-radius: 50%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- 클라이언트 / 인증 배지 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; color: var(--gray-700); font-size: .92rem;
}

/* ---------- CTA 밴드 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--blue-600));
  color: #fff; border-radius: 20px; padding: 48px; text-align: center;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { margin-top: 12px; color: rgba(255,255,255,.85); }
.cta-band .hero-actions { justify-content: center; }

/* ---------- 페이지 헤더 (서브페이지 상단) ---------- */
.page-hero {
  color: #fff; padding: 66px 0 58px;
  background:
    radial-gradient(700px 400px at 85% -20%, rgba(95,211,155,.4), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
}
.page-hero .eyebrow { color: #a7f3c9; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { margin-top: 12px; color: rgba(255,255,255,.82); }
.breadcrumb { font-size: .84rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; }

/* ---------- 서브 내비 (탭) ---------- */
.subnav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--header-h); z-index: 50; }
.subnav ul { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { display: inline-block; padding: 16px 18px; font-weight: 600; color: var(--gray-500); white-space: nowrap; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--navy); }
.subnav a.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- 일반 콘텐츠 ---------- */
.prose h3 { color: var(--navy); font-size: 1.3rem; margin: 8px 0 14px; }
.prose p + p { margin-top: 14px; }
.lead-text { font-size: 1.1rem; color: var(--gray-700); }

.info-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info-table th, .info-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 190px; background: var(--gray-50); color: var(--navy); font-weight: 700; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }

/* 연혁 타임라인 */
.timeline { position: relative; margin-left: 8px; padding-left: 30px; border-left: 2px solid var(--gray-300); }
.timeline li { position: relative; padding: 0 0 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -39px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--blue);
}
.timeline .t-date { font-weight: 800; color: var(--teal); }
.timeline .t-text { color: var(--gray-700); margin-top: 2px; }

/* 조직도 */
.org { text-align: center; }
.org .node { display: inline-block; background: linear-gradient(135deg, var(--navy), var(--blue-600)); color: #fff; padding: 12px 30px; border-radius: 10px; font-weight: 700; }
.org .node.sub { background: #fff; color: var(--navy); border: 1.5px solid var(--blue); }
.org .connector { width: 2px; height: 26px; background: var(--gray-300); margin: 0 auto; }
.org-divs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.org-div { background: var(--gray-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.org-div h4 { color: var(--navy); margin-bottom: 12px; }
.org-div .team { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; font-size: .92rem; }

/* ---------- 실적 테이블 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.filter-bar .pill {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--gray-300); background: #fff;
  font-weight: 600; color: var(--gray-700); font-size: .9rem; cursor: pointer;
}
.filter-bar .pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-bar select { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--gray-300); font: inherit; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
table.data th, table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: .94rem; }
table.data thead th { background: var(--navy); color: #fff; font-weight: 700; position: sticky; top: 0; }
table.data tbody tr:hover { background: var(--gray-50); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--gray-100); color: var(--navy-2); }
.tag.year { background: #dff3e6; color: var(--blue-600); }

/* ---------- 갤러리 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.gallery-item .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.gallery-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gallery-item:hover .thumb img { transform: scale(1.05); }
.gallery-item .meta { padding: 14px 16px; }
.gallery-item .meta h4 { color: var(--navy); font-size: 1rem; }
.gallery-item .meta p { color: var(--gray-500); font-size: .86rem; margin-top: 4px; }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; background: rgba(6,15,28,.9); display: none; place-items: center; z-index: 300; padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; }
.lightbox .close { position: absolute; top: 20px; right: 24px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- 인증현황 ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cert-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow-sm); }
.cert-card .seal { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--teal), var(--green)); }
.cert-card h4 { color: var(--navy); font-size: 1.02rem; }
.cert-card p { color: var(--gray-500); font-size: .86rem; margin-top: 4px; }

/* ---------- 폼 ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 8px; font-size: .94rem; }
.field label .req { color: #e5484d; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--gray-300); border-radius: 10px; font: inherit;
  background: #fff; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,157,87,.15); }
.field textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .84rem; color: var(--gray-500); }
.check-inline { display: flex; align-items: flex-start; gap: 10px; }
.check-inline input { width: auto; margin-top: 4px; }

.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.alert.ok { background: #e7f8ef; color: #17794b; border: 1px solid #b6e6cd; }
.alert.err { background: #fdeaea; color: #b42318; border: 1px solid #f5c2c0; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 52px 0 30px; margin-top: 20px; }
.footer-brand strong { color: #fff; font-size: 1.15rem; }
.footer-brand p { margin-top: 6px; color: rgba(255,255,255,.6); }
.footer-info { margin-top: 22px; font-size: .92rem; line-height: 1.9; }
.footer-info p { color: rgba(255,255,255,.72); }
.copyright { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .84rem; color: rgba(255,255,255,.55); }

/* ---------- to-top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--navy); color: #fff; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- 유틸 ---------- */
.mt-0 { margin-top: 0; } .mt-40 { margin-top: 40px; } .mt-56 { margin-top: 56px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-2 > * { min-width: 0; }
.text-center { text-align: center; }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 1024px) {
  .cards, .gallery-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin-top: 20px; }
  .org-divs { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .section { padding: 60px 0; }
  .nav-toggle { display: flex; }
  .gnb {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .gnb.open { transform: translateY(0); }
  .gnb ul { flex-direction: column; align-items: stretch; padding: 12px; gap: 2px; }
  .gnb a { padding: 14px 16px; border-radius: 10px; }
  .gnb .gnb-cta { margin-left: 0; text-align: center; }
  .subnav { top: var(--header-h); }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat { border-bottom: 1px solid var(--line); }
  .cards, .gallery-grid, .cert-grid, .grid-2, .form-row { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 22px; }
  .info-table th { width: 120px; }
}
