/* ==========================================================================
   theme.css — light / editorial / korean-clean
   - calm paper whites
   - serif headlines + clean sans body
   - sticky nav + underline interactions
   - “genogram” hairlines as subtle motif
   ========================================================================== */

:root{
  /* Paper palette */
  --bg: #fbfaf8;
  --paper: #ffffff;
  --paper-2: #f4f3ef;
  --ink: #121212;
  --muted: rgba(18,18,18,.66);
  --line: rgba(18,18,18,.12);

  /* Accent: understated */
  --accent: #1b4dff;
  --accent-ink: rgba(27,77,255,.10);

  /* Geometry */
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 28px;

  --shadow: 0 18px 50px rgba(18,18,18,.10);
  --shadow-soft: 0 12px 28px rgba(18,18,18,.08);

  /* Type */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", serif;

  --lh: 1.58;
  --track: -0.01em;

  /* Header */
  --nav-h: 72px;
}

html{
  color-scheme: light;
  scroll-behavior: smooth;
}

body{
  margin:0;
  font-family: var(--sans);
  line-height: var(--lh);
  letter-spacing: var(--track);
  color: var(--ink);
  background:
    radial-gradient(1000px 700px at 18% 4%, rgba(27,77,255,.07), transparent 55%),
    radial-gradient(900px 650px at 92% 0%, rgba(27,77,255,.04), transparent 58%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*{ box-sizing:border-box; }
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }

a:focus-visible, button:focus-visible{
  outline: 3px solid rgba(27,77,255,.22);
  outline-offset: 3px;
  border-radius: 12px;
}

::selection{ background: rgba(27,77,255,.14); }

/* Typography */
h1,h2,h3{
  margin: 0 0 .75rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1{
  font-family: var(--serif);
  font-weight: 760;
  font-size: clamp(42px, 5.2vw, 72px);
}
h2{
  font-family: var(--serif);
  font-weight: 720;
  font-size: clamp(26px, 2.8vw, 40px);
}
h3{
  font-weight: 720;
  font-size: clamp(18px, 1.6vw, 22px);
}

p{ margin: 0 0 1rem; color: var(--muted); }
.lead{
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(18,18,18,.70);
  max-width: 70ch;
}

.kicker{
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(18,18,18,.56);
}

/* Hairline */
.hr{
  height:1px; border:0; background: var(--line);
  margin: var(--s4, 40px) 0;
}

/* Buttons (very calm) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(18,18,18,.18);
  background: rgba(255,255,255,.88);
}
.btn--primary{
  border-color: rgba(27,77,255,.30);
  background: linear-gradient(180deg, rgba(27,77,255,.12), rgba(27,77,255,.06));
}
.btn--ghost{
  background: transparent;
}

/* Cards / panels */
.panel{
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
}
.panel--paper{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  backdrop-filter: blur(10px);
}
.panel__pad{ padding: clamp(16px, 2.2vw, 24px); }

/* Small editorial links */
.link{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  color: rgba(18,18,18,.82);
  font-weight: 650;
}
.link::after{
  content:"→";
  opacity: .70;
  transition: transform 160ms ease;
}
.link:hover::after{ transform: translateX(2px); }

/* --------------------------------------------------------------------------
   Navigation (reference-like: lots of links, clean, sticky)
   -------------------------------------------------------------------------- */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display:flex;
  align-items:center;
  background: rgba(251,250,248,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 220px;
}

.brand__logo{
  width: 38px; height: 38px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow:hidden;
}
.brand__logo img{ width:100%; height:100%; object-fit:contain; }

.brand__text{
  display:flex;
  flex-direction:column;
  line-height: 1.05;
}
.brand__text strong{ font-weight: 800; }
.brand__text small{ color: rgba(18,18,18,.55); }

.nav-links{
  display:none;
  align-items:center;
  gap: 18px;
  flex-wrap:wrap;
}

.nav-links a{
  position: relative;
  padding: 10px 6px;
  color: rgba(18,18,18,.74);
  font-weight: 650;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 2px;
  background: transparent;
  border-radius: 999px;
  transform: scaleX(.6);
  transform-origin: left;
  transition: background 160ms ease, transform 160ms ease;
}
.nav-links a:hover{
  color: rgba(18,18,18,.92);
}
.nav-links a:hover::after{
  background: rgba(27,77,255,.35);
  transform: scaleX(1);
}

.nav-cta{ display:flex; gap: 10px; }

@media (min-width: 980px){
  .nav-links{ display:flex; }
}

/* --------------------------------------------------------------------------
   Hero — new layout: big editorial image area + side “paper column”
   (closer in spirit to the reference)
   -------------------------------------------------------------------------- */
.hero{
  padding-block: clamp(26px, 4vw, 56px);
}

.hero-wrap{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(14px, 2vw, 26px);
  align-items: stretch;
}

@media (max-width: 980px){
  .hero-wrap{ grid-template-columns: 1fr; }
}

/* Left: image poster */
.hero-poster{
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: clamp(520px, 62vh, 760px);
  background: var(--paper-2);
}

.hero-poster img{
  width:100%;
  height:100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.02);
}

/* quiet white type on image */
.hero-overlay{
  position:absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,18,18,.05) 0%, rgba(18,18,18,.18) 38%, rgba(18,18,18,.44) 100%);
}

.hero-copy{
  position:absolute;
  left: clamp(18px, 2.4vw, 34px);
  right: clamp(18px, 2.4vw, 34px);
  bottom: clamp(18px, 2.4vw, 34px);
  color: #fff;
}

.hero-copy .kicker{ color: rgba(255,255,255,.72); }
.hero-copy h1{
  color:#fff;
  text-shadow: 0 18px 36px rgba(0,0,0,.28);
}
.hero-copy .lead{
  color: rgba(255,255,255,.86);
  text-shadow: 0 16px 28px rgba(0,0,0,.22);
  max-width: 58ch;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 12px;
}

/* subtle genogram motif (super minimal) */
.hero-geno{
  position:absolute;
  inset: 0;
  pointer-events:none;
  opacity: .22;
  background:
    radial-gradient(circle at 22% 34%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    radial-gradient(circle at 44% 56%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    linear-gradient(118deg, transparent 0 36%, rgba(255,255,255,.36) 36% 37%, transparent 37% 100%),
    linear-gradient(22deg, transparent 0 56%, rgba(255,255,255,.30) 56% 57%, transparent 57% 100%);
  mix-blend-mode: screen;
}

/* Right: side paper column (calm, tall, like editorial sidebar) */
.hero-side{
  border-radius: var(--r-lg);
  overflow:hidden;
}

.hero-side .panel{
  height:100%;
}

.side-title{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
}

.side-list{
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display:grid;
  gap: 12px;
}

.side-item{
  display:grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(18,18,18,.10);
  background: rgba(255,255,255,.70);
}

.node{
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(18,18,18,.16);
  background: rgba(27,77,255,.10);
  position: relative;
  margin-top: 3px;
}
.node::after{
  content:"";
  position:absolute;
  left: 50%;
  top: 16px;
  width: 1px;
  height: 18px;
  background: rgba(18,18,18,.14);
  transform: translateX(-50%);
}
.side-list li:last-child .node::after{ display:none; }

.side-item strong{
  display:block;
  color: rgba(18,18,18,.92);
  font-weight: 760;
  margin-bottom: 4px;
}
.side-item span{ color: rgba(18,18,18,.64); }

/* --------------------------------------------------------------------------
   Service tiles — closer to the “directory/services” feel of reference
   -------------------------------------------------------------------------- */
.tiles{
  display:grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: var(--gap);
}

.tile{
  grid-column: span 4;
  border-radius: var(--r-md);
  overflow:hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
  min-height: 220px;
  position: relative;
}

@media (max-width: 980px){
  .tile{ grid-column: 1 / -1; }
}

.tile__media{
  height: 140px;
  background: linear-gradient(135deg, rgba(27,77,255,.10), rgba(18,18,18,.03));
  border-bottom: 1px solid var(--line);
}

.tile__body{
  padding: 16px 16px;
}

.tile__body h3{ margin-bottom: 8px; }
.tile__body p{ margin-bottom: 10px; }

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: rgba(18,18,18,.60);
  background: rgba(255,255,255,.40);
}
