:root {
  --ink: #13201b;
  --muted: #5e6b65;
  --line: #dce3df;
  --paper: #f7f9f8;
  --white: #ffffff;
  --green: #1f6d55;
  --green-dark: #164f40;
  --steel: #344540;
  --amber: #c8892d;
  --shadow: 0 18px 50px rgba(19, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 76px;
  padding: 16px clamp(20px, 5vw, 72px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 176px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  color: currentColor;
  font-size: 11px;
  opacity: 0.78;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
  font-size: 15px;
  font-weight: 700;
}

.nav a {
  padding: 8px 0;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: inherit;
  background: transparent;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 92vh;
  padding: 120px clamp(20px, 5vw, 72px) 96px;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(
    90deg,
    rgba(12, 23, 20, 0.9) 0%,
    rgba(12, 23, 20, 0.68) 44%,
    rgba(12, 23, 20, 0.22) 100%
  );
}

.hero-content {
  position: relative;
  max-width: 720px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary.dark {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.section {
  padding: clamp(78px, 9vw, 132px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.section-copy h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.16;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
}

.section-media img,
.record-card img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.section-media img {
  aspect-ratio: 4 / 3;
}

.section-copy > p {
  max-width: 760px;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 20px;
}

.stats {
  display: grid;
  gap: 12px;
}

.stats div,
.service-card,
.timeline li,
.contact-form,
.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.stats div {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  min-height: 78px;
  padding: 18px;
}

.stats strong,
.card-number {
  color: var(--green);
}

.stats span {
  font-weight: 800;
}

.projects,
.services {
  background: var(--white);
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.record-card {
  overflow: hidden;
}

.record-card img {
  aspect-ratio: 16 / 10;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

.record-card div {
  padding: 26px;
}

.record-card h3,
.service-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.record-card p,
.service-card p,
.timeline span,
.contact-copy p {
  color: var(--muted);
}

.equipment {
  background: #eef3f1;
}

.equipment-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.equipment-list li {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 800;
}

.equipment-list li::before {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-height: 260px;
  padding: 28px;
  box-shadow: 0 1px 0 rgba(19, 32, 27, 0.04);
}

.card-number {
  display: block;
  margin-bottom: 42px;
  font-size: 14px;
  font-weight: 900;
}

.process {
  background: #f7f9f8;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  min-height: 190px;
  padding: 24px;
}

.timeline strong {
  display: block;
  margin-bottom: 14px;
  font-size: 20px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 82px);
  padding: clamp(78px, 9vw, 132px) clamp(20px, 5vw, 72px);
  color: var(--white);
  background: var(--steel);
}

.contact-copy p {
  max-width: 620px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.74);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 32px);
  color: var(--ink);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(31, 109, 85, 0.18);
  border-color: var(--green);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
  padding: 26px clamp(20px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.76);
  background: #101a17;
}

.site-footer strong {
  color: var(--white);
}

.admin-open {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.inline-admin-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.inline-admin-toolbar span {
  color: var(--muted);
  font-size: 14px;
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 17, 14, 0.64);
}

.admin-panel .admin-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  margin: 12vh auto 0;
}

.admin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-size: 24px;
  cursor: pointer;
}

.admin-login-form {
  display: grid;
  gap: 16px;
}

.is-editing [contenteditable="true"] {
  border-radius: 6px;
  outline: 2px dashed rgba(31, 109, 85, 0.32);
  outline-offset: 5px;
  cursor: text;
}

.is-editing [data-image],
.is-editing [data-project-image] {
  outline: 3px solid rgba(200, 137, 45, 0.62);
  outline-offset: -3px;
  cursor: pointer;
}

.inline-card-tools {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.is-editing .inline-card-tools {
  display: flex;
}

.mini-edit-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mini-edit-button.danger {
  color: #9b2c2c;
}

.equipment-list .mini-edit-button {
  display: none;
}

.is-editing .equipment-list .mini-edit-button {
  display: inline-flex;
}

.admin-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef3f1 0%, #ffffff 100%);
}

.admin-shell {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.admin-brand {
  margin-bottom: 24px;
  color: var(--ink);
}

.admin-dialog {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-login,
.admin-editor {
  display: grid;
  gap: 18px;
}

.admin-login form {
  display: grid;
  gap: 16px;
}

.admin-note {
  color: var(--muted);
}

.editor-head,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.editor-head h1,
.admin-login h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
}

.editor-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.editor-section {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.editor-section h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 22px;
}

.editor-section.wide,
.editor-form label.wide {
  grid-column: 1 / -1;
}

.editor-form label,
.manager-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.image-field {
  display: grid;
  gap: 10px;
}

.image-field input[type="file"] {
  padding: 10px;
  background: var(--paper);
}

.image-field small {
  color: var(--muted);
  font-weight: 500;
}

.manager-head,
.manager-item-head,
.manager-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.manager-head {
  grid-column: 1 / -1;
}

.manager-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
}

.manager-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manager-item-head,
.manager-item label.wide {
  grid-column: 1 / -1;
}

.manager-row input {
  flex: 1;
}

.editor-actions {
  padding-top: 8px;
}

@media (max-width: 1080px) {
  .nav {
    gap: 14px;
    font-size: 14px;
  }

  .service-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .split,
  .contact,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .equipment .section-media {
    order: -1;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    display: none;
    width: 100%;
    padding: 12px 18px 18px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 12px 28px rgba(19, 32, 27, 0.12);
  }

  .nav.is-open {
    display: grid;
    gap: 10px;
  }

  .nav a {
    padding: 10px 0;
  }

  .hero {
    min-height: 86vh;
    padding: 104px 20px 72px;
  }

  .hero-overlay {
    background: rgba(12, 23, 20, 0.72);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .service-grid,
  .timeline,
  .editor-form,
  .editor-section,
  .manager-item {
    grid-template-columns: 1fr;
  }

  .manager-row,
  .manager-head,
  .manager-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .service-card,
  .timeline li {
    min-height: auto;
  }

  .card-number {
    margin-bottom: 34px;
  }

  .stats div {
    grid-template-columns: 50px 1fr;
  }
}
