/*
 * Copia.com V2 design system
 * Dependency-free: no Bootstrap, MDB, jQuery, icon font, or external font required.
 */

:root {
  --copia-blue-900: #102a43;
  --copia-blue-800: #173f67;
  --copia-blue-700: #185a91;
  --copia-blue-600: #1b70b5;
  --copia-blue-500: #2586cf;
  --copia-blue-100: #eaf4fb;
  --copia-blue-050: #f4f9fd;
  --copia-violet: #6554a4;
  --copia-green: #278466;
  --queue-fax: #8a36c1;
  --queue-voice: #1dafe4;
  --queue-email: #32c760;
  --copia-ink: #17232f;
  --copia-text: #44515d;
  --copia-muted: #6e7b86;
  --copia-border: #dce3e9;
  --copia-border-soft: #e9eef2;
  --copia-surface: #ffffff;
  --copia-surface-alt: #f6f8fa;
  --copia-dark: #152333;
  --copia-dark-2: #1c3045;
  --copia-white: #ffffff;
  --copia-success: #1f7a5a;
  --copia-shadow-sm: 0 2px 8px rgba(20, 43, 65, 0.08);
  --copia-shadow-md: 0 14px 35px rgba(20, 43, 65, 0.11);
  --copia-radius-sm: 6px;
  --copia-radius: 12px;
  --copia-radius-lg: 18px;
  --copia-container: 1160px;
  --copia-header-height: 76px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--copia-text);
  background: var(--copia-surface);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: var(--copia-blue-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--copia-blue-900);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(37, 134, 207, 0.35);
  outline-offset: 3px;
}

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

h1,
h2,
h3,
h4 {
  color: var(--copia-ink);
  font-weight: 650;
  line-height: 1.13;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.6rem, 5.2vw, 4.9rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3.5vw, 3.1rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

h4 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
}

p {
  margin-bottom: 1rem;
}

.container {
  width: min(var(--copia-container), calc(100% - 40px));
  margin-inline: auto;
}

.container--narrow {
  width: min(820px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 8vw, 104px);
}

.section--compact {
  padding-block: clamp(42px, 5vw, 68px);
}

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

.section--blue-soft {
  background: var(--copia-blue-050);
}

.section--dark {
  color: #d5e0e9;
  background: var(--copia-dark);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--copia-white);
}

.section-head {
  max-width: 790px;
  margin-bottom: clamp(30px, 5vw, 48px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head p {
  margin-bottom: 0;
  color: var(--copia-muted);
  font-size: 1.08rem;
}

.section--dark .section-head p {
  color: #aebfce;
}

/* .callout is a white card and stays that way regardless of the section
   it's placed in, so it needs its own text colors back when nested inside
   .section--dark instead of inheriting that section's light/white text. */
.section--dark .callout {
  color: var(--copia-ink);
}

.section--dark .callout h2,
.section--dark .callout h3 {
  color: var(--copia-ink);
}

.section--dark .callout p {
  color: var(--copia-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  color: var(--copia-blue-700);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
}

.section--dark .eyebrow {
  color: #73b9e7;
}

.lead {
  color: #4c5a66;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.text-muted {
  color: var(--copia-muted);
}

/* Header */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgba(220, 227, 233, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  min-height: var(--copia-header-height);
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--copia-ink);
  text-decoration: none;
}

.site-brand img {
  width: auto;
  height: 44px;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 12px 11px;
  border-radius: var(--copia-radius-sm);
  color: #455563;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--copia-blue-700);
  background: var(--copia-blue-050);
}

.site-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-phone {
  color: var(--copia-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--copia-border);
  border-radius: var(--copia-radius-sm);
  color: var(--copia-ink);
  background: #fff;
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* Buttons */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--copia-radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--primary {
  color: #fff;
  background: var(--copia-blue-700);
  box-shadow: 0 7px 18px rgba(24, 90, 145, 0.19);
}

.btn--primary:hover {
  color: #fff;
  background: var(--copia-blue-800);
}

.btn--secondary {
  border-color: #b8c9d8;
  color: var(--copia-blue-800);
  background: #fff;
}

.btn--secondary:hover {
  border-color: var(--copia-blue-600);
  color: var(--copia-blue-800);
  background: var(--copia-blue-050);
}

.btn--white {
  color: var(--copia-blue-900);
  background: #fff;
}

.btn--white:hover {
  color: var(--copia-blue-900);
  background: #f3f7fb;
}

.btn--link {
  min-height: 0;
  padding: 0;
  color: var(--copia-blue-700);
  background: transparent;
  box-shadow: none;
}

.btn--link:hover {
  color: var(--copia-blue-900);
  transform: none;
}

.icon-arrow {
  width: 17px;
  height: 17px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--copia-border-soft);
  background:
    radial-gradient(circle at 86% 18%, rgba(37, 134, 207, 0.14), transparent 29%),
    linear-gradient(180deg, #fff, #f8fbfd);
}

.hero__grid {
  min-height: clamp(560px, 72vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(40px, 7vw, 82px);
  align-items: center;
  padding-block: clamp(72px, 9vw, 116px);
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero h1 strong {
  color: var(--copia-blue-700);
  font-weight: inherit;
}

.hero__copy .lead {
  max-width: 720px;
  margin-bottom: 1.65rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.1rem;
}

.hero__meta {
  color: var(--copia-muted);
  font-size: 0.84rem;
}

.hero-diagram {
  position: relative;
  padding: 24px;
  border: 1px solid #d9e4ec;
  border-radius: var(--copia-radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--copia-shadow-md);
}

.hero-diagram__label {
  margin-bottom: 13px;
  color: var(--copia-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-diagram__core {
  padding: 21px;
  border: 1px solid #cedce7;
  border-radius: 10px;
  color: var(--copia-blue-900);
  background: var(--copia-blue-050);
  text-align: center;
}

.hero-diagram__core strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1.05rem;
}

.hero-diagram__core span {
  color: var(--copia-muted);
  font-size: 0.82rem;
}

.hero-diagram__line {
  width: 2px;
  height: 28px;
  margin-inline: auto;
  background: #bfd1df;
}

.hero-diagram__nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-diagram__node {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--copia-border);
  border-radius: 8px;
  color: #465561;
  background: #fff;
  text-align: center;
  font-size: 0.78rem;
}

.hero-diagram__node strong {
  display: block;
  color: var(--copia-ink);
  font-size: 0.82rem;
}

/* Proof bar */
.proof-bar {
  border-bottom: 1px solid var(--copia-border-soft);
  background: #fff;
}

.proof-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-stat {
  padding: 25px 22px;
  border-right: 1px solid var(--copia-border-soft);
}

.proof-stat:first-child {
  padding-left: 0;
}

.proof-stat:last-child {
  border-right: 0;
}

.proof-stat strong {
  display: block;
  margin-bottom: 2px;
  color: var(--copia-ink);
  font-size: 1.12rem;
}

.proof-stat span {
  color: var(--copia-muted);
  font-size: 0.79rem;
}

/* Generic grids */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

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

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

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(38px, 7vw, 80px);
  align-items: center;
}

/* Cards */
.card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--copia-border);
  border-radius: var(--copia-radius);
  background: #fff;
  box-shadow: var(--copia-shadow-sm);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.card:hover {
  border-color: #c5d3df;
  box-shadow: var(--copia-shadow-md);
  transform: translateY(-3px);
}

.card--flat {
  box-shadow: none;
}

.card__body {
  padding: 24px;
}

.card__body p:last-child {
  margin-bottom: 0;
}

.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #edf2f5;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 10px;
  color: var(--copia-blue-700);
  background: var(--copia-blue-100);
}

.card__icon svg {
  width: 23px;
  height: 23px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.card__link svg {
  width: 16px;
  height: 16px;
}

.tag {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--copia-blue-800);
  background: var(--copia-blue-100);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Callout / feature list */
.callout {
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid #d3e1eb;
  border-radius: var(--copia-radius-lg);
  background: #fff;
  box-shadow: var(--copia-shadow-sm);
}

.callout h2,
.callout h3 {
  max-width: 760px;
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.check-list__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  color: var(--copia-success);
  background: #e8f5ef;
}

.check-list__icon svg {
  width: 14px;
  height: 14px;
}

/* Numbered variant for ordered steps instead of a checkmark, reusing the
   same circle so it inherits the same theme colors. */
.check-list__icon--step {
  font-size: .8rem;
  font-weight: 800;
}

/* Developer block */
.code-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #2e465c;
  border-radius: var(--copia-radius);
  background: #0f1c29;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.code-panel__top {
  padding: 10px 15px;
  border-bottom: 1px solid #293e52;
  color: #8196a8;
  background: #132435;
  font-size: 0.73rem;
  font-weight: 700;
}

.code-panel pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: #d6e2eb;
  font: 0.81rem/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.code-panel .code-key {
  color: #70bce9;
}

.code-panel .code-value {
  color: #86d5ad;
}

.code-panel .code-comment {
  color: #73889a;
}

/* Form */
.form-demo {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--copia-ink);
  font-size: 0.83rem;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #cbd5dd;
  border-radius: var(--copia-radius-sm);
  color: var(--copia-ink);
  background: #fff;
}

.field textarea {
  min-height: 125px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--copia-blue-500);
  outline: 3px solid rgba(37, 134, 207, 0.13);
}

/* Design-system showcase */
.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.swatch {
  overflow: hidden;
  border: 1px solid var(--copia-border);
  border-radius: 8px;
  background: #fff;
}

.swatch__color {
  height: 70px;
}

.swatch__label {
  padding: 9px;
  color: var(--copia-muted);
  font-size: 0.72rem;
}

.component-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* CTA */
.cta-band {
  color: #fff;
  background: linear-gradient(115deg, var(--copia-blue-800), var(--copia-blue-600));
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
}

.cta-band h2 {
  max-width: 760px;
  margin-bottom: 0.6rem;
  color: #fff;
}

.cta-band p {
  max-width: 760px;
  margin-bottom: 0;
  color: #dcecf7;
}

/* Footer */
.site-footer {
  padding: 60px 0 28px;
  color: #aab9c5;
  background: #111f2d;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 1fr);
  gap: 34px;
}

.site-footer__brand img {
  max-height: 40px;
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 300px;
  font-size: 0.84rem;
}

.site-footer h4 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #b8c5cf;
  font-size: 0.83rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid #293a49;
  color: #8294a3;
  font-size: 0.75rem;
}

/* Staging notice */
.stage-notice {
  padding: 8px 14px;
  color: #5d5015;
  background: #fff6c9;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 650;
}

/* Responsive */
/* Header/nav needs to start shedding width earlier than the rest of the
   1040px tier below: with white-space: nowrap now forcing every nav label
   onto one line (previously "Fax Solutions" was silently wrapping to two
   lines to make room, which is the bug this fixes), the full nav + logo +
   phone + CTA button doesn't actually fit until ~1220px. Real margin here
   again, since future migrated pages may add nav labels just as long. */
@media (max-width: 1260px) {
  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    padding-inline: 8px;
  }

  .site-phone {
    display: none;
  }

  .site-header__actions .btn {
    display: none;
  }
}

@media (max-width: 1040px) {
  .hero__grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero__grid {
    min-height: 0;
  }

  .hero-diagram {
    max-width: 680px;
  }

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

  .site-footer__grid {
    grid-template-columns: 1.4fr repeat(2, 1fr);
  }

  .site-footer__brand {
    grid-row: span 2;
  }
}

/* Header/nav collapse to the mobile drawer at a wider breakpoint than the
   rest of the page (820px below): with every current V2 nav label, the
   full inline nav plus logo no longer fits by ~821px, and future migrated
   pages may add labels that are just as long or longer, so this keeps a
   real margin instead of matching the layout's exact current pinch point. */
@media (max-width: 860px) {
  :root {
    --copia-header-height: 68px;
  }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 0;
  }

  .site-brand img {
    height: 39px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-header__actions {
    margin-left: 10px;
  }

  .site-nav {
    order: 4;
    width: 100%;
    max-height: 0;
    display: grid;
    overflow: hidden;
    transition: max-height 180ms ease;
  }

  .site-nav.is-open {
    max-height: 420px;
    padding-block: 10px 15px;
    border-top: 1px solid var(--copia-border-soft);
  }

  .site-nav a {
    padding: 10px 4px;
  }
}

@media (max-width: 820px) {
  .proof-bar__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-stat:nth-child(2) {
    border-right: 0;
  }

  .proof-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--copia-border-soft);
  }

  .proof-stat:nth-child(3) {
    padding-left: 0;
  }

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

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

  .cta-band__inner {
    display: grid;
  }
}

@media (max-width: 600px) {
  .container,
  .container--narrow {
    width: min(100% - 28px, var(--copia-container));
  }

  .section {
    padding-block: 60px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }

  .hero__grid {
    padding-block: 60px;
  }

  .hero__actions {
    display: grid;
  }

  .hero__actions .btn {
    width: 100%;
  }

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

  .grid-2,
  .grid-4,
  .form-row {
    grid-template-columns: 1fr;
  }

  .proof-stat {
    padding: 17px 12px;
  }

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

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .site-footer__bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
