/* =========================================================
   PHWORKS — mobile-first stylesheet
   ========================================================= */

:root {
  --color-primary: #1565D8;
  --color-primary-dark: #0B1F3A;
  --color-primary-light: #EAF3FF;
  --color-accent: #16A36A;
  --color-text: #172033;
  --color-muted: #667085;
  --color-border: #E5EAF1;
  --color-bg: #F7F9FC;
  --color-white: #FFFFFF;

  --radius-card: 16px;
  --shadow-card: 0 6px 20px rgba(11, 31, 58, 0.06);
  --header-height: 64px;
  --container-max: 1280px;

  --font-primary: "Pretendard", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;

  --text-strong: #191f28;
  --text-title: #0b2545;
  --text-body: #4e5968;
  --text-muted: #6b7684;
  --text-light: #8b95a1;
  --brand-primary: var(--color-primary);
}

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

html {
  scroll-behavior: smooth;
}

section[id],
div#top {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-primary);
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-white);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.015em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, p {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(0);
}

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

.btn--primary:hover {
  background: #0f52b3;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(21, 101, 216, 0.28);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
  font-weight: 600;
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn--outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 600;
}

.btn--outline-light:hover {
  border-color: #fff;
  transform: translateY(-2px);
}

.btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn--lg {
  min-height: 50px;
  padding: 0 28px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.btn--block {
  width: 100%;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  box-shadow: 0 0 0 rgba(11, 31, 58, 0);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 6px 20px rgba(11, 31, 58, 0.08);
}

.brand__symbol {
  transition: transform 0.3s ease;
}

.brand:hover .brand__symbol {
  transform: rotate(-6deg) scale(1.08);
}

.site-header__inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand__symbol {
  width: 32px;
  height: auto;
}

.brand__text {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--color-primary-dark);
}

.main-nav {
  display: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__actions .btn--primary {
  display: none;
}

.hamburger {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-primary-dark);
  transition: background-color 0.2s ease;
}

.hamburger:hover {
  background: var(--color-bg);
}

.hamburger__icon-open,
.hamburger__icon-close {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hamburger__icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.hamburger[aria-expanded="true"] .hamburger__icon-open {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.hamburger[aria-expanded="true"] .hamburger__icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 20px;
  border-top: 1px solid var(--color-border);
  background: #fff;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
}

.mobile-nav.is-open {
  max-height: 600px;
  opacity: 1;
  padding: 12px 20px 20px;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
}

.mobile-nav__link {
  display: block;
  padding: 12px 4px;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav .btn {
  margin-top: 12px;
}

body.nav-open {
  overflow: hidden;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: 40px 0 48px;
  background: linear-gradient(180deg, #F7F9FC 0%, #FFFFFF 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero__title {
  margin: 0;
  color: var(--text-title);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.045em;
  word-break: keep-all;
}

.hero__desc {
  margin: 36px 0 0;
  color: var(--text-muted);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.025em;
  word-break: keep-all;
}

.hero__actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__actions .btn {
  width: 100%;
}

.hero__visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

html.js-anim .hero__content > * {
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
}

html.js-anim .hero__content > *:nth-child(1) {
  animation-delay: 0.05s;
}

html.js-anim .hero__content > *:nth-child(2) {
  animation-delay: 0.2s;
}

html.js-anim .hero__content > *:nth-child(3) {
  animation-delay: 0.35s;
}

html.js-anim .hero__visual {
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.25s forwards;
}

html.js-anim .hero__visual img {
  animation: floatY 5s ease-in-out 1.2s infinite;
}

/* Scroll reveal (progressive enhancement: only active once JS confirms support) */
html.js-anim .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(2) {
  transition-delay: 70ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(3) {
  transition-delay: 140ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(4) {
  transition-delay: 210ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(5) {
  transition-delay: 280ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(6) {
  transition-delay: 350ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(7) {
  transition-delay: 420ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(8) {
  transition-delay: 490ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(9) {
  transition-delay: 560ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(10) {
  transition-delay: 630ms;
}
html.js-anim :is(.card-grid, .industry-grid, .process-timeline, .stats__grid) > .reveal:nth-child(11) {
  transition-delay: 700ms;
}

/* =========================================================
   Stats
   ========================================================= */

.stats {
  background: var(--color-primary-dark);
  padding: 32px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
}

.stats__value {
  color: #fff;
  font-size: 36px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stats__label {
  margin-top: 4px;
  color: #A9C2E8;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* =========================================================
   Sections (generic)
   ========================================================= */

.section {
  padding: 56px 0;
}

.section--muted {
  background: var(--color-bg);
}

.section__title {
  color: var(--text-strong);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.04em;
  word-break: keep-all;
  text-align: center;
}

.section__title::after {
  content: "";
  display: block;
  margin: 14px auto 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-primary);
}

html.js-anim .section__title.reveal::after {
  width: 0;
  transition: width 0.6s ease 0.2s;
}

html.js-anim .section__title.reveal.is-visible::after {
  width: 56px;
}

.section__desc {
  margin-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.card-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Service cards */
.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 31, 58, 0.12);
  border-color: transparent;
}

.service-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.service-card:hover .service-card__icon {
  transform: scale(1.08);
}

.service-card__icon .icon {
  width: 22px;
  height: 22px;
}

.service-card__title {
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.service-card__desc {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.service-card__point {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-card__point .icon {
  width: 16px;
  height: 16px;
}

/* Process timeline */
.process-timeline {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-timeline__item {
  display: flex;
  gap: 16px;
  padding: 0 0 28px;
  position: relative;
}

.process-timeline__item::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
  transform-origin: top;
}

html.js-anim .process-timeline__item.reveal::before {
  transform: scaleY(0);
  transition: transform 0.5s ease 0.3s;
}

html.js-anim .process-timeline__item.reveal.is-visible::before {
  transform: scaleY(1);
}

.process-timeline__item:last-child::before {
  display: none;
}

.process-timeline__index {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.process-timeline__title {
  font-size: 16px;
  font-weight: 700;
  padding-top: 8px;
}

.process-timeline__desc {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-muted);
}

/* Industries */
.industry-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.industry-chip {
  text-align: center;
  padding: 16px 8px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  font-weight: 600;
  font-size: 14.5px;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.industry-chip:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 10px 20px rgba(21, 101, 216, 0.12);
}

/* Differentiators */
.diff-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 24px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.diff-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 31, 58, 0.1);
}

.diff-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.diff-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-primary-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.diff-card:hover .diff-card__icon {
  transform: scale(1.08);
}

.diff-card__icon .icon {
  width: 22px;
  height: 22px;
}

.diff-card__title {
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.diff-card__desc {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

/* Portfolio */
.portfolio-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 31, 58, 0.12);
}

.portfolio-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card__image {
  transform: scale(1.06);
}

.portfolio-card__body {
  padding: 20px;
}

.portfolio-card__industry {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.portfolio-card__title {
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.portfolio-card__keyword,
.portfolio-card__summary {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.portfolio-card__link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-primary);
}

.portfolio-card__link .icon {
  transition: transform 0.25s ease;
}

.portfolio-card__link:hover .icon {
  transform: translateX(4px);
}

.empty-state {
  margin-top: 32px;
  padding: 48px 20px;
  text-align: center;
  color: var(--color-muted);
  background: var(--color-bg);
  border-radius: var(--radius-card);
}

/* CTA */
.cta {
  background: linear-gradient(135deg, #0B1F3A 0%, #123061 100%);
  padding: 56px 0;
}

.cta__inner {
  text-align: center;
}

.cta__title {
  color: #fff;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.cta__desc {
  margin-top: 12px;
  color: #C9D6E8;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.02em;
}

.cta__actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta__actions .btn {
  width: 100%;
}

/* Footer */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 0;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.site-footer__logo {
  width: 148px;
  height: auto;
}

.site-footer__desc {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.site-footer__list .icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  color: var(--color-primary);
}

.site-footer__privacy-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.site-footer__legal {
  margin-top: 32px;
  border-top: 1px solid var(--color-border);
  padding: 18px 0;
  font-size: 12.5px;
  color: var(--color-muted);
}

.site-footer__legal p + p {
  margin-top: 4px;
}

/* Mobile fixed CTA */
.mobile-fixed-cta {
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: 16px;
  z-index: 400;
  background: var(--color-primary);
  color: #fff;
  min-height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(21, 101, 216, 0.35);
}

@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.js-anim .mobile-fixed-cta {
  animation: slideUpIn 0.5s ease 1s backwards;
}

@keyframes ctaGlow {
  0%,
  100% {
    box-shadow: 0 10px 22px rgba(21, 101, 216, 0.28);
  }
  50% {
    box-shadow: 0 10px 30px rgba(21, 101, 216, 0.5);
  }
}

html.js-anim .hero__actions .btn--primary {
  animation: ctaGlow 2.6s ease-in-out 1.5s infinite;
}

html.js-anim .hero__actions .btn--primary:hover {
  animation: none;
}

/* =========================================================
   Modal
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 58, 0.55);
}

.modal__dialog {
  position: absolute;
  inset: 0;
  background: #fff;
  overflow-y: auto;
  padding: 24px 20px 40px;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal.is-open .modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--color-primary-dark);
  padding-right: 40px;
}

.modal__subtitle {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 14.5px;
}

#inquiry-form {
  margin-top: 24px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 0;
}

.form-row--split > div {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.required {
  color: #D92D20;
}

.form-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}

.form-input:focus {
  border-color: var(--color-primary);
}

.form-textarea {
  padding: 12px 14px;
  min-height: 100px;
  resize: vertical;
}

.form-optional {
  margin: 4px 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.form-optional summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  min-height: 20px;
}

.form-optional[open] summary {
  margin-bottom: 12px;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  min-height: 44px;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-checkbox a {
  color: var(--color-primary);
  text-decoration: underline;
}

.form-error {
  background: #FEF3F2;
  border: 1px solid #FECDCA;
  color: #B42318;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.modal__panel--success {
  text-align: center;
  padding-top: 40px;
}

.modal__success-symbol {
  margin: 0 auto 20px;
}

.modal__panel--success .btn {
  margin-top: 24px;
}

/* =========================================================
   Legal / Error pages
   ========================================================= */

.legal__container {
  max-width: 760px;
}

.legal__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: var(--color-primary-dark);
}

.legal__updated {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 13.5px;
}

.legal__intro {
  margin-top: 20px;
  color: var(--color-text);
}

.legal h2 {
  margin-top: 32px;
  font-size: 18px;
  font-weight: 700;
}

.legal p {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.legal__contact-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal__contact-list a {
  color: var(--color-primary);
}

.legal__footnote {
  margin-top: 32px;
  font-size: 13px;
}

.error-page__container {
  text-align: center;
  padding: 40px 0;
}

.error-page__symbol {
  margin: 0 auto 20px;
  opacity: 0.6;
}

.error-page__code {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.error-page__title {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
}

.error-page__message {
  margin-top: 10px;
  color: var(--color-muted);
}

.error-page__container .btn {
  margin-top: 28px;
}

/* =========================================================
   Typography — mobile overrides (Pretendard / Font.md)
   ========================================================= */

@media (max-width: 767px) {
  .brand__text {
    font-size: 24px;
  }

  .hero__title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
  }

  .hero__desc {
    margin-top: 32px;
    font-size: 20px;
    line-height: 1.65;
    letter-spacing: -0.025em;
  }

  .btn--lg {
    font-size: 18px;
  }

  .section__title {
    font-size: 32px;
    line-height: 1.35;
  }

  .mobile-nav__link {
    font-size: 22px;
    line-height: 1.5;
    letter-spacing: -0.025em;
  }
}

@media (max-width: 390px) {
  .hero__title {
    font-size: 39px;
  }
}

/* =========================================================
   Tablet: 768px – 1199px
   ========================================================= */

@media (min-width: 768px) {
  .hero__actions {
    flex-direction: row;
  }

  .hero__actions .btn {
    width: auto;
  }

  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row--split {
    grid-template-columns: 1fr 1fr;
  }

  .form-row--split > div {
    margin-bottom: 0;
  }

  .industry-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .process-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .process-timeline__item::before {
    display: none;
  }

  .cta__actions {
    flex-direction: row;
    justify-content: center;
  }

  .cta__actions .btn {
    width: auto;
  }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .modal__dialog {
    inset: auto;
    top: 50%;
    left: 50%;
    width: min(600px, calc(100vw - 40px));
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(11, 31, 58, 0.25);
    transform: translate(-50%, -50%) translateY(10px) scale(0.98);
  }

  .modal.is-open .modal__dialog {
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

/* =========================================================
   Desktop: >= 1200px
   ========================================================= */

@media (min-width: 1200px) {
  .main-nav {
    display: block;
  }

  .main-nav__list {
    display: flex;
    gap: 32px;
  }

  .main-nav__link {
    color: #333d4b;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.015em;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .main-nav__link:hover,
  .main-nav__link.is-active {
    color: var(--color-primary);
    border-color: var(--color-primary);
  }

  .site-header__actions .btn--primary {
    display: inline-flex;
  }

  .hamburger {
    display: none;
  }

  .hero {
    padding: 72px 0 88px;
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: 64px;
  }

  .hero__content {
    flex: 0 0 46%;
  }

  .hero__visual {
    flex: 1;
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .industry-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .process-timeline {
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
  }

  .process-timeline__item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .process-timeline__item::after {
    content: "";
    position: absolute;
    top: 20px;
    left: calc(50% + 28px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--color-border);
  }

  .process-timeline__item:last-child::after {
    display: none;
  }

  .section {
    padding: 88px 0;
  }
}


/* =========================================================
   Reduced motion (kept last so it always wins the cascade)
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal,
  html.js-anim .hero__content > *,
  html.js-anim .hero__visual {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  html.js-anim .hero__visual img {
    animation: none;
  }

  .btn,
  .service-card,
  .diff-card,
  .portfolio-card,
  .portfolio-card__image,
  .industry-chip,
  .service-card__icon,
  .diff-card__icon,
  .modal,
  .modal__dialog,
  .mobile-nav,
  .hamburger__icon-open,
  .hamburger__icon-close,
  .site-header,
  .brand__symbol,
  .section__title::after,
  .process-timeline__item::before,
  .portfolio-card__link .icon,
  .mobile-fixed-cta,
  .hero__actions .btn--primary {
    transition: none !important;
    animation: none !important;
  }

  html.js-anim .section__title.reveal::after,
  html.js-anim .process-timeline__item.reveal::before {
    width: 56px;
    transform: scaleY(1);
  }
}
