/*
 * Raven Hosting, in Homebase's look (homebase.id): Montserrat, Montserrat Alternates headings, the green, slate and
 * purple gradient, purple and teal pill buttons. The fonts are served from here; nothing loads from anyone else.
 */

@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat Alternates";
  src: url("fonts/MontserratAlternates-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat Alternates";
  src: url("fonts/MontserratAlternates-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --purple: #603e90;
  --purple-tint: #f3eff8;
  --teal: #2e7b85;
  --green: #00966d;
  --green-tint: #e3f4ee;
  --slate: #486a92;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --page: #f8f8fb;
  --gradient: linear-gradient(120deg, #00976e 0%, #486a92 48%, #603e91 100%);

  --heading: "Montserrat Alternates", Montserrat, sans-serif;
  --body: Montserrat, system-ui, sans-serif;

  --radius: 0.375rem;
  --measure: 46rem;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem / 1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

.frame {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* The header: Homebase's gradient, white type */

.site-header {
  background: var(--gradient);
  color: #fff;
  padding: 1.5rem 0 2.25rem;
}

.site-header.lead {
  padding-bottom: 3.5rem;
}

/* The name on the left; who is signed in, or "Sign in", on the right */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font: 700 1.25rem / 1 var(--heading);
  text-decoration: none;
}

.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
}

.account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.account form {
  margin: 0;
}

.account .avatar {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 50%;
  object-fit: cover;
  background: rgb(255 255 255 / 0.2);
}

/* The name over the identity; the identity alone, as bold, when there is no name */
.account .who-am-i {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.account .name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account .identity {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account .name + .identity {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
}

.account .button,
.account button {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

.intro {
  max-width: 38rem;
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgb(255 255 255 / 0.92);
}

.site-header .actions {
  margin-top: 1.75rem;
}

h1 {
  margin: 0 0 1.25rem;
  font: 700 2.25rem / 1.15 var(--heading);
}

@media (min-width: 48rem) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  margin: 0 0 0.35rem;
  font: 700 1.3rem / 1.25 var(--heading);
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

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

/* The four steps, a real sequence */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.75);
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.45rem;
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 50%;
  font-weight: 600;
}

.steps li.done {
  color: #fff;
}

.steps li[aria-current] {
  color: #fff;
  font-weight: 700;
}

.steps li[aria-current]::before {
  background: #fff;
  border-color: #fff;
  color: var(--purple);
}

/* main.frame, not main: .frame's own padding would otherwise win */
main.frame {
  flex: 1;
  width: 100%;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.section-heading {
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

/* The footer: the terms, the privacy policy, reporting */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.875rem;
}

.site-footer .frame {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--muted);
}

/* Long text: the terms and the privacy policy */

.prose {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.prose h2 {
  margin: 2rem 0 0.5rem;
}

.prose h3 {
  margin: 1.25rem 0 0.35rem;
  font: 600 1.05rem / 1.3 var(--body);
}

.prose ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Panels */

.card {
  margin: 0 0 1rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.who {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.who strong {
  color: var(--ink);
}

/*
 * Plans. On a phone or tablet, rows: the storage figure on the left, the rest beside it. On a desktop, columns side
 * by side, their parts lined up across plans (subgrid), so they compare at a glance. Every card has the same six
 * parts in the same order: storage, name, description, what it gives, prices, and the button (or "Your plan").
 */

.plans {
  margin: 0 0 2rem;
  padding: 0.75rem 0 0;
  list-style: none;
}

.plans .card {
  display: grid;
  grid-template-columns: 9rem 1fr;
  column-gap: 1.5rem;
  align-items: start;
}

.plans .card > * {
  grid-column: 2;
}

.plans .card > .storage {
  grid-column: 1;
  grid-row: 1 / span 6;
}

.plans .card > .description:empty {
  display: none;
}

/* The last part: how it compares with what the owner has now, then the button or "Your plan" */
.choice .badge {
  margin: 0;
}

.fit {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.fit.more {
  color: var(--green);
}

.plans .card.current {
  border: 2px solid var(--purple);
  background: var(--purple-tint);
}

/* The plan to suggest: outlined in green, labelled on its top edge, outside the card's parts so they stay lined up */
.plans .card.recommended {
  position: relative;
  border: 2px solid var(--green);
  box-shadow: 0 0.5rem 1.5rem rgb(0 150 109 / 0.12);
}

.plans .card.recommended::before {
  content: "Recommended";
  position: absolute;
  top: -0.75rem;
  left: 1.25rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2rem;
}

.plans .card.recommended .choice .button {
  border-color: var(--green);
  background: var(--green);
}

.plans .card.recommended .choice .button:hover {
  border-color: #007a59;
  background: #007a59;
}

.frame.wide {
  max-width: 76rem;
}

@media (min-width: 64rem) {
  .plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
  }

  .plans .card {
    grid-template-columns: none;
    grid-template-rows: subgrid;
    grid-row: span 6;
    row-gap: 0.5rem;
    margin: 0;
  }

  .plans .card > *,
  .plans .card > .storage {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }

  .plans .card > .description:empty {
    display: block;
  }

  .plans .card > .choice {
    align-self: end;
    margin-top: 0.75rem;
  }

  /* "Your plan" as big as the buttons beside it, so the row stays level; outlined, as it is not one */
  .choice .badge {
    padding: calc(0.8rem - 1px) 1.5rem;
    border: 2px solid var(--purple);
    background: transparent;
    color: var(--purple);
    font-size: 1rem;
    line-height: 1.2;
  }
}

.storage {
  margin: 0;
  color: var(--purple);
  font: 700 2.5rem / 1 var(--heading);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 36rem) {
  .plans .card {
    grid-template-columns: 1fr;
  }

  .plans .card > *,
  .plans .card > .storage {
    grid-column: 1;
    grid-row: auto;
  }

  .storage {
    margin-bottom: 1rem;
  }
}

/* What a plan gives and costs */

.gives {
  margin: 0.25rem 0 0.75rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

/* Ticked when the plan has it, with what it is under it; dashed and faded when it does not */
.gives .has,
.gives .lacks {
  position: relative;
  padding: 0.1rem 0 0.1rem 1.4rem;
}

.gives .has {
  color: var(--ink);
}

.gives .has::before,
.gives .lacks::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.gives .has::before {
  content: "✓";
  color: var(--green);
}

.gives .lacks {
  opacity: 0.55;
}

.gives .lacks::before {
  content: "–";
}

.explain {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

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

.prices {
  margin: 0.5rem 0 1rem;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.prices li {
  padding: 0.1rem 0;
}

.price {
  font-weight: 700;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.save {
  margin-left: 0.45rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* How to pay */

.terms fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.terms legend {
  margin-bottom: 0.75rem;
  font: 700 1.3rem / 1.25 var(--heading);
}

.terms label {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0 0 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.terms label:has(input:checked) {
  border-color: var(--purple);
  background: var(--purple-tint);
}

.terms input {
  accent-color: var(--purple);
}

/* Forms: sign-in, the report, the test checkout */

.banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid #f1d38a;
  border-radius: var(--radius);
  background: #fff7e0;
  color: #6b4d00;
}

.checkout label,
.form label,
.sign-in label {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.checkout input,
.form input,
.form textarea,
.sign-in input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.form label,
.sign-in label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.form textarea {
  resize: vertical;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.problem {
  padding: 0.7rem 0.9rem;
  border-left: 3px solid #b42318;
  background: #fef3f2;
  color: #912018;
  font-weight: 500;
}

.checkout .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Pill buttons, as on homebase.id */

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

button,
.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--purple);
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: 600 1rem / 1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

button:hover,
.button:hover {
  background: rgb(96 62 144 / 0.85);
}

button.secondary,
button:disabled,
button:disabled:hover {
  border-color: var(--line);
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

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

button.secondary:hover,
.button.secondary:hover {
  border-color: var(--muted);
}

/* On the gradient: white, solid for the main thing, outlined for the rest */
.button.light {
  background: #fff;
  border-color: #fff;
  color: var(--purple);
}

.button.light:hover {
  background: rgb(255 255 255 / 0.88);
}

button.on-dark,
.button.on-dark {
  background: transparent;
  border-color: rgb(255 255 255 / 0.7);
  color: #fff;
}

button.on-dark:hover,
.button.on-dark:hover {
  background: rgb(255 255 255 / 0.12);
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Teal does not show on the gradient */
.site-header :focus-visible {
  outline-color: #fff;
}

/* What the owner has now, as their host says */

.now {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.now h2 {
  margin-bottom: 0.75rem;
}

.usage {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.meter {
  height: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.meter span {
  display: block;
  height: 100%;
  background: var(--purple);
}

.meter span.full {
  background: #b42318;
}
