/* Hallmark · redesign: full · posture: restrained · hero: founder portrait · nav: horizontal · footer: utility */
@font-face {
  font-family: 'Spoqa Han Sans Neo';
  src: url('./fonts/SpoqaHanSansNeo-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Spoqa Han Sans Neo';
  src: url('./fonts/SpoqaHanSansNeo-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Spoqa Han Sans Neo';
  src: url('./fonts/SpoqaHanSansNeo-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --font: 'Spoqa Han Sans Neo', 'Malgun Gothic', sans-serif;
  --ink: #000;
  --paper: #ffffff;
  --surface: #f0f1f2;
  --line: #d4d6d8;
  --accent: #66686b;
  --button-fill: #e9eaec;
  --accent-hover: #dfe1e3;
  --heading: clamp(28px, 3.3vw, 48px);
  --section: clamp(48px, 7vw, 104px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.75 var(--font); }
img { display: block; width: 100%; height: auto; }
figure, dl, dd { margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.28; text-wrap: balance; }
h2 { font-size: var(--heading); }
h3 { font-size: clamp(20px, 2.2vw, 30px); }
main { word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: .22em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wrap { width: min(calc(100% - 48px), 1184px); margin-inline: auto; }
.skip { position: absolute; z-index: 5; inset: 8px auto auto 8px; background: var(--paper); padding: 8px 16px; transform: translateY(-150%); }
.skip:focus { transform: none; }
header { border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.header { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.brand-mark { width: 40px; height: 40px; }
.brand small { display: block; margin-top: 4px; color: var(--ink); font-size: .75rem; font-weight: 400; }
nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 36px); }
nav a { font-size: .875rem; text-decoration: none; white-space: nowrap; }
nav a:hover, footer a:hover { text-decoration: underline; }
#menu { display: none; }

.hero { background: var(--surface); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(32px, 7vw, 104px); padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(36px, 4.6vw, 66px); max-inline-size: 10.5em; line-height: 1.22; }
.hero p { max-inline-size: 29em; color: var(--ink); margin-block: 20px 28px; }
.outline, .solid { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 8px 24px; border: 1px solid var(--accent); background: var(--button-fill); color: var(--ink); font-weight: 500; text-decoration: none; }
.outline:hover, .solid:hover { background: var(--accent-hover); }
.ug-hero-portrait { justify-self: start; width: min(100%, 350px); }
.ug-hero-portrait img { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 38%; }
.ug-hero-portrait figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; padding-top: 12px; }
.ug-hero-portrait span, figcaption { font-size: .8125rem; color: var(--ink); }

.about { border-bottom: 1px solid var(--line); }
.about .wrap, .services, .people, .cases, .application, .ug-contact { padding-block: var(--section); }
.about-copy { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 48px; }
.about-copy h2 { grid-row: span 3; }
.about-copy .lead { font-size: clamp(20px, 2.2vw, 30px); color: var(--ink); font-weight: 500; }
.about-copy p { max-inline-size: 38em; }
.section-head { margin-bottom: 28px; }
.section-head p, .note { color: var(--ink); }
.service { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: clamp(28px, 6vw, 84px); padding-block: 32px; border-top: 1px solid var(--line); }
.service-title > span { color: var(--ink); font-size: .875rem; font-weight: 700; }
.service-photo img { aspect-ratio: 2 / 1; object-fit: cover; }
figcaption { margin-top: 8px; }
.service-intro { font-weight: 700; font-size: 1.125rem; }
dt { font-weight: 700; }
dd { color: var(--ink); }
details { border-top: 1px solid var(--line); margin-top: 16px; }
summary { padding-block: 12px; cursor: pointer; font-weight: 500; }
details p { color: var(--ink); }
.people { background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-inline: max(24px, calc((100% - 1184px) / 2)); align-items: center; }
.people > .wrap { width: 100%; }
.people .quote { font-size: clamp(20px, 2vw, 28px); }
.people p, .people figcaption { color: var(--ink); }
.meeting img { aspect-ratio: 4 / 3; object-fit: cover; }
.cases { background: var(--paper); }
.cases-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); align-items: end; gap: 32px; margin-bottom: 24px; }
.cases-disclosure { color: var(--ink); }
.case-row { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.5fr) minmax(0, .65fr); gap: 28px; padding-block: 24px; border-top: 1px solid var(--line); }
.case-company p, .case-company span, .case-amount > span { color: var(--ink); font-size: .875rem; }
.case-amount strong { display: block; font-size: 1.625rem; font-variant-numeric: tabular-nums; }
.case-amount strong span { font-size: 1rem; margin-left: .25em; }
.application, .ug-contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 6vw, 84px); }
.questions details:first-child { margin-top: 0; }
.ug-contact { border-top: 1px solid var(--line); }
.ug-contact dl > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
footer { background: var(--surface); padding-block: 32px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.footer-grid > div { display: grid; justify-items: start; gap: 4px; }
.footer-grid p { font-weight: 700; margin: 0; }
.footer-grid a, .footer-grid button, .footer-grid span { font-size: .875rem; }
#privacy-open { min-height: 44px; padding: 0; color: inherit; border: 0; background: transparent; text-decoration: underline; }
.disclaimer { margin-block: 24px 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); font-size: .8125rem; }
dialog { width: min(90vw, 520px); padding: 28px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: var(--ink); opacity: .68; }
dialog h2 { font-size: 1.5rem; }
.close { float: right; min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.modal-open { overflow: hidden; }

@media (max-width: 820px) {
  #menu { display: block; min-height: 44px; padding: 4px 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
  nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--paper); padding: 16px 24px; border-bottom: 1px solid var(--line); }
  nav.open { display: grid; }
  nav a { display: flex; align-items: center; min-height: 44px; }
  .people { gap: 24px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .header { min-height: 68px; }
  .hero-inner, .about-copy, .service, .people, .cases-heading, .case-row, .application, .ug-contact, .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero h1 { font-size: clamp(32px, 8.5vw, 46px); }
  .ug-hero-portrait { width: min(100%, 280px); }
  .people { padding-inline: 20px; }
  .about-copy h2 { grid-row: auto; }
  .case-row { gap: 12px; }
}

.outline:focus-visible, .solid:focus-visible { outline-color: var(--ink); }
@media (min-width: 1000px) {
  .hero-inner {
    grid-template-columns: minmax(0, 520px) minmax(0, 410px);
    justify-content: center;
    gap: 64px;
    padding-block: 64px;
  }
  .ug-hero-portrait { width: 100%; }
}

@media (min-width: 1000px) {
  .hero-inner {
    grid-template-columns: minmax(0, 520px) minmax(0, 450px);
    gap: clamp(40px, 4.45vw, 64px);
    min-height: min(calc(100svh - 81px), 780px);
    padding-block: 40px;
  }

  .ug-hero-portrait img { aspect-ratio: 4 / 5; }
}

.ug-hero-portrait img {
  aspect-ratio: auto;
  object-fit: contain;
}

.hero h1 { font-weight: 500; }
.hero p { text-wrap: balance; }
@media (min-width: 1000px) {
  .hero h1 { font-size: clamp(38px, 3.9vw, 56px); line-height: 1.3; }
}
@media (max-width: 640px) {
  .ug-hero-portrait { width: min(100%, 320px); justify-self: center; }
}

/* Compact editorial hero: photo and copy share one reading grid. */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero .hero-inner {
  grid-template-columns: minmax(0, 520px) minmax(0, 320px);
  justify-content: center;
  gap: clamp(28px, 7vw, 104px);
  min-height: 0;
  padding-block: clamp(36px, 5.5vw, 80px);
}
.hero h1 { font-size: clamp(32px, 4vw, 54px); max-inline-size: 11em; }
.hero p { text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-actions > a:last-child { display: inline-flex; align-items: center; min-height: 48px; font-size: .875rem; }
.hero .ug-hero-portrait { width: 100%; }
.hero .ug-hero-portrait figcaption { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .hero .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero .ug-hero-portrait { width: min(100%, 280px); justify-self: start; }
}


.hero-contact {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .3em;
}
.hero-contact:hover { text-decoration-thickness: 2px; }

/* UG Korean typography */
.hero h1 {
  letter-spacing: normal;
  line-height: 1.25;
}
.header nav a { font-weight: 500; }
main h2 { line-height: 1.3; }
.ug-hero-portrait figcaption { line-height: 1.5; }

/* Keep the consultation copy on a quiet background and add texture behind the photo. */
.people {
  --consult-grid: #dfe2e5;
  background-image:
    linear-gradient(90deg, var(--surface) 44%, transparent 78%),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--consult-grid) 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 31px, var(--consult-grid) 31px 32px);
}
.people .meeting {
  padding: clamp(10px, 1.4vw, 18px);
  background: var(--paper);
  border: 1px solid var(--line);
}
.people .meeting figcaption { padding-inline: 2px; }
@media (max-width: 640px) {
  .people {
    background-image:
      linear-gradient(var(--surface) 45%, transparent 85%),
      repeating-linear-gradient(90deg, transparent 0 31px, var(--consult-grid) 31px 32px),
      repeating-linear-gradient(0deg, transparent 0 31px, var(--consult-grid) 31px 32px);
  }
}

/* The portrait sits on a white panel against the gray hero. */
.hero .ug-hero-copy::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
  background: var(--ink);
}

.hero .ug-hero-portrait {
  box-sizing: border-box;
  padding: clamp(10px, 1.25vw, 16px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 6px 6px 0 rgb(0 0 0 / 5%);
}

.hero .ug-hero-portrait figcaption {
  margin-top: 10px;
  padding-top: 9px;
}

@media (prefers-reduced-motion: no-preference) {
  .ug-hero-copy > :is(h1, p) {
    animation: hero-copy-enter 3s ease-in-out .4s backwards;
  }
}

@keyframes hero-copy-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .service.slide-in {
    --working-slide: clamp(14px, 1.5vw, 24px);
  }

  .service.slide-in:not(:focus-within) > div {
    --working-start: var(--working-slide);
    animation: working-slide-in 3s ease-in-out;
  }

  .service.slide-in:not(:focus-within) > .service-title {
    --working-start: calc(-1 * var(--working-slide));
  }
}

@keyframes working-slide-in {
  from { opacity: 0; transform: translateX(var(--working-start)); }
  to { opacity: 1; transform: translateX(0); }
}

.hero h1 { font-weight: 700; }
main figcaption { font-size: .875rem; }

.institution-image-scroll {
  overflow-x: auto;
  background: #f0f1f2;
}
.institution-image-scroll img {
  width: min(100%, 1060px);
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.institution-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 20px;
  padding: 32px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.institution-logo {
  display: block;
  width: 190px;
  height: 48px;
  background-image: url('./funding-institutions.png');
  background-size: 848px 422px;
  background-repeat: no-repeat;
}
.institution-logo.kibo { background-position: -90px -50px; }
.institution-logo.koreg { background-position: -344px -50px; }
.institution-logo.semas { background-position: -594px -50px; }
.institution-logo.kosme { background-position: -215px -264px; }
.institution-logo.kodit { background-position: -490px -264px; }

/* Clearer Korean text: use the supplied medium weight for reading copy. */
body {
  font-weight: 500;
  letter-spacing: 0;
}
h1, h2, h3, h4 {
  letter-spacing: -.01em;
}
.hero h1 {
  letter-spacing: -.012em;
  line-height: 1.28;
}
p, dd {
  letter-spacing: -.005em;
}
.brand small,
.ug-hero-portrait figcaption,
.service-photo figcaption,
.meeting figcaption,
.case-company p,
.case-company span,
.case-amount > span,
.disclaimer {
  font-weight: 500;
  letter-spacing: 0;
}

.floating-phone {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: #18252f;
  border: 1px solid #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / 16%);
  text-decoration: none;
}
.floating-phone:hover { background: #33424d; }
.floating-phone:focus-visible { outline: 3px solid #000; outline-offset: 4px; }
footer { padding-bottom: 92px; }
.institution-logo.kodit { clip-path: inset(0 10px 0 0); }

.floating-phone {
  width: 66px;
  height: 84px;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}
.floating-phone svg {
  box-sizing: content-box;
  width: 26px;
  height: 26px;
  padding: 16px;
  border-radius: 50%;
  color: #fff;
  background: #167a45;
  box-shadow: 0 3px 12px rgb(0 0 0 / 16%);
}
.floating-phone .phone-label {
  color: #000;
  background: #fff;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
}
.floating-phone:hover { background: transparent; }
.floating-phone:hover svg { background: #106336; }
