/*
  The public website (smsdesk.co). Same colors and fonts as the portal (site.css),
  laid out as a website. The one showy thing is the "switchboard" in the hero:
  customer texts routed to the person who sent the last text, whose amber lamp lights up.
*/
:root {
  --deep: #24282e;
  --accent: #1f6b8c;
  --paper: #eff1f2;
  --sheet: #ffffff;
  --lamp: #edaa12;
  --lamp-soft: #fff4d6;
  --brick: #b23a2e;
  --brick-wash: #fbe9e6;

  --ink: var(--deep);
  --muted: color-mix(in srgb, var(--deep) 68%, white);
  --line: color-mix(in srgb, var(--deep) 14%, white);
  --line-strong: color-mix(in srgb, var(--deep) 27%, white);
  --deep-2: color-mix(in srgb, var(--deep) 90%, white);
  --deep-3: color-mix(in srgb, var(--deep) 80%, white);
  --on-deep: color-mix(in srgb, var(--deep) 14%, white);
  --on-deep-dim: color-mix(in srgb, var(--deep) 42%, white);
  --accent-dark: color-mix(in srgb, var(--accent) 80%, black);
  --accent-wash: color-mix(in srgb, var(--accent) 10%, white);
  --accent-ring: color-mix(in srgb, var(--accent) 28%, white);

  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); color: var(--deep); margin: 0; }
h1 { font-size: clamp(38px, 5.6vw, 66px); line-height: 1.02; font-weight: 760; letter-spacing: -0.028em; }
h2 { font-size: clamp(27px, 3.2vw, 38px); line-height: 1.1; font-weight: 720; letter-spacing: -0.02em; margin-bottom: 18px; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 680; letter-spacing: -0.01em; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font: 600 16px/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.small { padding: 8px 14px; font-size: 15px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--deep); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--deep); }
.btn.light { background: #fff; color: var(--deep); border-color: #fff; }
.btn.light:hover { background: var(--lamp-soft); border-color: var(--lamp-soft); color: var(--deep); }

/* ---------- header and footer ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--sheet); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a { white-space: nowrap; }
.top nav a:not(.btn) { color: var(--deep); text-decoration: none; font-weight: 500; }
.top nav a:not(.btn):hover, .top nav a[aria-current="page"]:not(.btn) { text-decoration: underline; }

.brand { display: inline-flex; align-items: center; gap: 10px; font: 750 21px/1 var(--display); color: var(--deep); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--deep); }
.brand .mark { position: relative; width: 26px; height: 22px; border-radius: 7px 7px 7px 2px; background: var(--deep); }
.brand .mark::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px var(--sheet); }

.foot { background: var(--paper); border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 0; font-size: 15px; }
.foot-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.foot .brand .mark::after { box-shadow: 0 0 0 2px var(--paper); }
.foot p { color: var(--muted); margin-top: 10px; max-width: 28em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-content: flex-start; max-width: 560px; }
.foot nav a { color: var(--deep); }
.fine { color: var(--muted); font-size: 13px; margin-top: 24px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 92px) 0 clamp(40px, 6vw, 72px); background: linear-gradient(var(--sheet), var(--paper)); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 13em; }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: color-mix(in srgb, var(--deep) 82%, white); max-width: 34em; margin: 24px 0 30px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* the switchboard */
.switchboard {
  margin: 0; background: var(--deep); color: var(--on-deep); border-radius: 20px;
  padding: clamp(16px, 2.4vw, 26px); box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--deep) 70%, transparent);
}
.sb-number {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font: 700 clamp(17px, 1.8vw, 21px)/1.2 var(--display); color: #fff; letter-spacing: -0.01em;
  padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--deep-3);
}
.sb-label { font: 500 13px/1.2 var(--body); color: var(--on-deep-dim); letter-spacing: 0; }
.sb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) clamp(36px, 6vw, 72px) minmax(0, 1fr); grid-template-rows: repeat(3, 1fr); }
.sb-col { display: contents; }
.sb-customers > :nth-child(1), .sb-people > :nth-child(1) { grid-row: 1; }
.sb-customers > :nth-child(2), .sb-people > :nth-child(2) { grid-row: 2; }
.sb-customers > :nth-child(3), .sb-people > :nth-child(3) { grid-row: 3; }
.sb-customers > * { grid-column: 1; }
.sb-people > * { grid-column: 3; }
.sb-lines { grid-column: 2; grid-row: 1 / 4; width: 100%; height: 100%; overflow: visible; }

.sb-bubble {
  align-self: center; margin: 9px 0; padding: 9px 12px; border-radius: 14px 14px 14px 4px;
  background: var(--deep-2); color: #fff; font-size: clamp(13px, 1.25vw, 15px); line-height: 1.35;
}
.sb-person { align-self: center; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; margin: 9px 0; font-size: clamp(13px, 1.25vw, 15px); line-height: 1.3; }
.sb-person b { color: #fff; font-weight: 650; }
.sb-person span:not(.lamp) { grid-column: 2; color: var(--on-deep-dim); font-size: 13px; }
.sb-person .lamp { grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: var(--deep-3); }

.sb-lines path { fill: none; stroke: var(--deep-3); stroke-width: 2; vector-effect: non-scaling-stroke; }
.switchboard figcaption { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--deep-3); font-size: 14px; color: var(--on-deep-dim); }

/* One orchestrated moment: each reply travels to its person and their lamp comes on, one after another. */
.sb-lines path { stroke-dasharray: 100; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sb-lines path { stroke-dashoffset: 100; animation: route .9s ease-out forwards; }
  .sb-lines .r1 { animation-delay: .5s; }
  .sb-lines .r2 { animation-delay: 1.5s; }
  .sb-lines .r3 { animation-delay: 2.5s; }
  .sb-person .lamp { animation: lamp-on .4s ease-out forwards; background: var(--deep-3); }
  .sb-person.r1 .lamp { animation-delay: 1.3s; }
  .sb-person.r2 .lamp { animation-delay: 2.3s; }
  .sb-person.r3 .lamp { animation-delay: 3.3s; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-lines path { stroke: var(--lamp); }
  .sb-person .lamp { background: var(--lamp); box-shadow: 0 0 0 3px rgba(237, 170, 18, .2), 0 0 12px rgba(237, 170, 18, .55); }
}
@keyframes route { 60% { stroke: #edaa12; } to { stroke-dashoffset: 0; stroke: #edaa12; } }
@keyframes lamp-on { to { background: var(--lamp); box-shadow: 0 0 0 3px rgba(237, 170, 18, .2), 0 0 12px rgba(237, 170, 18, .55); } }

/* ---------- sections ---------- */
section { padding: clamp(48px, 7vw, 88px) 0; }
section.wrap { padding: clamp(48px, 7vw, 88px) var(--gutter); }
.hero, .band { padding-left: 0; padding-right: 0; }
.band { background: var(--paper); }
.band.quiet { background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.steps { list-style: none; counter-reset: step; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.steps li { counter-increment: step; border-top: 2px solid var(--deep); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font: 760 44px/1 var(--display); color: var(--accent); margin-bottom: 14px; }
.steps p { color: color-mix(in srgb, var(--deep) 82%, white); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
.split h2 { font-size: clamp(24px, 2.6vw, 31px); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px clamp(24px, 4vw, 48px); margin: 30px 0 0; }
.features div { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.features dt { font: 680 18px/1.3 var(--display); color: var(--deep); margin-bottom: 6px; }
.features dd { margin: 0; color: color-mix(in srgb, var(--deep) 80%, white); }

.price-teaser .price-line { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 6px 0 14px; font-size: 19px; }
.price-teaser .price-line span { padding-right: 22px; margin-right: 22px; border-right: 1px solid var(--line-strong); }
.price-teaser .price-line span:last-child { border-right: 0; }
.price-teaser .price-line b { font: 760 26px/1 var(--display); color: var(--deep); }
.example-note { display: inline-block; background: var(--lamp-soft); color: #6d4b00; padding: 4px 10px; border-radius: 6px; font-size: 14px; }
.price-teaser > a { display: block; margin-top: 4px; font-weight: 600; }

section.faq { padding-top: 0; }
.faq > * { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 500 24px/1 var(--body); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: color-mix(in srgb, var(--deep) 82%, white); max-width: 62ch; }

.closing { background: var(--deep); padding: clamp(40px, 6vw, 64px) 0; }
.closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.closing h2 { color: #fff; margin: 0; }

/* ---------- inner pages ---------- */
.page-top { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(var(--sheet), var(--paper)); }
.page-top p { font-size: 19px; max-width: 40em; color: color-mix(in srgb, var(--deep) 82%, white); margin: 16px 0 0; }
.page-top h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 16em; }

/* pricing */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.plan-rows { margin: 0; border-top: 2px solid var(--deep); }
.plan-rows div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.plan-rows dt { font-weight: 650; }
.plan-rows dd { margin: 0; font: 760 24px/1.1 var(--display); text-align: right; }
.plan-rows dd.why { grid-column: 1 / -1; color: var(--muted); font: 15px/1.5 var(--body); text-align: left; }
.plan-rows .per { font: 500 15px var(--body); color: var(--muted); }

.calc { background: var(--paper); border-radius: 16px; padding: clamp(20px, 3vw, 30px); }
.calc h2 { font-size: 24px; margin-bottom: 4px; }
.calc label { display: block; font-weight: 600; margin: 18px 0 6px; }
.calc input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; font: 17px var(--body); background: #fff; color: var(--ink); }
.calc input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.calc .hint { color: var(--muted); font-size: 14px; margin-top: 4px; }
.calc output { display: block; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.calc .total, .calc .breakdown { display: block; }
.calc .total { font: 780 44px/1 var(--display); letter-spacing: -0.02em; color: var(--deep); }
.calc .total small { font: 500 16px var(--body); color: var(--muted); letter-spacing: 0; }
.calc .breakdown { color: var(--muted); font-size: 15px; margin-top: 8px; }

.prose { max-width: 68ch; }
.prose h2 { font-size: 26px; margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

/* sign-up */
.signup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.next-steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; }
.next-steps li { counter-increment: step; position: relative; padding: 0 0 22px 46px; }
.next-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--deep); color: #fff; font: 700 15px/32px var(--display); text-align: center; }
.next-steps b { display: block; }
.next-steps span { color: var(--muted); font-size: 15px; }

.form { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 18px 40px -30px color-mix(in srgb, var(--deep) 50%, transparent); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 15px; }
.form label .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  font: 16px/1.4 var(--body); color: var(--ink); background: #fff;
}
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.form .input-validation-error { border-color: var(--brick); }
.form .field-error { color: var(--brick); font-size: 14px; display: block; margin-top: 4px; }
.form .actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form .actions p { margin: 0; color: var(--muted); font-size: 14px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert-error { background: var(--brick-wash); color: #7d241b; border-left: 4px solid var(--brick); padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; }

section.thanks { max-width: 640px; padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px); }
.thanks .lamp-big { width: 18px; height: 18px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 5px rgba(237, 170, 18, .2), 0 0 22px rgba(237, 170, 18, .6); margin-bottom: 26px; }
.thanks p { font-size: 19px; color: color-mix(in srgb, var(--deep) 82%, white); margin-top: 16px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero-inner, .plan, .signup, .split { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .top nav { gap: 14px; }
  .brand { font-size: 19px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .form .row { grid-template-columns: minmax(0, 1fr); }
  .price-teaser .price-line { flex-direction: column; }
  .price-teaser .price-line span { border-right: 0; padding-right: 0; margin-right: 0; }
  .sb-number { flex-direction: column; gap: 4px; }
}
@media (max-width: 380px) {
  .top nav a[href$="/Account/Login"] { display: none; }
}
