/* 울산푸드글로벌 — 공통: 토큰 · 서체 · 머리 · 발 · 버튼 · 페이지 머리 · 문의 띠
 * 디자인 기준: 사용자 제공 시안(90% 이상 동일). 근거와 바로잡은 내용은 docs/DESIGN.md · docs/CONTENT-MAP.md
 */

@font-face {
  font-family: 'Gmarket Sans';
  src: url('/fonts/GmarketSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Gmarket Sans';
  src: url('/fonts/GmarketSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --navy: #0f2a5f;
  --navy-deep: #0b1f4b;
  --ink: #16213d;
  --blue: #2560b8;
  --blue-soft: #eaf1fb;
  --red: #d8262c;
  --green: #3f9b35;
  --paper: #f4f7fb;
  --line: #e1e6ef;
  --muted: #5d6882;
  --white: #fff;

  --f-head: 'Gmarket Sans', 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --f-latin: 'Montserrat', var(--f-body);
  --f-script: 'Caveat', 'Segoe Script', cursive;

  --gutter: 24px;
  --wrap: 1240px;
  --header-h: 78px;
  --radius: 6px;
  color-scheme: light;
}

:root:lang(zh-Hans) {
  --f-head: 'Gmarket Sans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --f-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Pretendard Variable', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-family: var(--f-head); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0; }

a { color: var(--blue); text-underline-offset: 0.2em; }

button { font: inherit; }

:focus-visible { outline: 3px solid #4d8ee8; outline-offset: 2px; }

.icon { flex-shrink: 0; }

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

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 46em; }
.measure-wide { max-width: calc(880px + var(--gutter) * 2); }
.muted { color: var(--muted); }

/* 영문 라벨: 시안의 파란 자간 넓은 대문자 */
.eyebrow {
  margin-bottom: 12px;
  color: var(--blue);
  font-family: var(--f-latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.eyebrow-light { color: rgb(255 255 255 / 0.85); }

.card-code {
  display: block;
  color: var(--blue);
  font-family: var(--f-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

/* ── 버튼 ─────────────────────────────────────────── */

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* 영문 CTA(OUR STORY 등)만 시안처럼 자간을 넓힌다. 한글 문구에는 적용하지 않는다. */
.btn-pill [lang='en'] { font-family: var(--f-latin); font-size: 13px; letter-spacing: 0.08em; }

.btn-pill-light { border-color: rgb(255 255 255 / 0.9); color: var(--white); }
.btn-pill-light:hover { background: var(--white); color: var(--navy); }
.btn-pill-navy { background: var(--navy); color: var(--white); }
.btn-pill-navy:hover { background: var(--blue); color: var(--white); }
.btn-pill-white { background: var(--white); color: var(--navy); }
.btn-pill-white:hover { background: var(--blue-soft); color: var(--navy); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.link-arrow:hover { color: var(--blue); }

/* 관리자 화면·게시판에서 쓰는 기본 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--blue); color: var(--white); }
.btn-outline { border-color: #c5cddb; color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-lg { min-height: 54px; padding: 14px 32px; font-size: 17px; }
.btn[disabled], .btn[aria-busy='true'] { opacity: 0.6; cursor: progress; }
.text-link { font-weight: 600; }

/* ── 머리 ─────────────────────────────────────────── */

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--navy);
  color: var(--white);
}

.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 96px; height: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-ko { font-family: var(--f-head); font-size: 17px; font-weight: 700; color: var(--navy); }
.brand-en { margin-top: 3px; font-family: var(--f-latin); font-size: 8.5px; font-weight: 600; letter-spacing: 0.12em; color: #44506b; }
.brand-light .brand-ko, .brand-light .brand-en { color: var(--white); }

.site-nav { display: flex; align-items: center; flex: 1; gap: 24px; }

.nav-list { display: flex; flex: 1; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }

.nav-list a {
  display: block;
  padding: 26px 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-list a:hover { color: var(--blue); }
.nav-list a[aria-current='page'] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }

.nav-side { display: flex; align-items: center; gap: 22px; }

.lang { display: flex; align-items: center; gap: 12px; font-family: var(--f-latin); font-size: 12px; font-weight: 600; }
.lang-globe { color: #7a859c; }
.lang a { color: #9aa3b5; text-decoration: none; }
.lang a:hover { color: var(--navy); }
.lang a[aria-current='true'] { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }

.btn-contact {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--f-latin);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.btn-contact:hover { background: var(--blue); color: var(--white); }

.menu-toggle, .menu-close { display: none; }

@media (max-width: 1180px) {
  .nav-list a { padding: 26px 9px; font-size: 14px; }
  .nav-side { gap: 14px; }
}

@media (max-width: 1040px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ''; position: absolute; left: 0; }
  .bars::before { top: -6px; }
  .bars::after { top: 6px; }

  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 18px var(--gutter) 32px;
    background: var(--white);
    overflow-y: auto;
  }

  .site-nav:target, .site-nav.is-open { display: flex; }

  .menu-close {
    display: inline-flex;
    align-self: flex-end;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
  }

  .nav-list { flex: none; flex-direction: column; gap: 0; }
  .nav-list a { padding: 16px 0; font-size: 19px; border-bottom: 1px solid var(--line); }
  .nav-list a[aria-current='page'] { box-shadow: inset 4px 0 0 var(--blue); padding-left: 16px; }
  .nav-side { flex-direction: column; align-items: stretch; gap: 20px; }
  .lang { font-size: 15px; gap: 18px; }
  .btn-contact { justify-content: center; min-height: 52px; font-size: 14px; }
}

/* ── 공통 구획 ─────────────────────────────────────── */

.section { padding: 88px 0; }
.section-tight { padding: 48px 0 80px; }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy-deep); color: var(--white); }

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { color: var(--navy); font-size: 34px; }
.section-head.is-light h2, .section-navy .section-head h2 { color: var(--white); }
.section-navy .eyebrow { color: #8fb4ec; }
.section-lead { margin-top: 14px; color: var(--muted); font-size: 17px; }
.section-navy .section-lead { color: rgb(255 255 255 / 0.75); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head-row .section-head { margin-bottom: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split + .wrap { margin-top: 56px; }

.lede { font-size: 17px; line-height: 1.85; }
.lede + .lede { margin-top: 14px; }

/* ── 하위 페이지 머리 ───────────────────────────────── */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  padding: 72px 0 40px;
  color: var(--white);
  background: var(--navy-deep);
  isolation: isolate;
}

.page-hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 26 64 / 0.86) 0%, rgb(8 26 64 / 0.6) 45%, rgb(8 26 64 / 0.25) 100%);
}

.page-hero h1 { font-size: 44px; }
.page-hero-lead { margin-top: 12px; font-size: 19px; color: rgb(255 255 255 / 0.9); }

.crumbs { display: flex; align-items: center; gap: 8px; margin-top: 28px; font-size: 13px; color: rgb(255 255 255 / 0.75); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }

.subnav { border-bottom: 1px solid var(--line); background: var(--white); }
.subnav .wrap { display: flex; justify-content: center; gap: 8px; }
.subnav a { padding: 18px 22px; color: var(--muted); font-weight: 600; text-decoration: none; }
.subnav a:hover { color: var(--navy); }
.subnav a[aria-current='page'] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--navy); }

/* ── 맺음 띠(소개서 14쪽) ───────────────────────────── */

.closing { padding: 64px 0; background: linear-gradient(100deg, var(--navy-deep) 0%, #16408f 100%); color: var(--white); }
.closing-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.closing h2 { max-width: 26em; font-size: 26px; line-height: 1.45; }
.closing p { margin-top: 10px; color: rgb(255 255 255 / 0.78); }

/* ── 발 ─────────────────────────────────────────── */

.site-footer { background: #0b2150; color: rgb(255 255 255 / 0.8); font-size: 14px; }
.site-footer a { color: var(--white); }
.footer-row { display: flex; align-items: center; gap: 36px; padding-top: 40px; padding-bottom: 32px; }
.footer-row .brand-mark { width: 118px; }
.footer-row .brand-ko { font-size: 19px; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; padding-left: 36px; border-left: 1px solid rgb(255 255 255 / 0.2); font-style: normal; }
.footer-contact a { text-decoration: none; }
.footer-contact .sep { margin: 0 10px; opacity: 0.4; }
.footer-side { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.social { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy) !important;
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  font-size: 12px;
  color: rgb(255 255 255 / 0.62);
}

.footer-legal a { margin-left: 16px; color: rgb(255 255 255 / 0.85); }
.footer-slogan { font-family: var(--f-latin); letter-spacing: 0.3em; }

/* ── 오류 화면 ─────────────────────────────────────── */

.error-block { text-align: center; }
.error-block h1 { color: var(--navy); font-size: 34px; }
.error-block p { margin: 14px 0 28px; color: var(--muted); }

/* ── 반응형 ─────────────────────────────────────────── */

@media (max-width: 960px) {
  .section { padding: 64px 0; }
  .split, .split-wide { grid-template-columns: 1fr; gap: 40px; }
  .closing-row { flex-direction: column; align-items: flex-start; }
  .footer-row { flex-wrap: wrap; }
  .footer-contact { padding-left: 0; border-left: 0; }
  .footer-side { margin-left: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; --header-h: 66px; }
  .brand-mark { width: 78px; }
  .brand-ko { font-size: 15px; }
  .brand-en { font-size: 7.5px; }
  .section-head h2 { font-size: 26px; }
  .section-lead { font-size: 15.5px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .page-hero { min-height: 280px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero-lead { font-size: 16px; }
  .subnav .wrap { justify-content: flex-start; overflow-x: auto; }
  .subnav a { padding: 16px 14px; white-space: nowrap; }
  .closing h2 { font-size: 21px; }
  .footer-legal { flex-direction: column; }
}

/* ── 점검 화면(MAINTENANCE=on) ─────────────────────────── */

.maintenance {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px var(--gutter);
  background: var(--navy-deep);
  color: var(--white);
  isolation: isolate;
}

.maintenance::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(7 24 60 / 0.92), rgb(7 24 60 / 0.7)); }
.maintenance-photo { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.maintenance-card { width: min(640px, 100%); text-align: center; }
.maintenance-logo { margin: 0 auto; }
.maintenance-name { display: flex; flex-direction: column; margin: 12px 0 44px; font-family: var(--f-head); font-size: 18px; font-weight: 700; }
.maintenance-name span { margin-top: 4px; font-family: var(--f-latin); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; opacity: 0.75; }
.maintenance h1 { font-size: 40px; }
.maintenance-body { margin-top: 18px; font-size: 17px; line-height: 1.8; color: rgb(255 255 255 / 0.88); }
.maintenance-lead { margin-top: 32px; font-size: 14px; color: rgb(255 255 255 / 0.7); }
.maintenance-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 12px 0 0; padding: 0; list-style: none; }
.maintenance-contact li { display: flex; align-items: center; gap: 8px; }
.maintenance-contact a { color: var(--white); font-weight: 600; text-decoration: none; }
.maintenance-lang { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.maintenance-lang a { padding: 6px 14px; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 999px; color: rgb(255 255 255 / 0.8); font-size: 13px; text-decoration: none; }
.maintenance-lang a[aria-current='true'] { border-color: var(--white); background: var(--white); color: var(--navy); font-weight: 700; }
.maintenance-foot { position: absolute; bottom: 24px; font-family: var(--f-latin); font-size: 11px; letter-spacing: 0.3em; color: rgb(255 255 255 / 0.5); }

@media (max-width: 640px) {
  .maintenance h1 { font-size: 28px; }
  .maintenance-body { font-size: 15.5px; }
}
