/* Visigoth marketing site. Hand-written; no framework dependencies. */

:root {
  --primary: #1c58a1;
  --primary-dark: #16467f;
  --primary-light: #acc1da;
  --dark: #222;
  --hero-bg: rgb(219, 220, 229);
  --muted: #6c757d;
  --content-width: 1140px;
  --nav-height: 60px;
  --display-font: "Lobster", cursive;
  --body-font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--dark);
  line-height: 1.5;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--primary);
  transition: color 0.2s;
}

a:hover,
a:focus {
  color: var(--primary-dark);
}

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

::selection {
  color: #fff;
  background: var(--dark);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Wordmark used by the nav brand and the footer logo. */
.wordmark {
  font-family: var(--display-font);
  color: var(--primary);
}

.wordmark::first-letter {
  color: var(--primary-dark);
}

/* Accent rules under section headings. */
hr {
  border: 0;
  border-top: 3px solid var(--primary);
  width: 50px;
  margin: 1.75rem auto;
}

hr.light {
  border-top-color: #fff;
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 2px solid transparent;
  border-radius: 300px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

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

.btn-default {
  background-color: #fff;
  border-color: #fff;
  color: var(--dark);
}

.btn-default:hover,
.btn-default:focus {
  background-color: #eee;
  color: var(--dark);
}

/* ---- Navigation ------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--primary);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
}

.nav .brand {
  font-family: var(--display-font);
  font-size: 1.6rem;
  color: var(--primary-light);
  text-decoration: none;
}

.nav .brand::first-letter {
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #fff;
}

/* Hamburger toggle, shown only on narrow screens. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin-inline: auto;
  background-color: #fff;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  /* Open menu drops below the bar without changing the bar's height. */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.75rem;
    padding: 4px 1rem 1rem;
    background-color: var(--primary);
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.15);
  }

  .nav.open .nav-links {
    display: flex;
  }
}

/* ---- Hero ------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(90vh - var(--nav-height));
  padding: 4rem 1rem;
  text-align: center;
  color: var(--primary);
  background-color: var(--hero-bg);
  background-image: url("/images/app-bkg.svg");
  background-repeat: repeat;
  background-size: 400px;
}

.hero-inner {
  max-width: 900px;
}

.hero h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 4rem);
  margin: 0;
}

.hero p {
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--dark);
  margin: 0 auto 2rem;
  max-width: 700px;
}

/* ---- Sections --------------------------------------------------------- */

section {
  padding: 6rem 0;
  scroll-margin-top: var(--nav-height);
}

.section-heading {
  margin: 0;
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

/* ---- Features --------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem 1.5rem;
  margin: 3rem 0;
}

.feature {
  max-width: 400px;
  margin-inline: auto;
  text-align: center;
}

.feature img {
  width: 300px;
  height: 150px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  margin: 0 auto 1rem;
}

.feature p {
  margin-bottom: 0;
}

/* ---- Call to action --------------------------------------------------- */

.cta {
  background-color: var(--primary);
  color: #fff;
  text-align: center;
}

.cta .section-heading {
  color: #fff;
}

.cta p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Pricing ---------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 3rem;
}

@media (max-width: 767px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-window {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.08) 100%);
  border: 3px solid #666;
  border-radius: 6px;
}

.price-original {
  color: red;
  text-decoration: line-through;
  font-size: 1.5rem;
}

.price-original span {
  color: #000;
}

.price-discount {
  font-size: 4.5rem;
  line-height: 1.1;
}

.price-year {
  vertical-align: super;
  font-size: 1.5rem;
}

.price-divider {
  width: 50%;
  border-top: 1px solid #999;
  margin: 0.75rem auto 1.25rem;
}

.price-license {
  margin: 0;
}

/* ---- Footer ----------------------------------------------------------- */

.footer {
  background-color: #eee;
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.footer-brand {
  text-align: right;
}

.footer .logo {
  font-family: var(--display-font);
  font-size: 2rem;
  color: var(--primary-light);
}

.footer .logo::first-letter {
  color: var(--primary);
}

/* ---- Auxiliary pages (privacy / tos / referral) ----------------------- */

.aux {
  max-width: 800px;
  margin-inline: auto;
  padding: 3rem 1rem 4rem;
}

.aux-title {
  font-family: var(--display-font);
  font-weight: 400;
  color: var(--primary);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 0;
}

.tos-code {
  background: #eee;
  border: 1px solid #ccc;
  padding: 1.25rem;
}

/* ---- Scroll reveal ---------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
