/* ii4soft / RivalRace — 하나의 스타일 파일. 외부 글꼴·스크립트·추적 없음. */
:root {
  --asphalt: #161a21;
  --asphalt-2: #1e232c;
  --asphalt-3: #2a303b;
  --line: #3a414e;
  --text: #eef1f5;
  --muted: #a9b1bf;
  --teal: #2fb8a8;      /* 내 차 / RIVAL */
  --teal-dark: #1f8f82;
  --orange: #f08a3c;    /* 라이벌 / RACE */
  --orange-dark: #c96a24;
  --gold: #f4c542;
  --curb-red: #d8413a;
  --radius: 18px;
  --max: 1080px;
  font-family: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", "Noto Sans", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--teal); }
a:hover { color: #5fd6c8; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- 머리글 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(22, 26, 33, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 4px 16px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 2px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }

/* ---------- 로고 글자 ---------- */
.wordmark {
  font-weight: 900; font-style: italic; letter-spacing: -0.01em; line-height: 1;
  font-size: clamp(48px, 10vw, 104px);
  margin: 0;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.wordmark .r { color: var(--teal); }
.wordmark .o { color: var(--orange); }

/* ---------- 첫 화면 ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 84px;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(47, 184, 168, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(240, 138, 60, 0.16), transparent 60%),
    var(--asphalt);
}
/* 사선 도로 줄무늬 */
.hero::before {
  content: ""; position: absolute; inset: -20% -10%;
  background: repeating-linear-gradient(115deg, transparent 0 80px, rgba(255, 255, 255, 0.025) 80px 84px);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero .tagline { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; margin: 18px 0 10px; }
.hero .lead { color: var(--muted); font-size: 18px; margin: 0 0 26px; max-width: 34em; }
.hero-art { justify-self: center; position: relative; width: min(380px, 80vw); }
.hero-art img { width: 100%; height: auto; border-radius: 22%; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); transform: rotate(-4deg); }
.speed-lines { position: absolute; left: -30%; top: 30%; width: 50%; height: 40%; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 14px, rgba(255, 255, 255, 0.18) 14px 16px);
  mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  animation: zoom 1.6s linear infinite; }
@keyframes zoom { from { transform: translateX(-20px); opacity: 0.2; } 50% { opacity: 0.8; } to { transform: translateX(30px); opacity: 0; } }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 12px; font-weight: 800; text-decoration: none;
  transform: skewX(-8deg); border: 0; font-size: 17px;
}
.btn > span { transform: skewX(8deg); display: inline-flex; align-items: center; gap: 10px; }
.btn-primary { background: linear-gradient(180deg, #f6a15c, var(--orange) 50%, var(--orange-dark)); color: #1b1208; box-shadow: 0 6px 0 #8a4614; }
.btn-ghost { background: var(--asphalt-3); color: var(--text); box-shadow: 0 6px 0 #0d1015; }
.btn:hover { filter: brightness(1.06); color: inherit; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: rgba(244, 197, 66, 0.12); color: var(--gold); border: 1px solid rgba(244, 197, 66, 0.4);
}
.badge-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- 섹션 공통 ---------- */
section { padding: 76px 0; }
section.alt { background: var(--asphalt-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--orange); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; margin: 0 0 6px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 21px; margin: 0 0 6px; line-height: 1.35; }
.section-lead { color: var(--muted); max-width: 44em; margin: 0 0 38px; }

/* 연석 구분선 */
.curb { height: 10px; background: repeating-linear-gradient(90deg, var(--curb-red) 0 28px, #f2f2ee 28px 56px); opacity: 0.9; }

/* ---------- 조작 3단계 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { background: var(--asphalt-3); border-radius: var(--radius); padding: 26px 24px; position: relative; border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; right: 20px; font-size: 44px; font-weight: 900; font-style: italic; color: rgba(255, 255, 255, 0.07);
}
.step svg { width: 64px; height: 64px; margin-bottom: 12px; }
.step p { margin: 0; color: var(--muted); }
.step.press h3 { color: var(--teal); }
.step.release h3 { color: var(--orange); }
.step.pass h3 { color: var(--gold); }

/* ---------- 특징 카드 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--asphalt-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; font-size: 24px; background: rgba(47, 184, 168, 0.14); }
.card:nth-child(even) .ico { background: rgba(240, 138, 60, 0.16); }
.card p { margin: 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.chips li { background: var(--asphalt); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: var(--muted); }

/* ---------- 보호자 안내 ---------- */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; align-content: start; }
.check li { background: var(--asphalt-3); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 54px; position: relative; }
.check li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23102a27' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.check li strong { display: block; }
.check li span { color: var(--muted); font-size: 16px; }
.note { background: rgba(244, 197, 66, 0.08); border: 1px solid rgba(244, 197, 66, 0.35); border-radius: 14px; padding: 16px 18px; color: #f1dfa8; font-size: 16px; }

/* ---------- 문서(개인정보처리방침·지원) ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(30px, 4.5vw, 42px); line-height: 1.25; margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 30px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; padding-top: 6px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: #d6dbe3; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.summary { background: var(--asphalt-2); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 12px; padding: 18px 22px; }
.summary ul { margin: 6px 0 0; }
.toc { background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 22px; margin: 26px 0; }
.toc ol { margin: 6px 0; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text); background: var(--asphalt-2); }
td { color: #d6dbe3; }
.table-scroll { overflow-x: auto; }

details { background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin: 10px 0; }
details[open] { border-color: var(--teal-dark); }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside; }
details > *:not(summary) { color: #d6dbe3; }
.contact-box { background: var(--asphalt-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 30px; }
.contact-box .mail { font-size: 22px; font-weight: 800; }

/* ---------- 바닥글 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 46px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; gap: 14px 30px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 860px) {
  .hero { padding: 48px 0 60px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-art { order: -1; width: min(260px, 62vw); }
  .steps, .cards, .parents { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .site-header .wrap { padding-top: 8px; }
  .nav { margin-left: 0; width: 100%; padding-bottom: 8px; }
  body { font-size: 16px; }
}

/* ---------- ii4soft 로고·스튜디오 ---------- */
.brand .studio-logo { width: auto; height: 30px; border-radius: 0; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 24px; width: auto; opacity: 0.85; }
.studio { text-align: center; }
.studio h2 { margin: 0 0 18px; line-height: 1; }
.studio h2 img { height: clamp(44px, 8vw, 60px); width: auto; }
.studio-motto { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin: 0 0 6px; }
.studio-sub { color: var(--muted); margin: 0 0 22px; }
.studio-desc { max-width: 36em; margin: 0 auto 22px; color: #d6dbe3; }
.studio-est { color: #8b93a1; letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; margin: 0; }

/* ---------- 회사 홈 (간단형) ---------- */
.company main { min-height: 70vh; }
.co-hero { padding: 110px 0 80px; text-align: center; }
.co-hero h1 { margin: 0 0 26px; line-height: 1; }
.co-hero h1 img { height: clamp(80px, 14vw, 120px); width: auto; }
.co-motto { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin: 0 0 10px; }
.co-desc { color: var(--muted); margin: 0; }
.co-section { padding: 34px 0; border-top: 1px solid var(--line); }
.co-section .wrap { max-width: 760px; }
.co-section h2 { font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.game-card {
  display: flex; align-items: center; gap: 22px; text-decoration: none; color: var(--text);
  background: var(--asphalt-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  transition: border-color .15s, transform .15s;
}
.game-card:hover { border-color: var(--teal); color: var(--text); transform: translateY(-2px); }
.game-card img { width: 96px; height: 96px; border-radius: 22%; flex: none; }
.game-card h3 { font-size: 22px; margin: 0 0 4px; }
.game-card p { margin: 0 0 12px; color: var(--muted); }
.game-card .badge-soon { font-size: 13px; padding: 5px 12px; }
.game-go { margin-left: auto; font-size: 26px; color: var(--teal); }
.co-mail { font-size: 20px; font-weight: 700; }
@media (max-width: 520px) {
  .co-hero { padding: 70px 0 56px; }
  .game-card { flex-direction: column; align-items: flex-start; }
  .game-go { display: none; }
}
