:root {
  color-scheme: light;
  --ink: #182026;
  --muted: #5f6973;
  --line: #d7dde3;
  --paper: #f8fafb;
  --white: #ffffff;
  --navy: #12324a;
  --teal: #0e7c86;
  --red: #a83a32;
  --gold: #b87b22;
  --green: #2f7655;
  --shadow: 0 18px 50px rgba(18, 50, 74, 0.12);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 122px;
}

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

body::selection {
  color: var(--white);
  background: var(--teal);
}

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

button,
input,
select {
  font: inherit;
}

/* Reveal-on-load / reveal-on-scroll animation system */
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease-smooth),
    transform 0.9s var(--ease-smooth),
    filter 0.9s var(--ease-smooth);
  transition-delay: calc(var(--i, 0) * 0.12s);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

[data-reveal="up"] { transform: translateY(42px); }
[data-reveal="down"] { transform: translateY(-28px); }
[data-reveal="left"] { transform: translateX(-48px); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal="scale"] { transform: scale(0.9); }
[data-reveal="pop"] { transform: translateY(18px) scale(0.88); }
[data-reveal="fade"] { transform: none; }
[data-reveal="blur-up"] {
  transform: translateY(30px);
  filter: blur(10px);
  transition-duration: 1.15s;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 251, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  gap: 18px;
}

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

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.brand-logo {
  height: 76px;
  width: auto;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-actions a {
  position: relative;
  padding: 8px 10px;
  color: var(--muted);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.nav-actions a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: #9bd6d8;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-smooth);
}

.nav-actions a:hover::after,
.nav-actions a:focus-visible::after {
  transform: scaleX(1);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  scroll-margin-top: 122px;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 106px);
  overflow: hidden;
  isolation: isolate;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 32, 38, 0.94) 0%, rgba(18, 32, 38, 0.76) 43%, rgba(18, 32, 38, 0.1) 100%),
    linear-gradient(0deg, rgba(18, 32, 38, 0.7) 0%, rgba(18, 32, 38, 0) 38%);
  z-index: -1;
}

.hero-inner {
  display: grid;
  align-content: center;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 106px);
  margin: 0 auto;
  padding: 58px 0 72px;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(40px, 7vw, 76px);
  color: var(--white);
}

.hero-lede {
  max-width: 620px;
  margin: 20px 0 0;
  color: #dce7eb;
  font-size: 19px;
  text-wrap: pretty;
}

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

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

.hero .eyebrow {
  color: #8ee1e2;
}

.hero .button.primary {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.hero .button.secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.52);
  color: var(--white);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 750;
}

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

.button.secondary,
.button.compact {
  color: var(--ink);
  background: var(--white);
}

.button.compact {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.button.full {
  width: 100%;
}

.tool-shell,
.chat-demo,
.voice-demo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.service-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
}

.service-grid h3,
.demo-header h3,
.quote-details h3,
.sow-preview h3 {
  margin: 6px 0 8px;
  line-height: 1.15;
  letter-spacing: 0;
}

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

.service-grid-cta {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.service-grid-cta .button {
  padding: 14px 32px;
  font-size: 16px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(620px, 100%);
  margin-top: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.hero-proof span {
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.hero-proof span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.workflow-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.workflow-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.workflow-inner article {
  padding: 18px 18px 18px 0;
}

.workflow-inner span {
  color: var(--teal);
  font-weight: 850;
}

.workflow-inner h2 {
  margin: 6px 0 8px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.workflow-inner p {
  margin: 0;
  color: var(--muted);
}

.section {
  padding: 56px 0;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

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

.highlight-service {
  border-color: rgba(14, 124, 134, 0.45) !important;
  background: #f0fbfb !important;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  align-items: start;
  overflow: hidden;
}

.intake-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  font-weight: 850;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.field-wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #bbc5ce;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--white);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 124, 134, 0.25);
  outline-offset: 2px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-form .button.full {
  grid-column: 1 / -1;
}

textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #bbc5ce;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--white);
  resize: vertical;
}

.contact-method {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-method legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #bbc5ce;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.radio-option input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--teal);
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  min-height: 1.2em;
}

.quote-output {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.quote-card {
  padding: 18px;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
}

.quote-card strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.quote-card span {
  display: block;
  margin-top: 8px;
  color: #d9e9ef;
}

.quote-card .eyebrow {
  color: #9dd5d8;
}

.quote-details,
.sow-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-details ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.preview-header,
.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-header span {
  color: var(--muted);
  font-size: 13px;
}

pre {
  max-height: 390px;
  margin: 12px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #26323a;
  background: #f4f6f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
}

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

.chat-demo,
.voice-demo {
  padding: 18px;
}

.chat-window {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  max-height: 310px;
  margin: 14px 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.prompt-row button {
  min-height: 32px;
  border: 1px solid #bfd3d5;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal);
  background: #f2fbfb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.message {
  max-width: 84%;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.message.bot {
  justify-self: start;
  background: #e9f5f5;
  border: 1px solid #c7e7e8;
}

.message.user {
  justify-self: end;
  color: var(--white);
  background: var(--teal);
}

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

.phone-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2fbfb;
}

.phone-card p,
.phone-card small {
  margin: 0;
  color: var(--muted);
}

.phone-card strong {
  color: var(--teal);
  font-size: 30px;
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.transcript-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.transcript-panel h4 {
  margin: 0 0 6px;
}

.transcript-panel p,
.transcript-panel ul {
  margin-top: 0;
  color: var(--muted);
}

.lead-routing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.lead-routing article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
}

.lead-routing span,
.lead-routing strong {
  display: block;
}

.lead-routing span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-routing strong {
  margin-top: 6px;
  line-height: 1.25;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px max(16px, calc((100% - 1180px) / 2));
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .tool-shell,
  .ai-grid {
    grid-template-columns: 1fr;
  }

  .intake-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 76px;
  }

  .section {
    scroll-margin-top: 76px;
  }

  .nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 10px 0;
    gap: 8px;
  }

  .nav-actions {
    width: auto;
    overflow-x: auto;
    margin-left: 0;
    gap: 2px;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-logo {
    height: 40px;
  }

  .brand small {
    display: none;
  }

  .nav-actions a {
    padding: 6px 5px;
    font-size: 13px;
  }

  .nav-actions a::after {
    left: 5px;
    right: 5px;
  }

  .workflow-inner,
  .lead-routing,
  .contact-form,
  fieldset {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-inner {
    min-height: calc(100vh - 76px);
  }

  .hero h1 {
    font-size: clamp(34px, 9.2vw, 42px);
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .button {
    flex: 1 1 150px;
  }

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

  .hero-proof span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }

  .hero-proof span:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }

  .quote-card strong,
  .phone-card strong {
    font-size: 28px;
  }

  .footer {
    flex-direction: column;
  }

  [data-reveal="up"],
  [data-reveal="blur-up"] {
    transform: translateY(24px);
  }

  [data-reveal="down"] {
    transform: translateY(-18px);
  }

  [data-reveal="left"] {
    transform: translateX(-24px);
  }

  [data-reveal="right"] {
    transform: translateX(24px);
  }

  [data-reveal="pop"] {
    transform: translateY(14px) scale(0.92);
  }
}

/* AI widget — styled to match Code Tailors design */
react-widget-uv {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Generic color overrides */
  --primary-color: #9BD6D8;
  --primary: #9BD6D8;
  --accent: #9BD6D8;
  --accent-color: #9BD6D8;
  --color-primary: #9BD6D8;
  --brand-color: #9BD6D8;
  --button-color: #9BD6D8;
  --theme-color: #9BD6D8;
  --widget-primary: #9BD6D8;

  /* Override the rose/pink color scale the widget uses internally */
  --color-rose-50:  #f0fbfb;
  --color-rose-100: #d9f4f5;
  --color-rose-200: #b5e8ea;
  --color-rose-300: #86d6d8;
  --color-rose-400: #9BD6D8;
  --color-rose-500: #9BD6D8;
  --color-rose-600: #7bc4c6;
  --color-rose-700: #5aacae;
  --color-rose-800: #3e8e90;
  --color-rose-900: #296a6c;
  --color-rose-950: #174849;

  /* Match site background and text */
  --color-white: #ffffff;
  --color-black: #182026;

  /* Clean shadow matching the site */
  --shadow-lg: 0 18px 50px rgba(18, 50, 74, 0.12);
  --shadow-md: 0 8px 24px rgba(18, 50, 74, 0.08);
  --shadow-sm: 0 2px 8px rgba(18, 50, 74, 0.06);

  /* Softer radius to match site card style */
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 20px;
}
