:root {
  --ink: #142143;
  --muted: #52627b;
  --surface: #fff;
  color-scheme: light;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 1rem/1.6 "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 3px solid #245bc4;
  outline-offset: 4px;
}

.page-width {
  width: min(100% - clamp(2.25rem, 9vw, 8rem), 76rem);
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid #eaf0f8; }

.header-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand { display: inline-flex; border-radius: .4rem; }
.site-brand img { display: block; width: 4.45rem; height: auto; }

.header-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.05rem;
  border: 1px solid #e0e8f4;
  border-radius: 99px;
  color: #263e68;
  font-size: .875rem;
  font-weight: 700;
}

.header-link:hover { background: #f0f5ff; }

.hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  background:
    radial-gradient(ellipse at 12% 22%, #eaf3ff, transparent 55%),
    radial-gradient(ellipse at 89% 26%, #f0ecff, transparent 55%),
    linear-gradient(#f9fbff 38%, white 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#8ca4cd 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 100% 0%, #000, transparent 51%);
  opacity: .24;
}

.hero-inner { padding-block: clamp(3.15rem, 6.35vw, 6rem) clamp(2.9rem, 5vw, 4.6rem); }

.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5.45vw, 4.85rem);
  font-weight: 850;
  line-height: 1.13;
  letter-spacing: -.065em;
}

.hero h1 span { color: #3654a4; }

.hero p {
  max-width: 35rem;
  margin: clamp(1.05rem, 2.3vw, 1.85rem) auto 0;
  color: var(--muted);
  font-size: clamp(.98rem, 1.65vw, 1.17rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.services {
  padding-top: clamp(.65rem, 1.5vw, 1.35rem);
  scroll-margin-top: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.35vw, 1.8rem);
}

.service-card {
  --accent: #2459ac;
  --tint: #eaf2ff;
  --border: #dce7f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  box-shadow: 0 .35rem 1.6rem #14214308;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.service-card.first { --accent: #2c4a3b; --tint: #edf4ec; --border: #e0ebe0; }
.service-card.next { --accent: #51408c; --tint: #f0edff; --border: #e8e2f7; }
.service-card.edu { --accent: #146456; --tint: #eaf7f5; --border: #dbece8; }

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 .75rem 2rem #14214318;
  transform: translateY(-.2rem);
}

.card-brand {
  position: relative;
  isolation: isolate;
  min-height: 9.1rem;
  display: grid;
  place-items: center;
  padding: 1rem 2.5rem;
  background: linear-gradient(167deg, var(--tint) 15%, #fff 98%);
}

.card-brand img {
  display: block;
  width: min(100%, 8.6rem);
  height: auto;
  /* Blend the white and near-white logo backgrounds into the card. */
  filter: brightness(1.02);
  mix-blend-mode: multiply;
}

.card-arrow {
  position: absolute;
  right: .85rem;
  top: .85rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #ffffffc9;
  border: 1px solid var(--border);
  color: var(--accent);
}

.card-arrow::before, .card-arrow::after { content: ""; grid-area: 1 / 1; }
.card-arrow::before {
  width: .5rem;
  height: .5rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translate(.1rem, -.1rem);
}
.card-arrow::after {
  width: .8rem;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
}

.card-copy { padding: 1.1rem clamp(1rem, 1.75vw, 1.55rem) 1.6rem; }

.service-type {
  margin: 0 0 .65rem;
  color: var(--accent);
  font-size: .835rem;
  font-weight: 750;
}

.service-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.75vw, 1.45rem);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -.043em;
  text-wrap: balance;
}

.service-summary {
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.history { margin: 0; padding-block: 1.6rem 2.5rem; color: var(--muted); font-size: .875rem; }

@media (max-width: 880px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 510px) {
  .header-inner { min-height: 4.4rem; }
  .site-brand img { width: 4rem; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr); }
  .card-brand { min-height: 0; padding: .8rem; background: linear-gradient(90deg, var(--tint), white); }
  .card-copy { padding: 1rem .95rem 1.15rem .3rem; }
  .service-card h2 { text-wrap: wrap; }
  .card-arrow { display: none; }
}

.site-footer {
  padding-block: 2.5rem 1.75rem;
  border-top: 1px solid #e7edf6;
  background: #f8faff;
  color: var(--muted);
}

.footer-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 11rem) minmax(0, 12rem);
  gap: 2rem;
  align-items: start;
  padding-bottom: 2rem;
}

.footer-navigation .site-brand { justify-self: start; }
.footer-navigation .site-brand img { width: 5rem; mix-blend-mode: multiply; }
.footer-navigation h2 { margin: 0 0 .6rem; color: var(--ink); font-size: .9rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.footer-navigation a:not(.site-brand) { display: inline-block; padding-block: .25rem; font-size: .875rem; }
.site-footer a:hover { color: #2459ac; text-decoration: underline; text-underline-offset: .18em; }

.footer-details {
  display: grid;
  gap: .4rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e2eaf5;
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.footer-details ul { display: flex; flex-wrap: wrap; gap: .25rem 1.05rem; }
.footer-details p { margin: .45rem 0 0; }

@media (max-width: 600px) {
  .site-footer { padding-block: 1.75rem 1.5rem; }
  .footer-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .footer-navigation .site-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .service-card { transition: none; }
  .service-card:hover { transform: none; }
}
