/* ============================================================
   Nimbus Notes — landing page
   Palette: warm paper + ink + a single cloud blue
   Type scale: 1.25 (major third) · Spacing scale: 1.5 ratio
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* colour */
  --paper:        #f5f3ee;
  --surface:      #ffffff;
  --tint:         #dfe7fb;
  --tint-deep:    #c9d6f6;
  --line:         #e2ded6;
  --line-strong:  #cfc9bd;

  --ink:          #171a21;   /* 15.7:1 on paper */
  --body:         #3f4652;   /*  8.6:1 on paper */
  --muted:        #5b6472;   /*  5.4:1 on paper */

  --accent:       #2b57c4;   /* 5.8:1 on paper, 6.4:1 with white text */
  --accent-strong:#1f4096;
  --accent-ink:   #243a6b;   /* 9.0:1 on tint */

  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.8rem;
  --step-0:  1rem;
  --step-1:  1.25rem;
  --step-2:  1.5625rem;
  --step-3:  1.953rem;
  --step-4:  2.441rem;
  --step-5:  3.052rem;

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-body:  1.65;

  /* spacing */
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1.25rem;
  --s-4: 1.875rem;
  --s-5: 2.75rem;
  --s-6: 4rem;
  --s-7: 6rem;

  /* radius + misc */
  --r-1: 4px;
  --r-2: 10px;
  --r-3: 18px;
  --r-pill: 999px;
  --header-h: 68px;
  --shell-max: 1140px;
  --pad-inline: clamp(1.15rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }

/* ---------- shared utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

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

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: 20;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-2);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: var(--s-3); }

/* focus ring: accent outline separated from the element by a paper halo */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--paper);
  border-radius: var(--r-1);
}

/* landmarks used as scroll targets keep no visible ring (they are not interactive) */
main[tabindex="-1"]:focus,
section[tabindex="-1"]:focus,
main[tabindex="-1"]:focus-visible,
section[tabindex="-1"]:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ---------- buttons + text links ---------- */
.btn {
  display: inline-block;
  font: inherit;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  border-radius: var(--r-2);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease),
              transform .18s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(31, 64, 150, .65);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-2px);
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
.textlink:hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent);
}
.textlink__arrow { width: 1.1em; height: 1.1em; }
.textlink__arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s var(--ease);
}
.textlink:hover .textlink__arrow { transform: translateX(3px); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- 1. top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 243, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.topbar.is-scrolled {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px -18px rgba(23, 26, 33, .55);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color .18s var(--ease);
}
.brand:hover { color: var(--accent-strong); }

.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__cloud { fill: var(--accent); }
.brand__spark {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: .55;
}
.brand:hover .brand__spark { opacity: 1; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav__link {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-pill);
  color: var(--body);
  font-size: var(--step-0);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease);
}
.nav__link:hover {
  color: var(--accent-strong);
  background: var(--tint);
}
.nav__link.is-active {
  color: var(--accent-ink);
  background: var(--tint);
  border-color: var(--tint-deep);
  font-weight: 600;
}

/* ---------- sections ---------- */
section {
  scroll-margin-top: calc(var(--header-h) + var(--s-3));
  padding-block: var(--s-6);
}

.section__head {
  max-width: 46rem;
  margin-bottom: var(--s-5);
}
.section__head h2 { font-size: var(--step-3); }
.section__lede {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* ---------- 2. hero ---------- */
.hero {
  padding-block: var(--s-6) var(--s-7);
  background:
    radial-gradient(120% 90% at 82% 8%, var(--tint) 0%, rgba(223, 231, 251, 0) 62%),
    var(--paper);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--s-5);
}

.hero__title {
  font-size: var(--step-4);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-top: var(--s-2);
  max-width: 20ch;
}
.hero__lede {
  margin-top: var(--s-3);
  font-size: var(--step-1);
  color: var(--body);
  max-width: 42ch;
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.hero__facts li { display: flex; flex-direction: column; gap: 0.15rem; }
.fact__num {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.fact__label {
  font-size: var(--step--1);
  color: var(--muted);
  max-width: 16ch;
}

.hero__art { min-width: 0; }
.art { width: 100%; height: auto; display: block; }

/* hero illustration */
.art__cloud { fill: var(--tint); }
.art__screen { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.art__chrome { fill: var(--paper); }
.art__dot { fill: var(--line-strong); }
.art__url { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.art__urltext { font-size: 11px; fill: var(--muted); }
.art__sidebar { fill: var(--paper); }
.art__sideitem { fill: var(--line-strong); }
.art__sideitem--active { fill: var(--tint); }
.art__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  fill: var(--ink);
}
.art__title--small { font-size: 13px; }
.art__meta { font-size: 11px; fill: var(--muted); }
.art__line { fill: var(--line); }
.art__line--mark { fill: var(--tint-deep); }
.art__caret { fill: var(--accent); }
.art__box { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.art__check { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art__tag { fill: var(--tint); }
.art__tagtext { font-size: 11px; fill: var(--accent-ink); }
.art__phonebody { fill: var(--ink); }
.art__phonescreen { fill: var(--surface); }
.art__notch { fill: var(--ink); }
.art__chip { fill: var(--tint); }
.art__chiptext { font-size: 11px; font-weight: 600; fill: var(--accent-ink); }
.art__chipdot { fill: var(--accent); }
.art__node { fill: var(--accent); }
.art__badgedisc { fill: var(--accent); }
.art__badgeglyph {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art__arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 7 9;
  opacity: .9;
  animation: art-flow 1.9s linear infinite;
}
.art__arc--b { animation-duration: 2.6s; }

@keyframes art-flow { to { stroke-dashoffset: -32; } }

/* ---------- 3. features ---------- */
.features { border-top: 1px solid var(--line); }

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.feature:hover {
  border-color: var(--tint-deep);
  box-shadow: 0 16px 34px -24px rgba(23, 26, 33, .5);
  transform: translateY(-3px);
}

.feature__icon {
  width: 44px;
  height: 44px;
  padding: 6px;
  border-radius: var(--r-2);
  background: var(--tint);
  margin-bottom: var(--s-3);
}
.feature__icon path,
.feature__icon rect,
.feature__icon circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature__title { font-size: var(--step-1); }
.feature__copy { margin-top: var(--s-2); color: var(--body); }

/* ---------- 4. pricing ---------- */
.pricing {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 38%);
}

.pricing__status {
  min-height: 1.6em;
  margin-bottom: var(--s-4);
  font-size: var(--step-0);
  color: var(--muted);
}
.pricing__status.is-set {
  color: var(--accent-ink);
  font-weight: 600;
}

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  align-items: start;
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.tier:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 38px -26px rgba(23, 26, 33, .55);
}

.tier--featured {
  border: 2px solid var(--accent);
  box-shadow: 0 22px 46px -28px rgba(31, 64, 150, .55);
}
.tier--featured:hover { border-color: var(--accent-strong); }

.tier__badge {
  align-self: flex-start;
  margin-bottom: calc(-1 * var(--s-1));
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tier__name { font-size: var(--step-2); }

.tier__price { display: flex; align-items: baseline; gap: 0.5rem; }
.tier__amount {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.tier__per { font-size: var(--step--1); color: var(--muted); }

.tier__blurb { color: var(--muted); font-size: var(--step-0); }

.tier__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
}
.tier__list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: var(--step-0);
  color: var(--body);
}
.tier__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--tint);
}
.tier__list li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

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

/* ---------- 5. footer ---------- */
.footer {
  background: var(--ink);
  color: var(--tint-deep);
  padding-block: var(--s-5);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--paper);
}
.brand__mark--footer { width: 26px; height: 26px; }
.brand__mark--footer .brand__cloud { fill: var(--tint-deep); }
.brand__mark--footer .brand__spark { stroke: var(--tint-deep); }

.footer__copy { font-size: var(--step--1); color: var(--tint-deep); }

.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}
.footer__link {
  color: var(--tint-deep);
  font-size: var(--step-0);
  text-decoration: underline;
  text-decoration-color: rgba(201, 214, 246, .45);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
.footer__link:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}
.footer :where(a, button):focus-visible {
  outline-color: var(--tint-deep);
  box-shadow: 0 0 0 5px var(--ink);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { gap: var(--s-4); }
  .hero__title { max-width: 26ch; }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s-6); }
  .hero__title { font-size: var(--step-5); }
  .features__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pricing__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier--featured { transform: translateY(-10px); }
  .tier--featured:hover { transform: translateY(-14px); }
  section { padding-block: var(--s-7); }
  .hero { padding-block: var(--s-7) var(--s-7); }
}

/* narrow: the top bar reflows — brand row, then a full-width nav row */
@media (max-width: 620px) {
  :root { --header-h: 112px; }
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
    padding-block: 0.75rem;
  }
  .brand { justify-content: flex-start; }
  .nav__list { gap: 0.3rem; }
  .nav__list li { flex: 1 1 0; min-width: 0; }
  .nav__link {
    display: block;
    text-align: center;
    padding: 0.5rem 0.6rem;
    font-size: var(--step--1);
  }
  .hero { padding-block: var(--s-5) var(--s-6); }
  .hero__title { font-size: var(--step-3); }
  .hero__facts { gap: var(--s-2) var(--s-4); }
  .hero__actions { gap: var(--s-2); }
  .btn { padding: 0.8rem 1.15rem; }
  .tier--featured { transform: none; }
  .footer__inner { gap: var(--s-2); }
}

@media (max-width: 380px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .textlink { justify-content: center; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .art__arc { animation: none; }
  .btn:hover, .feature:hover, .tier--featured:hover { transform: none; }
}
