/* Cognitive Services — calm clinical consulting theme */
:root {
  --color-bg: #e6ece8;
  --color-bg-deep: #d5dfd9;
  --color-surface: #f7faf8;
  --color-ink: #1a2a27;
  --color-ink-soft: #3d524d;
  --color-muted: #5f736d;
  --color-primary: #1f4f4a;
  --color-primary-hover: #163b37;
  --color-accent: #b0892e;
  --color-accent-soft: #f0e6c8;
  --color-line: #c5d2cb;
  --color-error: #9b3b32;
  --color-success: #2a6b4f;
  --font-display: "Gowun Batang", "Batang", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --space-xs: 0.4rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --radius: 2px;
  --radius-lg: 8px;
  --shadow: 0 12px 40px rgba(31, 79, 74, 0.08);
  --max: 72rem;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(176, 137, 46, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(31, 79, 74, 0.1), transparent 45%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-primary-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-ink);
  margin: 0 0 var(--space-md);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.15rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-md); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: var(--space-xl) 0;
}

.section--tight {
  padding: var(--space-lg) 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.lede {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
  max-width: 38rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: #f7faf8;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-line);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
}

.btn--accent {
  background: var(--color-accent-soft);
  color: var(--color-ink);
  border-color: rgba(176, 137, 46, 0.35);
}

.btn--accent:hover {
  background: #e8d7a8;
  color: var(--color-ink);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-header__brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.site-header__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-nav__cta {
  padding: 0.45rem 0.9rem;
  background: var(--color-primary);
  color: #f7faf8 !important;
  border-radius: var(--radius);
}

.site-nav__cta:hover {
  background: var(--color-primary-hover);
}

@media (max-width: 900px) {
  .site-header__toggle { display: flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    padding: var(--space-md);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav__cta {
    text-align: center;
  }
}

/* Footer */
.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--color-primary);
  color: #dfe8e4;
}

.site-footer a { color: #f0e6c8; }
.site-footer a:hover { color: #fff; }

.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: var(--space-xs);
}

.site-footer__tag,
.site-footer__contact p {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.site-footer__label {
  display: inline-block;
  min-width: 3.2rem;
  color: #a8c0b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.site-footer__copy {
  width: min(100% - 2rem, var(--max));
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  color: #a8c0b8;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  z-index: 50;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 40rem;
  margin-inline: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.cookie-banner[hidden] { display: none !important; }

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: flex-end;
  justify-content: space-between;
}

.cookie-banner__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.cookie-banner__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  max-width: 26rem;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-banner__error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

/* Hero compositions */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(26, 42, 39, 0.82) 0%, rgba(26, 42, 39, 0.45) 55%, rgba(26, 42, 39, 0.25) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-xl);
  color: #f7faf8;
  animation: rise-in 0.9s var(--ease) both;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 var(--space-sm);
  color: #fff;
  letter-spacing: -0.03em;
}

.hero__line {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  max-width: 28rem;
  margin-bottom: var(--space-lg);
  color: #e4ece8;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-line);
  background: linear-gradient(180deg, rgba(247, 250, 248, 0.7), transparent);
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero--split {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .page-hero--split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
  }
}

.page-hero__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-hero__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Offer / service grids — interaction cards allowed */
.offer-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.offer-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.offer-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.offer-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.offer-card:hover .offer-card__img img {
  transform: scale(1.04);
}

.offer-card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.offer-card__body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.offer-card__body p {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.offer-card__meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}

/* Home narrative sections */
.home-intro {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .home-intro {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.home-intro__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-intro__visual img {
  width: 100%;
  aspect-ratio: 5/4;
  object-fit: cover;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.5;
  color: var(--color-primary);
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  max-width: 36rem;
}

.evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}

.evidence-list li {
  background: var(--color-surface);
  padding: var(--space-md);
  border-left: 3px solid var(--color-primary);
}

.evidence-list .who {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0.5rem 0 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
  background: var(--color-surface);
  padding: var(--space-md);
  border-top: 3px solid var(--color-accent);
  animation: rise-in 0.7s var(--ease) both;
}

.steps li:nth-child(2) { animation-delay: 0.08s; }
.steps li:nth-child(3) { animation-delay: 0.16s; }
.steps li:nth-child(4) { animation-delay: 0.24s; }

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--color-ink-soft); }

/* Detail layouts */
.detail-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 860px) {
  .detail-grid {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: start;
  }
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.panel h3 { margin-top: 0; }

.checklist {
  margin: 0;
  padding-left: 1.1rem;
}

.checklist li { margin-bottom: 0.4rem; }

.rate-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-line);
  vertical-align: top;
}

.rate-table th {
  font-weight: 600;
  color: var(--color-primary);
  width: 38%;
}

.note {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
}

/* Blog */
.post-list {
  display: grid;
  gap: var(--space-lg);
}

.post-item {
  display: grid;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}

@media (min-width: 700px) {
  .post-item {
    grid-template-columns: 14rem 1fr;
    align-items: start;
  }
}

.post-item:hover { text-decoration: none; color: inherit; }
.post-item:hover h2 { color: var(--color-primary); }

.post-item__img {
  border-radius: var(--radius);
  overflow: hidden;
}

.post-item__img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin-bottom: 1.15rem;
}

.cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.cover img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
}

/* Forms */
.form {
  display: grid;
  gap: var(--space-md);
  max-width: 36rem;
}

.form__row {
  display: grid;
  gap: 0.35rem;
}

.form__row label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form__row input,
.form__row select,
.form__row textarea {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
}

.form__row input:focus,
.form__row select:focus,
.form__row textarea:focus {
  outline: 2px solid rgba(31, 79, 74, 0.35);
  border-color: var(--color-primary);
}

.form__row textarea { min-height: 9rem; resize: vertical; }

.form__error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin: 0;
}

.form__status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.form__status--ok {
  background: #e4f2ea;
  color: var(--color-success);
}

.form__status--err {
  background: #f8e8e6;
  color: var(--color-error);
}

.contact-aside {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
}

.contact-layout {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 800px) {
  .contact-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* Legal */
.legal {
  max-width: 44rem;
}

.legal h2 {
  margin-top: var(--space-xl);
  font-size: 1.35rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: var(--space-md) 0;
}

.legal th,
.legal td {
  border: 1px solid var(--color-line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  background: var(--color-surface);
}

.legal th { background: var(--color-bg-deep); }

/* 404 */
.error-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--space-xl) 1rem;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-accent);
  margin: 0;
}

/* Animations */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-band {
  background: var(--color-primary);
  color: #e8f0ed;
  padding: var(--space-xl) 0;
  margin-top: var(--space-xl);
}

.cta-band h2 { color: #fff; }
.cta-band p { color: #c5d8d2; max-width: 34rem; }

.story {
  background: var(--color-surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  margin-bottom: var(--space-md);
}

.story h3 { margin-top: 0; }

.two-col {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 760px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}
