/* ==========================================================================
   Nimbus Notes — one page
   Type scale: 1.25 ratio (13 / 15 / 16 / 20 / 25 / 31 / 39 / 49)
   Spacing scale: 4px base (4 8 12 16 24 32 48 64 96)
   Palette: ink navy, cloud blue, sky tints, paper white
   ========================================================================== */

:root {
  /* colour */
  --ink: #182642;
  --ink-soft: #45536e;
  --blue: #2e5be6;
  --blue-deep: #1e3fae;
  --blue-soft: #7fa6f5;
  --sky: #e8f0fe;
  --sky-deep: #dce7fb;
  --line: #d8e1f0;
  --paper: #ffffff;
  --mist: #f5f8fd;

  /* type scale (1.25) */
  --t-1: 0.8125rem;
  --t-2: 0.9375rem;
  --t-3: 1rem;
  --t-4: 1.25rem;
  --t-5: 1.5625rem;
  --t-6: 1.953rem;
  --t-7: 2.441rem;
  --t-8: 3.052rem;

  /* spacing scale (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 999px;

  --topbar-h: 64px;
  --shadow-card: 0 10px 30px rgba(24, 38, 66, 0.1);
  --shadow-lift: 0 14px 34px rgba(24, 38, 66, 0.14);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--s-4));
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-3);
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}

p {
  margin: 0;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: var(--sky-deep);
  color: var(--ink);
}

/* visible keyboard focus, everywhere */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top 0.15s ease;
}

.skip-link:focus-visible {
  top: var(--s-2);
  outline-color: var(--blue-soft);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(24, 38, 66, 0.07);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: var(--topbar-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__name {
  font-size: var(--t-4);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand:hover .brand__mark {
  transform: translateY(-1px);
}

.brand__mark {
  transition: transform 0.15s ease;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.nav__link {
  display: inline-block;
  padding: var(--s-1) var(--s-1);
  font-size: var(--t-2);
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  transition: color 0.15s ease;
}

.nav__link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* menu button (mobile only) */
.menu-btn {
  display: none;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  font: inherit;
  font-size: var(--t-2);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.menu-btn:hover {
  border-color: var(--blue-soft);
  background: var(--mist);
}

.menu-btn__icon {
  width: 20px;
  height: 20px;
}

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

.hero {
  padding-block: var(--s-8) var(--s-9);
  background:
    radial-gradient(52rem 30rem at 85% -10%, var(--sky) 0%, rgba(232, 240, 254, 0) 60%),
    var(--mist);
}

.hero__grid {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}

.eyebrow {
  font-size: var(--t-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s-4);
}

.hero__title {
  font-size: clamp(var(--t-7), 1.9rem + 1.6vw, var(--t-8));
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 14ch;
  margin-bottom: var(--s-5);
}

.hero__subhead {
  font-size: var(--t-4);
  line-height: 1.55;
  max-width: 46ch;
  margin-bottom: var(--s-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__art {
  width: 100%;
  max-width: 560px;
  height: auto;
}

/* ---------- buttons & text links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-3) var(--s-5);
  font: inherit;
  font-size: var(--t-3);
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(46, 91, 230, 0.28);
}

.btn--primary:hover {
  background: var(--blue-deep);
  box-shadow: 0 8px 20px rgba(46, 91, 230, 0.34);
}

.btn--ghost {
  background: var(--paper);
  color: var(--blue);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--blue);
  background: var(--sky);
}

.text-link {
  display: inline-block;
  font-size: var(--t-3);
  font-weight: 600;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--blue-deep);
}

/* ---------- sections (shared) ---------- */

.section-title {
  font-size: clamp(var(--t-6), 1.4rem + 0.8vw, var(--t-7));
  letter-spacing: -0.015em;
  margin-bottom: var(--s-3);
}

.section-lede {
  font-size: var(--t-4);
  max-width: 52ch;
  margin-bottom: var(--s-7);
}

/* ---------- features ---------- */

.features {
  background: var(--paper);
  padding-block: var(--s-9);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.feature {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-card);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--sky);
  margin-bottom: var(--s-5);
}

.feature__icon svg {
  width: 30px;
  height: 30px;
}

.feature__title {
  font-size: var(--t-5);
  margin-bottom: var(--s-3);
}

.feature__copy {
  font-size: var(--t-3);
}

/* ---------- pricing ---------- */

.pricing {
  background: var(--mist);
  padding-block: var(--s-9);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  align-items: stretch;
}

.tier {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}

.tier--featured {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-lift);
  position: relative;
}

.tier__badge {
  position: absolute;
  top: calc(-1 * var(--s-3) - 1px);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--s-1) var(--s-4);
  background: var(--blue);
  color: #fff;
  font-size: var(--t-1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.tier__name {
  font-size: var(--t-5);
}

.tier__tagline {
  font-size: var(--t-2);
  margin-top: var(--s-1);
  margin-bottom: var(--s-5);
}

.tier__price {
  margin-bottom: var(--s-5);
}

.tier__amount {
  font-size: var(--t-7);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tier__period {
  font-size: var(--t-2);
  color: var(--ink-soft);
}

.tier__list {
  margin-bottom: var(--s-6);
}

.tier__list li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-2);
  font-size: var(--t-3);
}

.tier__list li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23DCE7FB'/%3E%3Cpath d='M6 10.2l2.6 2.6 5.4-5.6' fill='none' stroke='%232E5BE6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.tier__btn {
  margin-top: auto;
  width: 100%;
}

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

.footer {
  background: var(--ink);
  padding-block: var(--s-6);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.footer__copyright {
  font-size: var(--t-2);
  color: #c9d6ec;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
}

.footer__link {
  font-size: var(--t-2);
  font-weight: 600;
  color: #afc2e4;
  border-radius: var(--r-sm);
  transition: color 0.15s ease;
}

.footer__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--s-6);
  z-index: 90;
  max-width: min(92vw, 440px);
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: #fff;
  font-size: var(--t-2);
  font-weight: 500;
  text-align: center;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translate(-50%, var(--s-3));
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--s-8);
  }

  .tier--featured {
    transform: translateY(-var(--s-4));
  }
}

@media (max-width: 900px) {
  .features__grid,
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .feature,
  .tier {
    padding: var(--s-5);
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 56px;
  }

  .hero {
    padding-block: var(--s-7) var(--s-8);
  }

  .hero__subhead {
    font-size: var(--t-3);
  }

  .hero__actions {
    gap: var(--s-4);
  }

  .hero__art {
    max-width: 440px;
  }

  .features,
  .pricing {
    padding-block: var(--s-8);
  }

  /* collapse the nav into a dropdown panel */
  .menu-btn {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(24, 38, 66, 0.1);
  }

  .nav.is-open {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-3) var(--s-4) var(--s-4);
  }

  .nav__link {
    display: block;
    padding: var(--s-3) var(--s-3);
    font-size: var(--t-3);
    border-radius: var(--r-sm);
  }

  .nav__link:hover {
    background: var(--sky);
    text-decoration: none;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
