/* Agent Room Edu — shared stylesheet */
/* Direction: "law firm / consultancy brief" — deep navy gradient ground, warm amber accent,
   hairline dividers instead of boxed cards, Pretendard + serif-italic Latin accents. */

@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/pretendard-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/pretendard-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/pretendard-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0e1a;
  --ink-hi: #14203f;
  --ink-lo: #090b14;
  --surface: #131a30;
  --surface-2: #182140;
  --line: #262f4a;
  --line-soft: #1c2338;

  --text: #e9e7e1;
  --text-muted: #9498ab;
  --text-faint: #5c6178;

  --accent: #e2a23b;
  --accent-strong: #f0b95c;
  --on-accent: #101425;

  --bg: var(--ink);
  --bg-gradient: radial-gradient(ellipse at top, var(--ink-hi) 0%, var(--ink-lo) 62%);
  --radius: 3px;
  --radius-lg: 6px;
  --maxw: 1160px;

  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-gradient), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch' result='noise'/%3E%3CfeColorMatrix in='noise' type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.3;
  mix-blend-mode: overlay;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 14, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.brand b {
  font-style: italic;
  font-weight: 400;
  font-family: var(--serif);
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }

.nav-cta {
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: var(--on-accent); }

.nav-toggle { display: none; }

/* Hero */
.hero {
  padding: 108px 0 76px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: 19ch;
  text-wrap: balance;
}
.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { border-color: var(--line); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-text {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.btn-text:hover { color: var(--accent-strong); border-color: var(--accent-strong); }

/* Section scaffolding */
section { padding: 88px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

/* Brief layout: marginalia label column + content column */
.brief {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 48px;
}
@media (max-width: 860px) {
  .brief { grid-template-columns: 1fr; gap: 24px; }
}
.brief-mark {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.9rem;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.brief-mark b {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.section-head p { color: var(--text-muted); margin: 0; }
.why-copy { max-width: none; white-space: nowrap; }
.why-break { display: none; }
@media (max-width: 640px) {
  .why-copy { white-space: normal; }
  .why-break { display: inline; }
}

/* Reasons — hairline rows replacing boxed cards */
.reasons { border-top: 1px solid var(--line); }
.reason-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) {
  .reason-row { grid-template-columns: 1fr; gap: 12px; }
}
.reason-row .tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 0.96rem;
  margin: 0;
}
.reason-row h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.reason-row p { margin: 0; color: var(--text-muted); font-size: 0.96rem; max-width: 60ch; }
.reason-row ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 0.94rem; }
.reason-row ul li { margin-bottom: 6px; }

/* Figure plates — replaces dashed "TODO" placeholders */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.gallery a {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gallery img { height: 96px; width: 100%; object-fit: cover; }
.gallery.contain img { object-fit: contain; background: #f7f5f0; height: 130px; }
.gallery.empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 24px;
  color: var(--text-faint);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
}

/* Image slider — bigger single-image view with prev/next */
.slider { position: relative; margin-top: 18px; }
.slider-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #f7f5f0;
}
.slider-track { display: flex; transition: transform 0.35s ease; }
.slider-slide { flex: 0 0 100%; }
.slider-slide a { display: block; }
.slider-slide img { width: 100%; height: 230px; object-fit: contain; display: block; }
.slider-slide .slider-caption {
  margin: 0;
  padding: 8px 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-hi);
  background: #f7f5f0;
  border-top: 1px solid rgba(10, 14, 26, 0.1);
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.slider-arrow:hover { color: var(--accent); border-color: var(--accent); }
.slider-prev { left: -18px; }
.slider-next { right: -18px; }
.slider[data-single] .slider-arrow { display: none; }
@media (max-width: 640px) {
  .slider-slide img { height: 190px; }
  .slider-prev { left: 6px; }
  .slider-next { right: 6px; }
}

/* Tracks — two-up, hairline-divided */
.tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) {
  .tracks { grid-template-columns: 1fr; }
}
/* Case cards — three-up, hairline-divided (matches .topics) */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 980px) {
  .cases { grid-template-columns: 1fr; }
}
.case-card,
.track {
  background: var(--bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-card h3,
.track h3 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.case-card .domain,
.track .domain {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.case-card p,
.track p { color: var(--text-muted); margin: 0; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.case-card .gallery,
.track .gallery { margin-top: 4px; }
.case-card .slider { margin-top: auto; }

.go { margin-top: auto; }

/* Topics — single-row three-up grid, hairline-divided */
.topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 980px) {
  .topics { grid-template-columns: 1fr; }
}
.topic {
  background: var(--bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.topic .tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 0.92rem;
  margin: 0;
}
.topic h3 { margin: 0; font-size: 1.14rem; font-weight: 700; letter-spacing: -0.01em; }
.topic p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.topic ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.88rem; }
.topic ul li { margin-bottom: 5px; }
.topic .slider { margin-top: auto; }

/* Callout */
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 30px;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.callout strong { color: var(--text); font-weight: 600; }

/* List rows (강의처 등) */
.rowlist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rowlist span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Contact form */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 640px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-note { font-size: 0.84rem; color: var(--text-faint); margin-top: 16px; font-family: var(--serif); font-style: italic; }

.form-status { font-size: 0.9rem; margin: 14px 0 0; min-height: 1.4em; }
.form-status:empty { margin: 0; }
.form-status-ok { color: var(--accent); }
.form-status-error { color: #d97a63; }
.form-status-error a { color: inherit; text-decoration: underline; }

/* Footer */
footer.site {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--serif);
  font-style: italic;
}
footer.site a {
  font-family: var(--sans);
  font-style: normal;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
footer.site a:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 76px 0 52px; }
}
