/* UdaWork portal — single stylesheet, no external fonts or images. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #15181d;
  --muted: #59616d;
  --border: #dde1e7;
  --accent: #2b4fd8;
  --accent-hover: #2142bd;
  --accent-contrast: #ffffff;
  --focus: #2b4fd8;

  --ok-bg: #e3f5ea;
  --ok-text: #135c34;
  --limited-bg: #fff1d6;
  --limited-text: #6f4100;
  --prep-bg: #eceff3;
  --prep-text: #3b4350;
  --maint-bg: #fde6e6;
  --maint-text: #8a1f1f;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 18px rgba(16, 24, 40, 0.05);
  --wrap: 1080px;
  --gutter: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #181c22;
    --surface-2: #222831;
    --text: #eef1f5;
    --muted: #a5adb9;
    --border: #2e3540;
    --accent: #8ea6ff;
    --accent-hover: #aebfff;
    --accent-contrast: #0d1220;
    --focus: #aebfff;

    --ok-bg: #12301f;
    --ok-text: #8fe0ad;
    --limited-bg: #3a2a0c;
    --limited-text: #ffd27a;
    --prep-bg: #262c35;
    --prep-text: #c4cbd6;
    --maint-bg: #3a1717;
    --maint-text: #ffaaaa;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
  }
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic',
    'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:lang(en) {
  word-break: normal;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

main:focus,
section:focus {
  outline: none;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 0.75em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 8px;
}

/* ---------- header & footer ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  min-height: 64px;
  padding-block: 10px;
  flex-wrap: wrap;
}

@media (max-width: 440px) {
  .site-nav a {
    padding: 0 9px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav .lang-switch {
  border: 1px solid var(--border);
  margin-left: 4px;
}

.site-footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.925rem;
}

.footer-inner p {
  margin: 0 0 0.4em;
}

.footer-brand {
  color: var(--text);
  font-weight: 700;
}

.footer-meta .lang-switch {
  color: var(--muted);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.button--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.button--ghost {
  background: transparent;
}

.ext {
  font-size: 0.9em;
  margin-left: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- home ---------- */

.hero {
  padding: 56px 0 32px;
}

@media (min-width: 768px) {
  .hero {
    padding: 88px 0 40px;
  }
}

.hero h1 {
  max-width: 22ch;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 62ch;
}

.section {
  padding: 32px 0;
}

.section--muted {
  margin-top: 24px;
}

#services {
  scroll-margin-top: 16px;
}

.section-lead {
  color: var(--muted);
  margin-bottom: 20px;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-tagline {
  margin: 0;
  color: var(--muted);
}

.card-status {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-more {
  margin: auto 0 0;
}

.empty {
  padding: 32px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.empty p {
  color: var(--muted);
}

.faq {
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.faq-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq dt {
  font-weight: 700;
  margin-bottom: 6px;
}

.faq dd {
  margin: 0;
  color: var(--muted);
}

/* ---------- logos & status ---------- */

.logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}

.logo--md {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.logo--lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.logo--monogram {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo--lg.logo--monogram {
  font-size: 1.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
}

.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge--available {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.badge--limited {
  background: var(--limited-bg);
  color: var(--limited-text);
}

.badge--preparing {
  background: var(--prep-bg);
  color: var(--prep-text);
}

.badge--maintenance {
  background: var(--maint-bg);
  color: var(--maint-text);
}

.badge--unknown {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
}

.status-note {
  margin-bottom: 6px;
}

.status-checked {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.status-stale {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- inner pages ---------- */

.page {
  padding-top: 32px;
}

.page--narrow {
  max-width: 640px;
  padding-top: 64px;
}

.breadcrumb {
  font-size: 0.925rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--muted);
}

.service-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.service-hero h1 {
  margin: 0 0 4px;
}

.service-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel {
  margin: 20px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel h2 {
  font-size: 1.125rem;
}

.panel--status {
  box-shadow: var(--shadow);
}

.cta-row {
  margin: 16px 0 0;
}

.two-col {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.two-col > .panel {
  margin: 0;
}

.two-col:empty {
  display: none;
}

.bullets {
  margin: 0;
  padding-left: 1.2em;
}

.bullets li + li {
  margin-top: 6px;
}

.muted {
  color: var(--muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.mail-address {
  margin: 4px 0 12px;
  font-weight: 600;
  user-select: all;
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.copy-result {
  color: var(--muted);
  font-size: 0.875rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.contact-list > .panel {
  margin: 0;
}

.contact-services {
  margin-top: 40px;
}

.help-link {
  margin: 12px 0 0;
}

.notfound + .notfound {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
