:root {
  --ink: #17201d;
  --muted: #5f6b66;
  --paper: #f8fbf9;
  --surface: #ffffff;
  --line: #dfe7e2;
  --teal: #0f8b8d;
  --teal-deep: #075e62;
  --coral: #ef6f5e;
  --yellow: #f3bd43;
  --blue: #4267ac;
  --shadow: 0 18px 50px rgba(23, 32, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 6vw;
  background: rgba(248, 251, 249, 0.84);
  border-bottom: 1px solid rgba(223, 231, 226, 0.82);
  backdrop-filter: blur(18px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.nav a:hover {
  color: var(--teal-deep);
}

.auth-link,
.user-chip {
  min-height: 40px;
  border: 1px solid rgba(7, 94, 98, 0.22);
  border-radius: 8px;
  background: white;
  color: var(--teal-deep);
  cursor: pointer;
  font-weight: 900;
}

.auth-link {
  padding: 8px 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
}

.user-avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-deep);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 112px 6vw 80px;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 249, 0.98) 0%, rgba(248, 251, 249, 0.88) 34%, rgba(248, 251, 249, 0.28) 72%),
    linear-gradient(180deg, rgba(248, 251, 249, 0.28), rgba(248, 251, 249, 0.06));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-line {
  max-width: 620px;
  margin-bottom: 28px;
  color: #33413c;
  font-size: 20px;
}

.hero-actions,
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--teal-deep);
  color: white;
  box-shadow: 0 12px 24px rgba(7, 94, 98, 0.22);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(7, 94, 98, 0.22);
  color: var(--teal-deep);
}

.wide {
  width: 100%;
}

.hero-facts {
  margin: 42px 0 0;
}

.hero-facts div {
  min-width: 132px;
  padding-top: 16px;
  border-top: 3px solid var(--coral);
}

.hero-facts dt {
  font-size: 26px;
  font-weight: 900;
}

.hero-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 88px 6vw;
}

.section-head {
  width: min(760px, 100%);
  margin-bottom: 34px;
}

.section-head p:not(.eyebrow),
.brief-copy p,
.promise-copy p {
  color: var(--muted);
  font-size: 17px;
}

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

.service-card {
  min-height: 230px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(23, 32, 29, 0.06);
}

.service-card p {
  color: var(--muted);
}

.card-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 8px;
  background: #eaf7f4;
  color: var(--teal-deep);
  font-weight: 900;
}

.service-card:nth-child(2) .card-icon,
.service-card:nth-child(5) .card-icon {
  background: #fff0eb;
  color: #b54839;
}

.service-card:nth-child(3) .card-icon,
.service-card:nth-child(6) .card-icon {
  background: #fff7db;
  color: #8b6412;
}

.promise {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  background: #10201e;
  color: white;
}

.promise .eyebrow {
  color: var(--yellow);
}

.promise-copy p {
  color: rgba(255, 255, 255, 0.74);
}

.promise-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.promise-list div {
  min-height: 150px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.07);
}

.promise-list strong,
.promise-list span {
  display: block;
}

.promise-list strong {
  margin-bottom: 10px;
  font-size: 19px;
}

.promise-list span {
  color: rgba(255, 255, 255, 0.72);
}

.process {
  background: #f0f6f3;
}

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

.steps li {
  min-height: 240px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.steps p {
  color: var(--muted);
}

.deliverables {
  background:
    linear-gradient(135deg, rgba(239, 111, 94, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(66, 103, 172, 0.1), transparent 40%),
    var(--paper);
}

.deliverable-board {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 34px;
  align-items: start;
}

.compact {
  margin-bottom: 0;
}

.deliverable-grid {
  display: grid;
  gap: 14px;
}

.deliverable-grid article {
  padding: 24px;
  background: white;
  border-left: 5px solid var(--coral);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(23, 32, 29, 0.07);
}

.deliverable-grid article:nth-child(2) {
  border-left-color: var(--teal);
}

.deliverable-grid article:nth-child(3) {
  border-left-color: var(--yellow);
}

.deliverable-grid p {
  color: var(--muted);
}

.brief-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 0.9fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
  background: white;
}

.brief-form,
.brief-output {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

label {
  display: grid;
  gap: 8px;
  color: #33413c;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9d4;
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

.brief-output pre {
  min-height: 276px;
  max-height: 360px;
  overflow: auto;
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 8px;
  background: #10201e;
  color: #edf7f3;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
}

.copy-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.auth-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 32, 30, 0.46);
  backdrop-filter: blur(14px);
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid rgba(223, 231, 226, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 139, 141, 0.08), transparent 34%),
    white;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.auth-copy {
  padding-right: 38px;
}

.auth-copy p:not(.eyebrow) {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0;
  padding: 6px;
  border-radius: 8px;
  background: var(--paper);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.auth-tabs button.is-active {
  background: white;
  color: var(--teal-deep);
  box-shadow: 0 8px 22px rgba(23, 32, 29, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 800;
}

.btn .loading-dot {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.82;
}

.btn.is-loading .loading-dot {
  display: inline-block;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
  background: #eef5f2;
  border-top: 1px solid var(--line);
}

.admin-sidebar {
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: #10201e;
  color: white;
}

.admin-sidebar h2 {
  margin: 18px 0 4px;
  font-size: 24px;
}

.admin-sidebar p {
  color: rgba(255, 255, 255, 0.68);
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}

.admin-nav a {
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.admin-nav a.is-active,
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.admin-main {
  min-width: 0;
  padding: 34px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-topbar h2 {
  margin-bottom: 0;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-metrics article,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 30px rgba(23, 32, 29, 0.06);
}

.admin-metrics article {
  padding: 20px;
}

.admin-metrics span,
.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.admin-grid.lower {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
}

.admin-panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin-bottom: 0;
}

.project-list,
.user-table,
.profile-list {
  display: grid;
  gap: 10px;
}

.project-row,
.user-row,
.profile-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.project-row strong,
.user-row strong {
  display: block;
  margin-bottom: 4px;
}

.project-row span,
.user-row span,
.profile-list dd {
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf7f4;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

.quick-actions button,
.reset-form button {
  min-height: 42px;
  border: 1px solid rgba(7, 94, 98, 0.18);
  border-radius: 8px;
  background: var(--paper);
  color: var(--teal-deep);
  cursor: pointer;
  font-weight: 900;
}

.reset-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 8px;
}

.reset-form input {
  padding: 9px 10px;
}

.profile-list {
  margin: 0;
}

.profile-list dt {
  color: var(--ink);
  font-weight: 900;
}

.profile-list dd {
  margin: 0;
  text-align: right;
  word-break: break-word;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 6vw;
  background: #10201e;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }

  .service-grid,
  .steps,
  .brief-section,
  .admin-metrics,
  .admin-grid,
  .admin-grid.lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brief-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    padding: 12px 18px;
  }

  .brand {
    font-size: 14px;
  }

  .nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .auth-link {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .user-chip {
    max-width: 148px;
    padding-right: 9px;
  }

  .user-chip span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .hero-image {
    object-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(248, 251, 249, 0.98) 0%, rgba(248, 251, 249, 0.9) 48%, rgba(248, 251, 249, 0.36) 100%),
      linear-gradient(90deg, rgba(248, 251, 249, 0.94), rgba(248, 251, 249, 0.16));
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-line {
    font-size: 18px;
  }

  .section {
    padding: 64px 20px;
  }

  .service-grid,
  .promise,
  .promise-list,
  .steps,
  .deliverable-board,
  .brief-section,
  .admin-shell,
  .admin-metrics,
  .admin-grid,
  .admin-grid.lower {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 24px 20px;
  }

  .admin-main {
    padding: 24px 20px;
  }

  .admin-topbar,
  .panel-head,
  .project-row,
  .user-row,
  .profile-list div,
  .reset-form {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    display: grid;
  }

  .profile-list dd {
    text-align: left;
  }

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

  .site-footer {
    display: block;
    padding: 24px 20px;
  }

  .site-footer p + p {
    margin-top: 6px;
  }
}
