/* 2AM Desk — marketing site */

:root {
  --bg: #f4efe6;
  --bg-deep: #ebe4d6;
  --surface: #fbf9f4;
  --ink: #1f1c18;
  --ink-hover: #3a352e;
  --muted: #6a6358;
  --line: #ddd4c4;
  --amber: #e8a317;
  --amber-soft: #f6e2b0;
  --amber-text: #8a5a00;
  --max: 1120px;
  --radius: 8px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--amber-text);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.num {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* —— Header —— */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

.logo {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav .nav-call {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 500;
}

.nav .nav-call:hover {
  background: var(--ink);
  color: var(--bg);
}

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

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.btn-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--ink-hover);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* —— Hero —— */
.hero {
  padding: 3rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
  }

  .hero {
    padding: 5.5rem 0 6rem;
  }
}

.hero h1 {
  margin: 0 0 1.5rem;
  max-width: 15ch;
  font-size: clamp(2.25rem, 5.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  display: block;
  width: fit-content;
  margin-top: 0.1em;
  padding: 0 0.15em;
  margin-left: -0.15em;
  background: var(--amber-soft);
  border-radius: 4px;
}

.hero-sub {
  margin: 0 0 2.25rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.175rem);
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 519px) {
  .cta-row .btn {
    width: 100%;
  }
}

.hero-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Example call summary, shown as a text thread */
.summary {
  --screen: #ffffff;
  --bubble-in: #e9e9eb;
  --bubble-out: #0a7cff;
  margin: 0;
  width: 100%;
  max-width: 23rem;
}

@media (min-width: 960px) {
  .summary {
    justify-self: end;
  }
}

.phone {
  overflow: hidden;
  background: var(--screen);
  border: 1px solid var(--line);
  border-radius: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", var(--sans);
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.thread-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.1rem 1rem 0.75rem;
  background: #f7f7f8;
  border-bottom: 1px solid #e3e3e6;
}

.thread-name {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #3c3c43;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem 0.6rem;
}

.thread p {
  margin: 0;
}

.thread-time {
  margin-bottom: 0.5rem !important;
  text-align: center;
  font-size: 0.6875rem;
  color: #8e8e93;
}

.thread-time strong {
  font-weight: 600;
}

.bubble {
  position: relative;
  max-width: 82%;
  padding: 0.45rem 0.8rem;
  border-radius: 1.15rem;
  overflow-wrap: anywhere;
}

.bubble-in {
  align-self: flex-start;
  background: var(--bubble-in);
  color: #000;
}

.bubble-out {
  align-self: flex-end;
  margin-top: 0.6rem;
  background: var(--bubble-out);
  color: #fff;
}

/* Bubble tails: a bubble-coloured curve, then a screen-coloured mask */
.bubble-tail::before,
.bubble-tail::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 1.1rem;
}

.bubble-in.bubble-tail::before {
  left: -0.45rem;
  width: 1.25rem;
  background: var(--bubble-in);
  border-bottom-right-radius: 0.95rem;
}

.bubble-in.bubble-tail::after {
  left: -0.65rem;
  width: 0.65rem;
  background: var(--screen);
  border-bottom-right-radius: 0.6rem;
}

.bubble-out.bubble-tail::before {
  right: -0.45rem;
  width: 1.25rem;
  background: var(--bubble-out);
  border-bottom-left-radius: 0.95rem;
}

.bubble-out.bubble-tail::after {
  right: -0.65rem;
  width: 0.65rem;
  background: var(--screen);
  border-bottom-left-radius: 0.6rem;
}

.thread-status {
  align-self: flex-end;
  margin-top: 0.15rem !important;
  font-size: 0.6875rem;
  color: #8e8e93;
}

.thread-compose {
  padding: 0.5rem 0.9rem 1rem;
}

.compose-field {
  display: block;
  padding: 0.4rem 0.9rem;
  border: 1px solid #d1d1d6;
  border-radius: 999px;
  font-size: 0.875rem;
  color: #a5a5aa;
}

.summary figcaption {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* —— Sections —— */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 3rem;
  }

  .section {
    padding: 6rem 0;
  }
}

.split > h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.statement {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* —— Steps —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.step:first-child {
  border-top-color: var(--ink);
}

.step-num {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--amber-text);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.step p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
}

/* —— Checklists —— */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-top: 1px solid var(--line);
  font-weight: 500;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.2rem;
  width: 0.8rem;
  height: 0.45rem;
  border-left: 2px solid var(--amber-text);
  border-bottom: 2px solid var(--amber-text);
  transform: rotate(-45deg);
}

.checklist-note {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.checklist-grid {
  border-bottom: 1px solid var(--line);
}

.checklist-grid li {
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.checklist-grid li::before {
  top: 1.5rem;
}

.checklist-grid li:first-child {
  border-top-color: var(--ink);
}

@media (min-width: 640px) {
  .checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
    border-bottom: 0;
  }

  .checklist-grid li {
    border-bottom: 1px solid var(--line);
    margin-bottom: -1px;
  }

  .checklist-grid li:nth-child(2) {
    border-top-color: var(--ink);
  }

  /* Odd item out spans the full row so the grid ends evenly */
  .checklist-grid li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* —— Pricing —— */
.price-card {
  max-width: 32rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 519px) {
  .price-card {
    padding: 1.5rem;
  }
}

.price-trial {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.7rem;
  background: var(--amber-soft);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.price-amount {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.price-sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.price-actions .btn-primary {
  flex: 1 1 14rem;
}

.price-actions .btn-secondary {
  flex: 1 1 8rem;
}

.price-note {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* —— FAQ —— */
.faq {
  max-width: 44rem;
  border-bottom: 1px solid var(--line);
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:first-child {
  border-top-color: var(--ink);
}

.faq summary {
  position: relative;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "−";
}

.faq summary:hover::after {
  color: var(--ink);
}

.faq details p {
  margin: -0.25rem 0 1.4rem;
  max-width: 36rem;
  color: var(--muted);
}

/* —— Footer —— */
.site-footer {
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}

.footer-cta-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.footer-cta-sub {
  margin: 0;
  font-size: 1.0625rem;
}

@media (max-width: 519px) {
  .footer-cta .btn {
    width: 100%;
  }
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.75rem 0;
}

.footer-brand {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--amber-text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  margin: 0 0 0 auto;
  font-size: 0.875rem;
}

@media (max-width: 639px) {
  .footer-copy {
    width: 100%;
    margin-left: 0;
  }
}

/* —— Legal pages —— */
.legal-main {
  padding: 3.5rem 0 5rem;
}

.legal-main .wrap {
  max-width: 44rem;
}

.legal-main h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.legal-meta {
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-main h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.legal-main ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.legal-main li {
  margin-bottom: 0.4rem;
}

.legal-main li::marker {
  color: var(--muted);
}

.placeholder {
  padding: 0.85rem 1rem;
  background: var(--amber-soft);
  border: 1px dashed var(--amber-text);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.placeholder code,
.legal-main code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: rgba(31, 28, 24, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
