:root {
  --ink: #171916;
  --muted: #61665e;
  --line: #dce2d8;
  --paper: #f7f8f3;
  --white: #ffffff;
  --moss: #486b50;
  --leaf: #6f9b72;
  --copper: #a96f43;
  --sky: #537f9e;
  --rose: #9a5c68;
  --shadow: 0 22px 70px rgba(23, 25, 22, 0.16);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(247, 248, 243, 0.88);
  border-bottom: 1px solid rgba(220, 226, 216, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.profile-controls {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-logo-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--moss);
  border-radius: 50%;
  font-size: 18px;
}

.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--moss);
}

.nav-action {
  justify-self: end;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 720;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 25, 22, 0.13);
  border-radius: 999px;
}

.language-option {
  min-width: 40px;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.language-option.active {
  color: var(--white);
  background: var(--ink);
}

.hero-section {
  position: relative;
  display: grid;
  min-height: 84vh;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: 32px;
  overflow: hidden;
  padding: 96px clamp(20px, 5vw, 64px) 56px;
}

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

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(247, 248, 243, 0.98) 0%, rgba(247, 248, 243, 0.84) 34%, rgba(247, 248, 243, 0.24) 100%),
    linear-gradient(0deg, rgba(247, 248, 243, 1) 0%, rgba(247, 248, 243, 0) 22%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 760px;
  padding-bottom: 32px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(64px, 12vw, 152px);
  line-height: 0.85;
  letter-spacing: 0;
  font-weight: 780;
}

.hero-lede {
  max-width: 660px;
  margin: 30px 0 0;
  color: #2d322c;
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.15;
  font-weight: 570;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
}

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

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(23, 25, 22, 0.13);
}

.button.full {
  width: 100%;
}

.hero-panel {
  align-self: end;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.panel-row:last-child {
  border-bottom: 0;
}

.panel-row span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 760;
}

.panel-row p {
  margin: 4px 0 0;
  color: #30362e;
  line-height: 1.35;
  font-weight: 630;
}

section {
  padding: 84px clamp(20px, 5vw, 64px);
}

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

.section-heading.wide {
  max-width: 980px;
}

.section-heading h2,
.upload-copy h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-heading p,
.upload-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
}

.trust-band {
  background: var(--white);
}

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

.trust-grid article,
.config-card,
.upload-card,
.social-card,
.flavor-card,
.variable-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-grid article {
  padding: 24px;
}

.trust-grid h3,
.config-card h3,
.steps-list h3,
.flavor-card h3 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.1;
}

.trust-grid p,
.flavor-card p,
.steps-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.icon-shape {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--moss);
  position: relative;
}

.icon-shape::after {
  position: absolute;
  content: "";
  inset: 13px;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.icon-shape.ledger {
  background: var(--copper);
}

.icon-shape.route {
  background: var(--sky);
}

.agents-section {
  background: linear-gradient(180deg, #f7f8f3 0%, #eef3ea 100%);
}

.profile-controls {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.profile-tab {
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
}

.profile-tab.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.profile-stage {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.social-card {
  position: sticky;
  top: 86px;
  padding: 22px;
  box-shadow: 0 16px 54px rgba(72, 107, 80, 0.14);
}

.profile-topline {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
}

.signal-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 4px, transparent 4px 10px),
    var(--moss);
  color: var(--white);
  font-size: 32px;
  font-weight: 790;
}

.profile-topline h3 {
  margin: 0;
  font-size: 31px;
}

.profile-topline p,
.profile-bio {
  margin: 4px 0 0;
  color: var(--muted);
}

.profile-bio {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.5;
}

.profile-stats {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.profile-stats div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbf8;
}

.profile-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 4px 0 0;
  font-weight: 720;
}

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

.flavor-card {
  min-height: 300px;
  padding: 20px;
  border-top: 5px solid var(--moss);
}

.flavor-card[data-tone="firm"] {
  border-top-color: var(--copper);
}

.flavor-card[data-tone="formal"] {
  border-top-color: var(--rose);
}

.flavor-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.flavor-card li {
  padding-left: 16px;
  color: #343934;
  line-height: 1.42;
  position: relative;
}

.flavor-card li::before {
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--leaf);
  border-radius: 50%;
}

.config-section {
  background: var(--white);
}

.config-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 20px;
}

.config-card {
  padding: 24px;
}

.config-lines {
  display: grid;
  gap: 10px;
}

.config-lines div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.config-lines div:last-child {
  border-bottom: 0;
}

.config-lines span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.config-lines strong {
  font-size: 17px;
}

.variable-table-wrap {
  overflow: hidden;
}

.variable-table {
  width: 100%;
  border-collapse: collapse;
}

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

.variable-table th {
  background: #f2f5ee;
  font-size: 13px;
  text-transform: uppercase;
}

.variable-table td:first-child {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  color: var(--moss);
  font-weight: 760;
}

.upload-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1fr);
  gap: 36px;
  align-items: center;
  background: #1f251f;
  color: var(--white);
}

.upload-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.upload-copy .button {
  margin-top: 28px;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.upload-actions .button {
  margin-top: 0;
}

.button.ghost {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.upload-card {
  padding: 20px;
  background: #f7f8f3;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.drop-zone {
  display: grid;
  min-height: 190px;
  place-items: center;
  gap: 10px;
  padding: 24px;
  border: 1.5px dashed #9caa98;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
}

.drop-zone strong {
  font-size: 22px;
}

.drop-zone small {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.45;
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--moss), var(--sky));
  position: relative;
}

.upload-icon::before,
.upload-icon::after {
  position: absolute;
  content: "";
  background: var(--white);
}

.upload-icon::before {
  width: 3px;
  height: 20px;
  left: 21px;
  top: 12px;
}

.upload-icon::after {
  width: 13px;
  height: 13px;
  left: 15px;
  top: 11px;
  transform: rotate(45deg);
  background: transparent;
  border-left: 3px solid var(--white);
  border-top: 3px solid var(--white);
}

#fileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.preview-panel {
  min-height: 124px;
  margin: 14px 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.preview-panel p {
  margin: 0;
  color: var(--muted);
}

.preview-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.preview-panel th,
.preview-panel td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.onboarding-section {
  background: var(--paper);
}

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

.steps-list li {
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.steps-list span {
  display: block;
  color: var(--moss);
  font-size: 13px;
  font-weight: 820;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 36px clamp(20px, 5vw, 64px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

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

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

.brand-page {
  background: #f7f4ea;
}

.brand-hero {
  display: grid;
  min-height: 72vh;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1fr);
  gap: 42px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(247, 244, 234, 1), rgba(247, 244, 234, 0.9)),
    #f7f4ea;
}

.brand-kicker {
  margin: 0 0 18px;
  color: var(--moss);
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-hero p:not(.brand-kicker) {
  max-width: 720px;
  margin: 22px 0 0;
  color: #4c5a50;
  font-size: 21px;
  line-height: 1.45;
}

.brand-hero-logo {
  display: grid;
  min-height: 360px;
  align-items: center;
  padding: 32px;
  background: var(--white);
  border: 1px solid #e4dfd1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-hero-logo img {
  width: 100%;
}

.brand-board {
  background: var(--white);
}

.brand-board:nth-of-type(3) {
  background: #f2f5ee;
}

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

.brand-logo-card {
  display: grid;
  min-height: 240px;
  align-content: center;
  gap: 22px;
  padding: 24px;
  background: #f7f4ea;
  border: 1px solid #e4dfd1;
  border-radius: var(--radius);
}

.brand-logo-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-logo-card.dark {
  background: #171916;
  border-color: #171916;
}

.brand-logo-card.dark span {
  color: rgba(255, 255, 255, 0.72);
}

.brand-logo-card.mark-only img {
  width: 132px;
}

.swatch {
  display: grid;
  min-height: 166px;
  align-content: end;
  gap: 8px;
  padding: 20px;
  color: var(--ink);
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.12)),
    var(--swatch);
  border: 1px solid rgba(23, 25, 22, 0.12);
  border-radius: var(--radius);
}

.swatch span {
  font-size: 20px;
  font-weight: 820;
}

.swatch code {
  color: #2d322c;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
}

.email-preview {
  max-width: 760px;
  padding: 28px;
  background: #171916;
  border-radius: var(--radius);
}

.email-shell {
  padding: 34px;
  background: #f7f4ea;
  border-radius: var(--radius);
}

.email-shell img {
  width: min(280px, 100%);
}

.email-shell h3 {
  margin: 32px 0 0;
  font-size: 31px;
  line-height: 1.08;
}

.email-shell p {
  margin: 14px 0 0;
  color: #4c5a50;
  font-size: 17px;
  line-height: 1.45;
}

.email-shell dl {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.email-shell dl div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #ded8c8;
}

.email-shell dt {
  color: #6d756b;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.email-shell dd {
  margin: 0;
  font-weight: 720;
}

.email-shell a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: var(--white);
  background: var(--moss);
  border-radius: 999px;
  font-weight: 780;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .nav-links {
    display: none;
  }

  .hero-section,
  .brand-hero,
  .profile-stage,
  .config-layout,
  .upload-section {
    grid-template-columns: 1fr;
  }

  .trust-grid,
  .brand-logo-grid,
  .palette-grid,
  .flavor-board,
  .steps-list {
    grid-template-columns: 1fr 1fr;
  }

  .social-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
    gap: 10px;
  }

  .nav-action {
    display: none;
  }

  .hero-section {
    min-height: 88vh;
    padding: 84px 20px 40px;
  }

  .hero-content {
    padding-bottom: 0;
  }

  .hero-panel {
    margin-top: 18px;
  }

  section {
    padding: 58px 20px;
  }

  .trust-grid,
  .brand-logo-grid,
  .palette-grid,
  .flavor-board,
  .steps-list {
    grid-template-columns: 1fr;
  }

  .profile-topline {
    grid-template-columns: 62px 1fr;
  }

  .signal-avatar {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }

  .variable-table-wrap {
    overflow-x: auto;
  }

  .variable-table {
    min-width: 620px;
  }

  .site-footer {
    display: grid;
  }
}
