/* WhatWorks marketing + billing site.
   Palette mirrors the app: header #075E54, accent #25D366 (AppTheme.primaryGreen). */

:root {
  --header: #075e54;
  --header-dark: #054d44;
  --accent: #25d366;
  --accent-dark: #1faa53;
  --text: #111b21;
  --text-2: #667781;
  --line: #e9edef;
  --bg: #f7f8fa;
  --card: #ffffff;
  --danger: #d32f2f;
  --radius: 12px;
  --wrap: 960px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

main { padding: 32px 0 64px; }

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

header.site {
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--header);
  text-decoration: none;
  margin-right: auto;
}

.brand .dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #04352f;
}

.brand-ico {
  height: 26px;
  width: auto;
  border-radius: 7px;
}

/* Full-bleed graphic banner (marketing artwork). */
section.hero-banner { padding: 0; background: #fff; }

section.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Premium hero rendered in HTML (headline + "Premium includes" card). */
section.hero-premium {
  background: linear-gradient(180deg, #ffffff 0%, #edf7f1 100%);
  color: var(--text);
  padding: 44px 0 52px;
}

.hero-premium-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-premium-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-premium-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.hero-premium-copy h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.hero-premium-copy p {
  font-size: 17px;
  color: var(--text-2);
  margin: 0;
}

.hero-includes {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(7, 94, 84, 0.12);
}

/* Premium + Business cards stacked in the hero's right column. */
.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-business { border-top: 4px solid var(--header); }

.hero-includes h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.hero-includes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hero-includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
}

.hero-includes li.strong { font-weight: 700; }

.hero-includes li::before {
  content: '\2713';
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .hero-premium-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-premium-copy h1 { font-size: 28px; }
}

/* Screen-reader-only text for image-based heroes. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

nav.site a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  margin-left: 18px;
}

nav.site a:hover,
nav.site a[aria-current='page'] {
  color: var(--header);
  text-decoration: underline;
}

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

.hero {
  background: #fff;
  color: var(--text);
  padding: 56px 0 60px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.25;
}

.hero p.tagline {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: 17px;
  color: var(--text-2);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 { margin-top: 0; font-size: 20px; }

.card h3 { font-size: 16px; margin-bottom: 6px; }

h1.page { font-size: 28px; margin: 0 0 4px; }

p.updated {
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 24px;
}

.legal h2 {
  font-size: 18px;
  margin: 28px 0 8px;
  padding-top: 4px;
}

.card ul,
.card ol { padding-left: 22px; }

.card li { margin-bottom: 6px; }

a { color: var(--header); }

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

.small { font-size: 13px; }

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

.btn {
  display: inline-block;
  background: var(--accent);
  color: #04352f;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover { background: var(--accent-dark); color: #fff; }

.btn[disabled] {
  background: #cfd8dc;
  color: #78909c;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--header);
}

.btn.block { display: block; width: 100%; text-align: center; }

/* ---------- feature grid ---------- */

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

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.feature .ico { font-size: 22px; }

.feature h3 { margin: 8px 0 4px; font-size: 16px; }

.feature p { margin: 0; color: var(--text-2); font-size: 14px; }

/* ---------- forms ---------- */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type='tel'],
input[type='text'],
input[type='email'],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.field { margin-bottom: 16px; }

.hint { font-size: 12px; color: var(--text-2); margin-top: 6px; }

/* ---------- plan picker ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 8px 0 4px;
}

.plan {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s ease;
}

.plan:hover { border-color: #b7c4c1; }

.plan.selected {
  border-color: var(--accent);
  background: #f2fdf6;
}

.plan .dur { font-weight: 700; font-size: 15px; }

.plan .price {
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 2px;
}

.plan .per { font-size: 12px; color: var(--text-2); }

.plan .tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #04352f;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Compact variant of the plan/duration pickers — one glance, one tap. */
.plans.tight {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.plans.tight .plan { padding: 10px 12px; }

.plans.tight .plan .dur { font-size: 13px; }

.plans.tight .plan .price { font-size: 18px; margin: 2px 0 1px; }

.plans.tight .plan .tag { top: -9px; font-size: 10px; padding: 1px 8px; }

/* ---------- totals ---------- */

.totals {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: var(--text-2);
}

.totals .row.grand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}

/* ---------- tables ---------- */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

table.data th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-2);
}

table.data td.num { text-align: right; }

/* ---------- comparison table ---------- */

.table-scroll { overflow-x: auto; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 680px;
}

table.compare th,
table.compare td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

table.compare th:first-child,
table.compare td:first-child {
  text-align: left;
  width: 46%;
}

table.compare thead th {
  border-bottom: 2px solid var(--line);
  font-size: 16px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

table.compare thead .plan-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 2px;
}

table.compare .premium-col { background: #f2fdf6; }

table.compare thead .premium-col { color: var(--header); }

table.compare tbody tr:hover { background: #fafbfc; }

table.compare tbody tr:hover .premium-col { background: #eafaf1; }

.tick { color: var(--accent-dark); font-weight: 800; font-size: 16px; }

.dash { color: #b0bec5; }

/* ---------- plan card (account page) ---------- */

.plan-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.plan-name { font-size: 24px; font-weight: 800; }

.plan-price { color: var(--text-2); font-size: 15px; }

.plan-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- module picker (per-module pricing) ---------- */

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}

.module-opt {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
  transition: border-color 0.12s ease;
}

.module-opt:hover { border-color: #b7c4c1; }

.module-opt.checked {
  border-color: var(--accent);
  background: #f2fdf6;
}

.module-opt input {
  width: auto;
  accent-color: var(--accent-dark);
  margin: 3px 0 0;
}

/* Per-module plan + duration pickers, shown only while the module is ticked. */
.mod-choice {
  display: none;
  width: 100%;
  gap: 6px;
  margin-top: 8px;
}

.module-opt.checked .mod-choice { display: flex; }

.mod-choice select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

/* Module name + its current plan/expiry line inside the picker. */
.module-opt .mod-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.module-opt .mod-status {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.3;
}

/* ---------- status pills / notices ---------- */

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.pill.paid { background: #e6f7ec; color: #1b7a3e; }
.pill.pending { background: #fff6e0; color: #a06b00; }
.pill.failed { background: #fdecea; color: #b3261e; }

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.notice.info { background: #e8f4fd; color: #0b5c8a; }
.notice.warn { background: #fff6e0; color: #8a5a00; }
.notice.error { background: #fdecea; color: #b3261e; }
.notice.ok { background: #e6f7ec; color: #1b7a3e; }

.hidden { display: none !important; }

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

footer.site {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-2);
}

footer.site .links a {
  color: var(--text-2);
  text-decoration: none;
  margin-right: 16px;
}

footer.site .links a:hover { text-decoration: underline; }

footer.site .legal-name { margin-top: 12px; }

/* ---------- new image-backed sections ---------- */

.hero-app {
  text-align: left;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #edf7f1 100%);
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 520px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero-copy { max-width: 480px; }

.hero-copy h1 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-copy .tagline {
  font-size: 20px;
  color: var(--text-2);
  margin: 0 0 14px;
}

.hero-copy .tagline strong { color: var(--text); }

.hero-copy .hero-sub {
  font-size: 16px;
  color: var(--text-2);
  margin: 0 0 28px;
  line-height: 1.6;
}

/* Benefit list in the home hero. */
.hero-copy .hero-points {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text);
  font-size: 16px;
}

.hero-copy .hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hero-copy .hero-points li::before {
  content: '\2713';
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  color: #04352f;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-phone {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-phone img {
  max-height: 460px;
  width: auto;
  max-width: 100%;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(7,94,84,0.25);
  border: 8px solid #111;
  background: #111;
}

.strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.strip-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.section-head {
  text-align: center;
  font-size: 26px;
  margin: 48px 0 24px;
}

.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 48px 0;
}

.showcase-reverse .showcase-text { order: 2; }

.showcase-text h2 {
  font-size: 28px;
  margin: 0 0 14px;
}

.showcase-text p {
  color: var(--text-2);
  margin: 0 0 18px;
  line-height: 1.65;
}

.showcase-text ul {
  padding-left: 20px;
  color: var(--text-2);
  line-height: 1.7;
}

.showcase-text li { margin-bottom: 8px; }

.showcase-phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  justify-items: center;
}

.showcase-phones img {
  width: 100%;
  max-width: 220px;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  border: 6px solid #111;
  background: #111;
}

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

@media (max-width: 800px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .hero-copy { margin: 0 auto; }
  .hero-copy h1 { font-size: 32px; }
  .hero-phone { order: -1; }
  .hero-phone img { max-height: 360px; }
  .showcase,
  .showcase-reverse {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 36px 0;
  }
  .showcase-reverse .showcase-text { order: 0; }
  .showcase-phones {
    order: -1;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero { padding: 40px 0 44px; }
  .hero h1 { font-size: 26px; }
  header.site .wrap { min-height: 56px; }
  nav.site a { margin-left: 0; margin-right: 16px; }
  nav.site { width: 100%; padding-bottom: 10px; }
  main { padding: 20px 0 40px; }
  .card { padding: 18px; }
  .showcase-phones img { max-width: 160px; }
}

/* ---------- module pages ---------- */

.mod-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e6f4ec;
  border: 1px solid #bfe3cf;
  color: #075e54;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-wrap.single { grid-template-columns: 1fr; }
.hero-wrap.single .hero-copy { max-width: 640px; }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 28px 0 8px;
}

.feat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.feat-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--header);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.feat-card h3 { margin: 0 0 8px; font-size: 18px; }

.feat-card p { color: var(--text-2); margin: 0 0 12px; line-height: 1.6; }

.feat-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
}

.feat-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.feat-card ul li::before {
  content: '\2713';
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(18,140,126,0.12);
  color: var(--header);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- home hero feature rows ---------- */

.hero-copy h1 .accent { color: var(--accent-dark); }

.hero-feats {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.hero-feats li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.hero-feats li:last-child { border-bottom: 0; }

.hero-feats .ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e6f4ec;
  color: var(--header);
  display: grid;
  place-items: center;
}

.hero-feats .ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-feats strong { display: block; font-size: 15px; color: var(--text); }

.hero-feats .sub { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }

.hero-feats li > div { flex: 1; }

.avatars {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.avatars .av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #e6f4ec url('/assets/img/team-avatars.png') center/300% 200% no-repeat;
  margin-left: -9px;
}

.avatars .av:first-child { margin-left: 0; }

.avatars .av.a1 { background-position: 0% 0%; }
.avatars .av.a2 { background-position: 50% 0%; }
.avatars .av.a3 { background-position: 100% 0%; }
.avatars .av.a4 { background-position: 0% 100%; }
.avatars .av.a5 { background-position: 50% 100%; }
.avatars .av.a6 { background-position: 100% 100%; }

.avatars .more {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-left: -9px;
}
