:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --ink: #171615;
  --muted: #6c6760;
  --line: rgba(23, 22, 21, 0.14);
  --accent: #d83b2d;
  --accent-2: #176b63;
  --accent-3: #d6ad4f;
  --shadow: 0 24px 80px rgba(28, 24, 20, 0.12);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11110f;
  --surface: #191916;
  --surface-strong: #22211d;
  --ink: #f6f1e8;
  --muted: #b8afa1;
  --line: rgba(246, 241, 232, 0.16);
  --accent: #ff684f;
  --accent-2: #68c4b7;
  --accent-3: #f0c75a;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 107, 99, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(216, 59, 45, 0.055) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.hero {
  min-height: 88vh;
  padding: 22px clamp(18px, 4vw, 64px) 42px;
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

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

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

.brand small,
.eyebrow,
.metric small,
.metric-row small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-actions,
.hero-actions,
.selects,
.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.icon-link,
.icon-button,
.close-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
}

.text-link:hover {
  color: var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.65fr);
  align-items: end;
  gap: clamp(28px, 6vw, 96px);
  max-width: 1440px;
  min-height: calc(88vh - 86px);
  margin: 0 auto;
  padding-top: 48px;
}

.hero-copy h1 {
  max-width: 980px;
  margin: 10px 0 20px;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 22px);
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--bg);
}

.secondary-action {
  background: var(--surface);
  color: var(--ink);
}

.hero-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  font-size: clamp(62px, 9vw, 132px);
  font-weight: 900;
  line-height: 0.9;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.metric-row div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-row strong {
  display: block;
  font-size: 28px;
}

.mini-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mini-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 64px) 72px;
}

.services {
  padding: 52px 0 28px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(320px, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  margin-bottom: 18px;
}

.section-heading h2,
.contact-band h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.contact-band p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.service-card {
  display: flex;
  grid-column: span 2;
  min-height: 330px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.service-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 12px;
}

.service-card h3 {
  margin: 0;
  font-size: clamp(21px, 2vw, 31px);
  line-height: 1.08;
}

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

.service-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.service-script-sample {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.service-script-sample span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.service-script-sample pre {
  min-height: 0;
  max-height: 152px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.service-card .primary-action,
.service-card .secondary-action {
  margin-top: auto;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px 0 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.contact-band .eyebrow,
.contact-band p {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

.contact-band .primary-action {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

.contact-band .secondary-action {
  border-color: color-mix(in srgb, var(--bg) 42%, transparent);
  background: transparent;
  color: var(--bg);
}

.workflow-band {
  padding: 44px 0 30px;
}

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

.workflow-steps li {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workflow-steps span {
  display: block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.workflow-steps strong {
  display: block;
  margin-top: 18px;
  font-size: 22px;
  line-height: 1.12;
}

.workflow-steps p {
  margin: 10px 0 0;
  color: var(--muted);
}

.voice-script-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(360px, 1fr);
  gap: 14px;
  margin: 18px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 52%),
    var(--surface);
}

.voice-script-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.04;
}

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

.voice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.voice-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  color: var(--accent-2);
  font-size: 13px;
}

.voice-script-sample {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-script-sample pre {
  min-height: 320px;
}

.voice-tool-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.72fr) minmax(180px, 0.42fr);
  gap: 14px;
  align-items: stretch;
  margin: 18px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%),
    var(--surface);
}

.voice-tool-card h3 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.04;
}

.voice-tool-card p:not(.eyebrow) {
  color: var(--muted);
}

.tool-command {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-command pre {
  min-height: 150px;
}

.tool-voices {
  display: grid;
  gap: 8px;
}

.tool-voices span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  color: var(--accent-2);
  font-size: 14px;
}

.contact-actions {
  display: flex;
  gap: 10px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

select {
  min-height: 48px;
  max-width: 190px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 24px;
}

.tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffdfa;
}

.gallery {
  column-count: 4;
  column-gap: 16px;
}

.card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: var(--shadow);
}

.card img {
  display: block;
  width: 100%;
  min-height: 180px;
  object-fit: cover;
  background: var(--surface-strong);
}

.card-body {
  padding: 14px;
}

.card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-2);
  font-size: 12px;
}

.card h3 {
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.detail-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
}

.planner-dialog {
  width: min(1320px, calc(100vw - 28px));
  max-height: min(880px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid rgba(246, 241, 232, 0.18);
  border-radius: 8px;
  background: #0f1117;
  color: #f6f1e8;
  box-shadow: var(--shadow);
}

.planner-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.planner {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.planner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.planner-header h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.planner-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 520px;
  padding: 16px;
  border: 1px solid rgba(246, 241, 232, 0.18);
  border-radius: 8px;
  background: #11141b;
}

.planner-panel h3 {
  margin: 0;
  font-size: 16px;
}

.planner-panel label,
.planner-panel fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
  color: rgba(246, 241, 232, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.planner-panel legend {
  padding: 0;
  margin-bottom: 8px;
}

.planner-panel input[type="text"],
.planner-panel textarea,
.planner-panel select {
  width: 100%;
  max-width: none;
  border: 1px solid rgba(246, 241, 232, 0.12);
  border-radius: 8px;
  background: #252630;
  color: #f6f1e8;
}

.planner-panel input[type="text"],
.planner-panel select {
  min-height: 44px;
  padding: 0 12px;
}

.planner-panel textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
}

.topic-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.topic-options label,
.check-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(246, 241, 232, 0.12);
  border-radius: 8px;
  background: #191c24;
}

.planner-preview {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(246, 241, 232, 0.12);
  border-radius: 8px;
  background: #191c24;
}

.planner-preview span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.planner-preview p {
  margin: 0;
  color: rgba(246, 241, 232, 0.72);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

.planner-status p.is-error {
  color: #fecdd3;
}

.planner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.planner-actions .secondary-action {
  border-color: rgba(246, 241, 232, 0.24);
  background: transparent;
  color: #f6f1e8;
}

.planner-actions .primary-action {
  border-color: #f6f1e8;
  background: #f6f1e8;
  color: #0f1117;
}

.planner-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1fr);
  min-height: 520px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 26px;
}

.detail-media {
  min-height: 520px;
  background: #0f0f0e;
}

.detail-media img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 32px);
  object-fit: contain;
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  overflow: auto;
}

.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1;
}

.detail-meta a {
  color: var(--accent-2);
  text-decoration: none;
}

pre {
  flex: 1;
  min-height: 220px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  transform: translateY(18px);
  opacity: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

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

.floating-contact-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-weight: 800;
  cursor: pointer;
}

.contact-window {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 26;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.contact-window.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.contact-window-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(216, 59, 45, 0.16), rgba(23, 107, 99, 0.14)),
    var(--surface-strong);
}

.contact-window-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.window-close-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

.contact-window-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.contact-window-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.contact-window-form textarea,
.contact-window-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-strong);
  color: var(--ink);
}

.contact-window-form textarea {
  min-height: 126px;
  resize: vertical;
}

.contact-window-form textarea:focus,
.contact-window-form input:focus {
  border-color: var(--accent-2);
  outline: 3px solid rgba(23, 107, 99, 0.16);
}

.contact-window-form .primary-action {
  width: 100%;
  border: 0;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 780px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .detail {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .contact-band,
  .voice-script-panel,
  .voice-tool-card {
    grid-template-columns: 1fr;
  }

  .planner-grid {
    grid-template-columns: 1fr;
  }

  .planner-panel {
    min-height: auto;
  }

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

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-column: auto;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tool-actions {
    grid-template-columns: 1fr;
  }

  .selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  select {
    max-width: none;
    width: 100%;
  }

  .gallery {
    column-count: 2;
  }

  .detail-media {
    min-height: 320px;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery {
    column-count: 1;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .floating-contact-button {
    right: 14px;
    bottom: 14px;
  }

  .contact-window {
    right: 14px;
    bottom: 76px;
  }

  .planner {
    padding: 14px;
  }

  .topic-options,
  .planner-actions {
    grid-template-columns: 1fr;
  }

  .planner-actions {
    display: grid;
  }
}
