/* ==========================================================================
   Craft9 AI — craft9ai.com v2
   Structure/rhythm adapted from a reference landing page (see STRUCTURE.md).
   Palette is OUR brand only — no reference-site colours ship here.
   ========================================================================== */

:root {
  /* brand palette (from the Craft9 tangram mark) */
  --primary: #1f299b;
  --primary-dark: #16205a;
  --primary-soft: #eef0ff;
  --primary-foreground: #ffffff;
  --primary-foreground-muted: #dce0fb;

  --accent-sky: #0373ff;
  --accent-sky-deep: #0257c4;
  --accent-cyan: #30d1ff;
  --accent-orange: #f05928;
  --accent-green: #089146;
  --accent-green-deep: #057c47;

  --background: #ffffff;
  --foreground: #16202a;
  --muted-foreground: #4a5a68;
  --subtle-foreground: #5e6f7c;
  --surface-muted: #f5f7f9;
  --surface-subtle: #eef3f6;
  --border: #e3e8ec;
  --input: #e3e8ec;
  --ring: #1f299b;
  --destructive: #e2261f;

  /* radius + shadow */
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: 1rem;
  --shadow-card: 0 0.6px 2.5px -1.2px #16202a2b, 0 2.3px 9.6px -2.3px #16202a26,
    0 10px 42px -3.5px #16202a14;
  --shadow-inset-highlight: 0 0 0 1px #ffffff8c inset;

  /* type */
  --font-sans: "Kanit", "Castoro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif-latin: "Castoro", Georgia, serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* rhythm */
  --container: 80rem;
  --section-y: 5rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* colour proportion (approved): 60 canvas : 25 brand-neutral : 10 primary : 5 accent */
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.section {
  border-top: 1px solid var(--border);
  padding-block: var(--section-y);
}

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

.section--tight {
  padding-block: 2.5rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffffcc;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
}

.brand-text {
  font-size: 1.05rem;
  font-family: var(--font-serif-latin);
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  margin-inline-start: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted-foreground);
}

.nav a {
  transition: color 0.15s var(--ease);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-inline-start: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.5rem;
  color: var(--foreground);
  cursor: pointer;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  padding: 0.5rem 1.25rem;
  min-height: 36px;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.btn--primary {
  background: var(--accent-orange);
  color: var(--foreground);
  border-color: var(--accent-orange);
}

.btn--primary:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  box-shadow: 0 6px 18px -6px #f0592899;
}

.btn--outline {
  background: var(--background);
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  color: var(--foreground);
  border-color: var(--foreground);
}

.btn--ghost {
  background: var(--surface-subtle);
  color: var(--foreground);
}

.btn--ghost:hover {
  background: var(--border);
}

.btn--lg {
  min-height: 44px;
  font-size: var(--text-sm);
  padding-inline: 1.5rem;
}

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

/* ---------- badges / chips ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  background: #ffffffb3;
  padding: 0.375rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary);
  backdrop-filter: blur(6px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  padding: 0.4rem 0.85rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.chip__state {
  font-size: 0.7rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-top: 0;
  background:
    radial-gradient(900px 480px at 82% -10%, #dbe6ff 0%, transparent 62%),
    radial-gradient(700px 420px at 12% 8%, #e8f7ff 0%, transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #ffffff 78%);
  padding-block: 3.5rem 4.5rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__copy {
  max-width: 34rem;
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
}

.hero__lead {
  margin-top: 1.25rem;
  font-size: var(--text-lg);
  color: var(--foreground);
}

.hero__tagline {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.tab {
  border: 1px solid var(--border);
  background: #ffffffcc;
  border-radius: 999px;
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.tab[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* ---------- chat mockup (built in HTML, no reference assets) ---------- */

.chat-card {
  position: relative;
  max-width: 30rem;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.chat-card__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
}

.chat-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.chat-card__id {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.chat-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.chat-card__status {
  font-size: 0.7rem;
  color: var(--primary-foreground-muted);
}

.chat-card__tags {
  display: flex;
  gap: 0.375rem;
  padding: 0.75rem 1rem 0;
}

.chat-card__tag {
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--subtle-foreground);
}

.chat-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.875rem 1rem 1rem;
}

.bubble {
  max-width: 82%;
  padding: 0.55rem 0.8rem;
  border-radius: 0.875rem;
  font-size: var(--text-sm);
  line-height: 1.45;
  box-shadow: 0 1px 1px #16202a14;
}

.bubble--in {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.25rem;
}

.bubble--out {
  align-self: flex-end;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-bottom-right-radius: 0.25rem;
}

.bubble__meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--subtle-foreground);
}

.chat-card__input {
  margin: 0 1rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.5rem 0.9rem;
  font-size: var(--text-xs);
  color: var(--subtle-foreground);
}

/* ---------- generic section header ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.section-head__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
}

.section-head p {
  margin-top: 0.75rem;
  max-width: 42rem;
  color: var(--muted-foreground);
  font-size: var(--text-base);
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.link-arrow:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2.5rem;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-muted);
  padding: 1.5rem;
}

.stat__value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat__label {
  margin-top: 0.35rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

/* ---------- logo strip (placeholders only) ---------- */

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.25rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.logo-strip__item {
  height: 26px;
  min-width: 96px;
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(
    135deg,
    var(--surface-subtle),
    var(--surface-subtle) 6px,
    #e5ebf0 6px,
    #e5ebf0 12px
  );
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--subtle-foreground);
  letter-spacing: 0.04em;
}

/* ---------- cards ---------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.6px 2.5px -1.2px #16202a2b, 0 8px 20px -6px #16202a26,
    0 18px 48px -8px #16202a1f;
}

.card h3 {
  font-size: var(--text-xl);
}

.card > p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

.card--flat {
  box-shadow: none;
  background: var(--surface-muted);
}

.card--flat:hover {
  transform: none;
  box-shadow: none;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

/* feature list with tick */

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-sm);
  color: var(--foreground);
}

.feature-list svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent-green);
}

/* ---------- products (2x2) ---------- */

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.product:hover {
  transform: translateY(-3px);
}

.product h3 {
  font-size: var(--text-xl);
}

.product > div > p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

.product__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
}

.product__links a {
  color: var(--primary);
  font-weight: 600;
}

.product__links a:hover {
  text-decoration: underline;
}

/* product visuals — CSS-only product UI, no image assets */

.visual {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfdff, var(--surface-muted));
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 168px;
  justify-content: center;
}

.visual__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.6rem;
  font-size: 0.7rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
}

.visual__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-green);
  flex-shrink: 0;
}

.visual__dot--sky {
  background: var(--accent-sky);
}

.visual__dot--orange {
  background: var(--accent-orange);
}

.visual__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  flex: 0 0 auto;
  width: 34%;
  margin-inline-start: auto;
}

.visual__bar--60 {
  width: 44%;
}

.visual__bar--40 {
  width: 28%;
}

.visual__bar--80 {
  width: 52%;
  background: var(--primary-soft);
}

.visual__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  padding: 0.5rem 0.25rem 0;
}

.visual__chart span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--primary) 22%, #fff);
}

.visual__chart span:nth-child(3n) {
  background: var(--primary);
}

.visual__pill {
  align-self: flex-start;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
}

/* ---------- industries ---------- */

.industries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.industry {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 124px;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 100%);
  transition: transform 0.3s var(--ease);
}

.industry:nth-child(2n) {
  background: linear-gradient(140deg, #2160c4 0%, var(--primary) 100%);
}

.industry:nth-child(3n) {
  background: linear-gradient(140deg, #2b7fd4 0%, #17407d 100%);
}

.industry:nth-child(4n) {
  background: linear-gradient(140deg, #1a8f9e 0%, #0d5a63 100%);
}

.industry:hover {
  transform: translateY(-3px);
}

.industry::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #ffffff1f;
}

.industry span {
  position: relative;
}

.industry small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: #ffffffcc;
}

/* ---------- platform trio ---------- */

.trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.trio .card {
  padding: 0;
  overflow: hidden;
}

.trio .visual {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  min-height: 190px;
}

.trio__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.trio__body h3 {
  font-size: var(--text-lg);
}

.trio__body p {
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

/* ---------- pricing ---------- */

.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.plan {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.3s var(--ease);
}

.plan:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.plan--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}

.plan__flag {
  position: absolute;
  top: -0.7rem;
  right: 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
}

.plan h3 {
  font-size: var(--text-lg);
}

.plan__desc {
  margin-top: 0.4rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  min-height: 2.6rem;
  text-wrap: balance;
}

.plan__rows {
  margin-block: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: var(--text-sm);
}

.plan__rows li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--border);
}

.plan__rows li span:first-child {
  color: var(--muted-foreground);
}

.plan__rows li span:last-child {
  font-weight: 600;
  text-align: right;
}

.plan .btn {
  margin-top: auto;
}

.pricing__note {
  margin-top: 1.25rem;
  font-size: var(--text-xs);
  color: var(--subtle-foreground);
}

/* ---------- proof placeholders ---------- */

.proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.proof-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
}

.proof-card__thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: var(--subtle-foreground);
  background: repeating-linear-gradient(
    135deg,
    var(--surface-subtle),
    var(--surface-subtle) 10px,
    #e7edf1 10px,
    #e7edf1 20px
  );
}

.proof-card__meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
}

.proof-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-subtle);
  flex-shrink: 0;
}

.proof-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.proof-card__role {
  font-size: 0.7rem;
  color: var(--subtle-foreground);
}

/* ---------- final CTA ---------- */

.cta {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-subtle) 100%);
  border-top: 1px solid var(--border);
  padding-block: 4.5rem;
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
}

.cta p {
  margin-top: 0.9rem;
  color: var(--muted-foreground);
  max-width: 40rem;
  margin-inline: auto;
}

.cta__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  font-size: var(--text-sm);
  color: var(--foreground);
}

.cta__points li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cta__points svg {
  width: 15px;
  height: 15px;
  color: var(--accent-green);
}

.cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--background);
  border-top: 1px solid var(--border);
  padding-block: 3rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  max-width: 22rem;
}

.footer-motto {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.75rem;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.footer-col a:hover {
  color: var(--foreground);
  text-decoration: underline;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--subtle-foreground);
}

/* ---------- placeholder marker (visible only in DOM, not as clutter) ---------- */

[data-placeholder] {
  position: relative;
}

/* ---------- responsive ---------- */

@media (min-width: 640px) {
  .wrap {
    padding-inline: 1.5rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1.2fr 2fr;
  }
}

@media (min-width: 1024px) {
  .wrap {
    padding-inline: 2rem;
  }

  .hero {
    padding-block: 4rem 5rem;
  }

  .hero__grid {
    grid-template-columns: 38% 1fr;
    gap: 2rem;
  }

  .hero__copy {
    max-width: none;
  }

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

  .product {
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
  }

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

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

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

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

  .footer-grid {
    grid-template-columns: 1.1fr 2.4fr;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav[data-open="true"] {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }

  .header-actions .btn--ghost {
    display: none;
  }
}

@media (max-width: 639px) {
  .hero {
    text-align: center;
  }

  .hero__copy {
    margin-inline: auto;
  }

  .hero__cta,
  .hero__tabs {
    justify-content: center;
  }

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

  .header-actions .btn--outline {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .card:hover,
  .product:hover,
  .plan:hover,
  .industry:hover {
    transform: none;
  }
}

/* ---------- mascots (Tangram figures, home page only) ---------- */
.hero__mascot {
  display: block;
  width: 132px;
  height: auto;
  margin-top: 1.5rem;
}
.cta__mascot {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 1.25rem;
}

/* ---------- legal pages (privacy & terms) ---------- */
.legal-main {
  padding-block: 3.5rem 5rem;
  background: var(--background);
}

.legal-container {
  max-width: 52rem;
  margin-inline: auto;
}

.legal-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.legal-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.legal-content section {
  margin-bottom: 2.25rem;
}

.legal-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--foreground);
  margin-top: 2rem;
  margin-bottom: 0.875rem;
}

.legal-content h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--foreground);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  font-size: var(--text-base);
  color: var(--muted-foreground);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--muted-foreground);
  line-height: 1.75;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content strong {
  color: var(--foreground);
}

.legal-callout {
  background: var(--surface-subtle);
  border-left: 3px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-block: 1.5rem;
}

.legal-callout p {
  margin-bottom: 0;
}


/* plan: Coming Soon */
.plan__soon {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  background: var(--muted, #eef0f3);
  padding: 0.2rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted-foreground, #5b6472);
}
.plan .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.plan--soon {
  opacity: .6;
}

.plan__figure {
  display: block;
  width: 110px;
  height: 110px;
  margin: auto;
  object-fit: contain;
}

/* hero chat: scrolling conversation window (20s loop, content moves up) */
.chat-card__window {
  height: 24rem;
  overflow: hidden;
  position: relative;
}
.chat-card__track {
  animation: chat-scroll-up 20s linear infinite;
}
.chat-card__group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.875rem 1rem 1rem;
}
@keyframes chat-scroll-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.bubble--in {
  position: relative;
  padding-right: 2.6rem;
}
.bubble__logo {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 22px;
  height: 22px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) {
  .chat-card__track { animation: none; }
  .chat-card__window { overflow: auto; }
}
