/*
Theme Name: DownForum Gateway
Theme URI: https://down.edownl.com/
Author: DownForum
Description: down.edownl.com에서 연결되는 독립형 다운로드 선택 사이트 테마. 모바일 우선 파일 선택 화면, noindex 유틸리티 템플릿, R2 및 공식 링크용 버튼을 제공합니다.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: downforum-gateway
*/

:root {
  --dg-ink: #0f172a;
  --dg-copy: #475569;
  --dg-muted: #64748b;
  --dg-line: #dfe7f0;
  --dg-soft: #f4f7fb;
  --dg-card: #ffffff;
  --dg-green: #0da866;
  --dg-green-dark: #087b4c;
  --dg-blue: #2563eb;
  --dg-blue-dark: #1d4ed8;
  --dg-red: #e5484d;
  --dg-orange: #ea7b12;
  --dg-shadow: 0 24px 60px rgba(15, 23, 42, .12);
  --dg-shadow-small: 0 10px 26px rgba(15, 23, 42, .09);
  --dg-radius: 22px;
  --dg-content: 820px;
  --dg-wide: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f6f8fb;
  color: var(--dg-ink);
  font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -.015em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--dg-blue); }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 12px; padding: 10px 14px;
  background: #fff; color: var(--dg-ink); z-index: 9999;
}

.dg-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(223, 231, 240, .92);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(14px);
}
.dg-header-inner {
  max-width: var(--dg-wide);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.dg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dg-ink);
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.04em;
  text-decoration: none;
}
.dg-brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #18c47b, #087b4c);
  box-shadow: 0 7px 16px rgba(13, 168, 102, .28);
}
.dg-brand-mark svg { width: 17px; height: 17px; }
.dg-nav { display: flex; align-items: center; gap: 4px; }
.dg-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.dg-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--dg-copy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.dg-nav a:hover, .dg-nav a:focus-visible { color: var(--dg-ink); background: var(--dg-soft); }
.dg-menu-toggle { display: none; border: 0; background: transparent; color: var(--dg-ink); cursor: pointer; }

.dg-main { min-height: calc(100vh - 210px); }
.dg-shell { max-width: var(--dg-content); margin: 0 auto; padding: 42px 20px 70px; }
.dg-article,
.dg-standard-page {
  overflow: hidden;
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-radius);
  background: var(--dg-card);
  box-shadow: var(--dg-shadow);
}
.dg-standard-page { padding: 40px; }
.dg-standard-page .entry-title { margin-top: 0; }

.dg-hero {
  position: relative;
  padding: 42px 44px 36px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 10%, rgba(24, 196, 123, .14), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, .12), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
  border-bottom: 1px solid var(--dg-line);
}
.dg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 7px 11px;
  border: 1px solid #bdebd4;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--dg-green-dark);
  font-size: 12.5px;
  font-weight: 800;
}
.dg-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #18b876; box-shadow: 0 0 0 4px rgba(24,184,118,.13); }
.dg-hero-media {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid rgba(223, 231, 240, .9);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--dg-shadow-small);
}
.dg-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.dg-hero h1 { max-width: 650px; margin: 0 auto; font-size: clamp(29px, 5vw, 42px); line-height: 1.2; letter-spacing: -.055em; }
.dg-hero-summary { max-width: 620px; margin: 15px auto 0; color: var(--dg-copy); font-size: 16px; }
.dg-steps {
  max-width: 540px;
  margin: 25px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.dg-step { position: relative; color: var(--dg-muted); font-size: 12px; font-weight: 750; }
.dg-step:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 63%; width: 74%; height: 1px; background: #cdd8e5; }
.dg-step-number {
  position: relative;
  z-index: 1;
  width: 27px; height: 27px; margin: 0 auto 6px;
  display: grid; place-items: center;
  border: 1px solid #cdd8e5; border-radius: 99px;
  background: #fff; color: var(--dg-copy); font-size: 11px;
}
.dg-step.is-current { color: var(--dg-green-dark); }
.dg-step.is-current .dg-step-number { border-color: var(--dg-green); background: var(--dg-green); color: #fff; box-shadow: 0 5px 12px rgba(13,168,102,.24); }

.dg-content { padding: 34px 44px 42px; }
.dg-content > :first-child { margin-top: 0; }
.dg-content h2 { margin: 34px 0 14px; font-size: 22px; line-height: 1.35; letter-spacing: -.035em; }
.dg-content h3 { margin: 26px 0 10px; font-size: 18px; }
.dg-content p { color: var(--dg-copy); }
.dg-content table { width: 100%; margin: 18px 0; border-spacing: 0; border: 1px solid var(--dg-line); border-radius: 14px; overflow: hidden; }
.dg-content th, .dg-content td { padding: 13px 16px; border-bottom: 1px solid var(--dg-line); text-align: left; vertical-align: top; }
.dg-content th { width: 31%; background: #f7f9fc; color: var(--dg-ink); font-size: 14px; }
.dg-content td { color: var(--dg-copy); font-size: 14px; }
.dg-content tr:last-child th, .dg-content tr:last-child td { border-bottom: 0; }

.dg-choice-panel { margin: 0 0 30px; }
.dg-choice-heading { margin: 0 0 7px !important; text-align: center; font-size: 22px !important; }
.dg-choice-copy { margin: 0 0 18px; text-align: center; color: var(--dg-muted) !important; font-size: 14px; }
.dg-choice-list { display: grid; gap: 12px; }
.dg-choice {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px 1fr 26px;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #fff !important;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.dg-choice::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,.12), transparent 42%); pointer-events: none; }
.dg-choice--android, .dg-choice--hwp, .dg-choice--default { background: linear-gradient(135deg, #18bd76, #07814e); box-shadow: 0 10px 22px rgba(7,129,78,.23); }
.dg-choice--ios { background: linear-gradient(135deg, #343944, #111827); box-shadow: 0 10px 22px rgba(17,24,39,.23); }
.dg-choice--pc, .dg-choice--docx { background: linear-gradient(135deg, #4384f5, #1d4ed8); box-shadow: 0 10px 22px rgba(29,78,216,.23); }
.dg-choice--pdf { background: linear-gradient(135deg, #f45b60, #cc2634); box-shadow: 0 10px 22px rgba(204,38,52,.22); }
.dg-choice--mac { background: linear-gradient(135deg, #7c65db, #5b3db9); box-shadow: 0 10px 22px rgba(91,61,185,.22); }
.dg-choice:hover { transform: translateY(-3px); filter: saturate(1.12) brightness(1.03); box-shadow: 0 16px 30px rgba(15,23,42,.25); }
.dg-choice:active { transform: translateY(1px) scale(.995); filter: brightness(.95); }
.dg-choice:focus-visible { outline: 4px solid rgba(37,99,235,.24); outline-offset: 3px; }
.dg-choice-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; background: rgba(255,255,255,.14); }
.dg-choice-icon svg { width: 24px; height: 24px; }
.dg-choice-text { position: relative; min-width: 0; }
.dg-choice-label { display: block; font-size: 17px; font-weight: 850; line-height: 1.28; }
.dg-choice-sub { display: block; margin-top: 3px; color: rgba(255,255,255,.82); font-size: 12px; font-weight: 600; }
.dg-choice-arrow { position: relative; font-size: 22px; line-height: 1; transition: transform .18s ease; }
.dg-choice:hover .dg-choice-arrow { transform: translateX(3px); }

.dg-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 18px 0 28px; }
.dg-info-item { padding: 14px 16px; border: 1px solid var(--dg-line); border-radius: 13px; background: #fafcff; }
.dg-info-label { display: block; color: var(--dg-muted); font-size: 11.5px; font-weight: 750; }
.dg-info-value { display: block; margin-top: 3px; color: var(--dg-ink); font-size: 14px; font-weight: 800; }
.dg-notice { margin: 22px 0; padding: 16px 18px; border: 1px solid #cce8da; border-left: 4px solid var(--dg-green); border-radius: 12px; background: #f0fbf6; color: #315b48; font-size: 13.5px; }
.dg-notice--warning { border-color: #f2d7ae; border-left-color: var(--dg-orange); background: #fff9ef; color: #6c4a21; }

.dg-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--dg-line);
  background: var(--dg-line);
}
.dg-trust-item { padding: 18px 14px; background: #fbfcfe; text-align: center; }
.dg-trust-item strong { display: block; font-size: 13px; }
.dg-trust-item span { display: block; margin-top: 2px; color: var(--dg-muted); font-size: 11.5px; }

.dg-home { max-width: var(--dg-wide); margin: 0 auto; padding: 68px 24px 80px; }
.dg-home-hero { padding: 62px 28px; border-radius: 28px; text-align: center; color: #fff; background: radial-gradient(circle at 15% 20%, rgba(24,196,123,.33), transparent 30%), linear-gradient(135deg,#0f172a,#1e3a4b); box-shadow: var(--dg-shadow); }
.dg-home-hero h1 { max-width: 760px; margin: 0 auto; font-size: clamp(34px,6vw,54px); line-height: 1.16; letter-spacing: -.06em; }
.dg-home-hero p { max-width: 620px; margin: 17px auto 0; color: #cbd5e1; }
.dg-home-content { max-width: var(--dg-content); margin: 38px auto 0; padding: 32px; border: 1px solid var(--dg-line); border-radius: 20px; background: #fff; }

.dg-site-footer { border-top: 1px solid #263449; background: #0f172a; color: #94a3b8; }
.dg-footer-inner { max-width: var(--dg-wide); margin: 0 auto; padding: 30px 24px; display: flex; justify-content: space-between; gap: 24px; font-size: 12.5px; }
.dg-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.dg-footer-links a { color: #cbd5e1; text-decoration: none; }

@media (max-width: 720px) {
  .dg-header-inner { min-height: 60px; padding: 0 16px; }
  .dg-menu-toggle { display: block; }
  .dg-nav { position: absolute; top: 60px; left: 12px; right: 12px; display: none; padding: 8px; border: 1px solid var(--dg-line); border-radius: 13px; background: #fff; box-shadow: var(--dg-shadow-small); }
  .dg-nav.is-open { display: block; }
  .dg-nav ul { display: block; }
  .dg-nav a { padding: 11px 12px; }
  .dg-shell { padding: 22px 12px 46px; }
  .dg-article { border-radius: 18px; }
  .dg-hero { padding: 32px 20px 29px; }
  .dg-hero-media { width: 76px; height: 76px; border-radius: 21px; }
  .dg-hero h1 { font-size: 29px; }
  .dg-hero-summary { font-size: 14px; }
  .dg-content { padding: 26px 19px 30px; }
  .dg-choice { grid-template-columns: 42px 1fr 20px; min-height: 72px; padding: 12px 14px; gap: 11px; }
  .dg-choice-icon { width: 40px; height: 40px; }
  .dg-choice-label { font-size: 16px; }
  .dg-info-grid { grid-template-columns: 1fr; }
  .dg-trust { grid-template-columns: 1fr; }
  .dg-trust-item { padding: 13px; }
  .dg-standard-page { padding: 26px 20px; }
  .dg-footer-inner { display: block; text-align: center; }
  .dg-footer-links { justify-content: center; margin-top: 12px; }
}

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

@media print {
  .dg-site-header, .dg-site-footer, .dg-steps { display: none; }
  body { background: #fff; }
  .dg-shell { padding: 0; }
  .dg-article { box-shadow: none; }
}
