/* Construction Check In: the home page (index.html and es/index.html).
   One idea a screen, few pieces each, and the offer (free for 30 days, no credit card) is the
   loudest thing after the headline. The other pages keep site.css. Phone first; one wider layout. */

:root {
  --navy: #1f3a5f;
  --navy-deep: #172c49;
  --orange: #ff8c42;
  --orange-press: #f57c2e;
  --ink: #0f172a;
  --body: #334155;
  --soft: #475569;
  --canvas: #f4f6f9;
  --line: #e2e8f0;
  --on-navy: #d7e0ec;
  --on-orange: #0f1e33; /* white on this orange is 2.3:1; this is 7.9:1 */
  --bezel: #0b1220;
  --gutter: 1.5rem;
  --wrap: 70rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--body);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1,
h2,
summary {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

/* ---- The bar at the top ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: #fff;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 3.75rem;
}

.brand-set {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand img {
  width: auto;
  height: 2.25rem;
}

.beta {
  padding: 0.125rem 0.5rem;
  border: 1.5px solid rgb(255 255 255 / 0.45);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-navy);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.lang {
  font-size: 0.9375rem;
  font-weight: 600;
  text-underline-offset: 3px;
}

/* On a phone the language gives way to the button once the first button has scrolled away. */
.top .top-cta {
  display: none;
}

.top.past .top-cta {
  display: inline-flex;
}

.top.past .lang {
  display: none;
}

/* ---- The one button, and the offer under it ---- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.625rem;
  padding: 0 1.5rem;
  border-radius: 0.875rem;
  background: var(--orange);
  color: var(--on-orange);
  font-size: 1.125rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0.75rem 1.5rem -0.75rem rgb(255 140 66 / 0.75);
  transition:
    transform 0.12s,
    background-color 0.12s;
}

.btn:hover {
  background: #ff9a58;
}

.btn:active {
  transform: scale(0.98);
  background: var(--orange-press);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: none;
}

.ask {
  max-width: 24rem;
}

.offer {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.offer li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.offer li::before {
  content: '';
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--orange) url(assets/check.svg) center / 0.875rem no-repeat;
}

.soon {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--on-navy);
}

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

.stores img {
  width: auto;
  height: 3.25rem;
}

/* ---- 1. The problem ---- */

.hero {
  position: relative;
  padding: 2.25rem 0 5.25rem;
  background: var(--navy);
  color: #fff;
}

h1 {
  font-size: clamp(2.25rem, 11.6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h1 em {
  font-style: normal;
  color: var(--orange);
}

.sub {
  max-width: 28rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--on-navy);
}

.hero .ask {
  margin-top: 1.75rem;
}

.hero-phone {
  display: none;
}

/* ---- Sections after the first ---- */

section {
  padding: 3.5rem 0;
}

h2 {
  font-size: clamp(1.875rem, 8.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ---- 2. The app, to tap through ---- */

.show {
  position: relative;
  margin-top: -1.75rem;
  border-radius: 1.75rem 1.75rem 0 0;
  background: #fff;
}

/* On a phone the choices stay under the bar while the phone scrolls past, ringed in the section's white. */
.tabs {
  position: sticky;
  top: 4.25rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-top: 1.5rem;
  padding: 0.25rem;
  border-radius: 0.875rem;
  background: var(--canvas);
  box-shadow: 0 0 0 0.5rem #fff;
}

.tab {
  min-height: 2.75rem;
  padding: 0 0.25rem;
  border: 0;
  border-radius: 0.625rem;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--body);
  cursor: pointer;
}

.tab[aria-selected='true'] {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.2);
}

.tab-line {
  display: none;
}

.caption {
  min-height: 3.2em;
  margin-top: 1rem;
  font-size: 1.0625rem;
}

.phone {
  width: min(68vw, 17.5rem);
  margin: 1.25rem auto 0;
  padding: 0.5rem;
  border-radius: 2.75rem;
  background: var(--bezel);
  box-shadow: 0 2.5rem 4rem -1.75rem rgb(15 23 42 / 0.5);
  touch-action: pan-y;
}

/* Every picture is the whole screen: the box has the pictures' own shape, so nothing is cut. */
.screens {
  display: grid;
  aspect-ratio: 720 / 1565;
  overflow: hidden;
  border-radius: 2.25rem;
  background: #fff;
}

.screens picture {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.25s;
}

.screens picture.on {
  opacity: 1;
}

.screens img {
  width: 100%;
  height: 100%;
}

.note {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  text-align: center;
  color: var(--soft);
}

/* ---- 3. His own numbers ---- */

.calc {
  background: var(--canvas);
}

.calc-card {
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.06),
    0 1rem 2rem -1.25rem rgb(15 23 42 / 0.25);
}

.result {
  padding: 1.5rem 1.5rem 1.625rem;
  background: var(--navy);
  color: #fff;
}

.result-if {
  font-size: 0.9375rem;
  color: var(--on-navy);
}

.result-year {
  margin: 0.25rem 0 0.375rem;
  font-size: clamp(3.25rem, 15.5vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}

.result-for {
  font-size: 1.0625rem;
  font-weight: 600;
}

.rows {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.25rem;
}

/* The label has the row to itself; the number sits at the end of its slider. */
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.5rem;
}

.row label {
  grid-column: 1 / -1;
  font-weight: 600;
  color: var(--ink);
}

.row input {
  grid-area: 2 / 1;
}

.row output {
  grid-area: 2 / 2;
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 4.25rem;
  text-align: right;
  white-space: nowrap;
  color: var(--navy);
}

input[type='range'] {
  --p: 20%;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--navy) var(--p), var(--line) var(--p));
}

input[type='range']::-webkit-slider-thumb {
  width: 1.875rem;
  height: 1.875rem;
  margin-top: -0.6875rem;
  border: 0.25rem solid var(--navy);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.25);
  -webkit-appearance: none;
  appearance: none;
}

input[type='range']::-moz-range-track {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--line);
}

input[type='range']::-moz-range-progress {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--navy);
}

input[type='range']::-moz-range-thumb {
  width: 1.375rem;
  height: 1.375rem;
  border: 0.25rem solid var(--navy);
  border-radius: 50%;
  background: #fff;
}

.fine {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--soft);
}

/* ---- 4. The offer, then the price: the page's loudest band after the first ---- */

.pricing {
  background: var(--navy);
  color: #fff;
}

.pricing h2 {
  color: #fff;
}

.pricing h2 span {
  display: block;
}

.pricing h2 span + span {
  color: var(--orange);
}

.lede {
  margin-top: 0.875rem;
  font-size: 1.0625rem;
  color: var(--on-navy);
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 1.125rem 1rem 1.125rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 1.25rem 2rem -1.25rem rgb(0 0 0 / 0.5);
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

.plan-size {
  font-size: 0.9375rem;
  color: var(--soft);
}

.plan-price {
  margin-top: 0.75rem;
  font-size: clamp(2.75rem, 13vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.plan-per {
  margin-top: 0.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--soft);
}

.plan .btn {
  min-height: 3rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: none;
}

/* The two cards share their rows, so a name that wraps in one keeps the prices level. */
@supports (grid-template-rows: subgrid) {
  .plans {
    grid-template-rows: repeat(5, auto);
  }

  .plan {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5;
    row-gap: 0;
  }

  .plan .btn {
    align-self: end;
  }
}

/* The plan with no listed price: as much a plan as the other two, with its own button. */
.bigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 1.125rem 1.125rem 1.125rem 1.25rem;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-radius: 1.25rem;
}

.bigger-name {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.bigger-size {
  font-size: 0.9375rem;
  color: var(--on-navy);
}

.btn-light {
  min-height: 3rem;
  padding: 0 1.25rem;
  background: #fff;
  color: var(--navy);
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: none;
}

.btn-light:hover,
.btn-light:active {
  background: #e8eef6;
}

/* ---- 5. What still worries him ---- */

.faq {
  background: var(--canvas);
}

.faq h2 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.faq-list {
  margin-top: 0.75rem;
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  position: relative;
  padding: 1.125rem 2.25rem 1.125rem 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

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

summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 0.25rem;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--soft);
  transform: translateY(-50%);
}

details[open] summary::after {
  content: '\2212';
}

details p {
  padding-bottom: 1.125rem;
}

/* ---- 6. The ask, again ---- */

.close {
  padding: 4rem 0 4.5rem;
  background: var(--navy);
  color: #fff;
}

.close h2 {
  color: #fff;
}

.close .ask {
  margin-top: 1.5rem;
}

/* ---- The foot ---- */

.foot {
  padding: 2rem 0 2.5rem;
  background: var(--navy-deep);
  font-size: 0.875rem;
  color: var(--on-navy);
}

.foot img {
  width: auto;
  height: 2rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.25rem 0 1rem;
}

.foot-links a {
  font-weight: 600;
  color: #fff;
  text-underline-offset: 3px;
}

.foot p + p {
  margin-top: 0.375rem;
}

/* ---- A wider screen: its own layout, not a stretched phone ---- */

@media (min-width: 56rem) {
  :root {
    --gutter: 2.5rem;
  }

  .top .wrap {
    height: 4.5rem;
  }

  .brand img {
    height: 2.75rem;
  }

  .top .top-cta,
  .top.past .lang {
    display: inline-flex;
  }

  .hero {
    padding: 4.5rem 0 7.5rem;
  }

  .hero .wrap {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
  }

  .sub {
    margin-top: 1.5rem;
    font-size: 1.3125rem;
  }

  .hero .ask {
    margin-top: 2.25rem;
  }

  .hero .hero-phone {
    display: block;
    width: 18rem;
    margin: 0 auto;
  }

  section {
    padding: 6rem 0;
  }

  .show .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 5rem;
  }

  .show h2 {
    grid-area: 2 / 1;
  }

  .tabs {
    position: static;
    grid-area: 3 / 1;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0;
    background: none;
    box-shadow: none;
  }

  .tab {
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--line);
    border-radius: 0 0.75rem 0.75rem 0;
    text-align: left;
  }

  .tab[aria-selected='true'] {
    border-left-color: var(--orange);
    background: var(--canvas);
    box-shadow: none;
  }

  .tab-name {
    display: block;
    font-size: 1.1875rem;
    color: var(--ink);
  }

  .tab-line {
    display: block;
    margin-top: 0.125rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--body);
  }

  .caption {
    display: none;
  }

  .show .phone {
    grid-area: 1 / 2 / 6 / 3;
    width: 18.5rem;
    margin: 0;
  }

  .note {
    grid-area: 4 / 1;
    margin-top: 2rem;
    text-align: left;
  }

  .calc-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    margin-top: 2.5rem;
  }

  .result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 2;
    padding: 3rem;
  }

  .rows {
    gap: 1.5rem;
    padding: 2.5rem 3rem;
  }

  .pricing .wrap,
  .faq .wrap,
  .close .wrap {
    max-width: 46rem;
  }

  .pricing,
  .close {
    text-align: center;
  }

  .plans {
    gap: 1.25rem;
    margin-top: 2.5rem;
  }

  .plan {
    padding: 2rem 1.75rem;
    text-align: left;
  }

  .plan-price {
    font-size: 4.5rem;
  }

  .bigger {
    margin-top: 1.25rem;
    padding: 1.5rem 1.75rem;
    text-align: left;
  }

  .close .ask {
    margin: 2rem auto 0;
  }

  .close .offer {
    justify-content: center;
  }

  .close .stores {
    justify-content: center;
  }
}

/* The narrowest phones: the Beta mark steps aside for the button once it is in the bar. */
@media (max-width: 23.75rem) {
  .top.past .beta {
    display: none;
  }

  .tab {
    font-size: 0.875rem;
  }
}

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

  .btn,
  .screens picture {
    transition: none;
  }
}
