/* Varlig — a quiet notebook for words and numbers. */

:root {
  color-scheme: light;
  --paper: #fdfdfb;
  --blue-paper: #edf3f7;
  --ink: #253a47;
  --muted: #536570;
  --blue: #315f80;
  --line: #d7e0e4;
  --footer: #233e50;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --section-space: clamp(64px, 8vw, 112px);
}

/* Base typography and keyboard access */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 5px;
  touch-action: manipulation;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
  border-radius: 2px;
}

svg {
  display: block;
  flex-shrink: 0;
}

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

::selection {
  color: #153951;
  background: #cbdfea;
}

.wrap {
  width: min(1120px, calc(100% - 80px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  color: white;
  background: var(--blue);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow,
.mini-label,
.closing-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Header: no hidden menu or JavaScript required */

.site-header-shell,
.opening-band {
  background: var(--blue-paper);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 94px;
  border-bottom: 1px solid #cbd8e1;
}

.brand {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 156px;
  height: 62px;
  overflow: hidden;
}

.brand img {
  position: absolute;
  width: 174px;
  max-width: none;
  height: 87px;
  top: 50%;
  left: -9px;
  transform: translateY(-50%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  color: var(--muted);
  transition: color 160ms ease;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.release-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}

.release-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Introduction */

.hero {
  padding-block: clamp(66px, 8vw, 112px) 72px;
  text-align: center;
}

.hero .eyebrow {
  margin-bottom: 27px;
  color: var(--blue);
}

.hero h1 {
  font-size: clamp(48px, 7.3vw, 96px);
  line-height: 1.03;
  letter-spacing: -0.052em;
}

.hero h1 span {
  color: var(--blue);
  font-style: italic;
}

.hero-description {
  max-width: 520px;
  margin: 28px auto 25px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  justify-content: center;
}

.explore-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid #a9bdcb;
  border-radius: 4px;
  color: var(--blue);
  background: #ffffff50;
  font-size: 14px;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.explore-link:hover {
  background: #ffffffb3;
  border-color: var(--blue);
}

.explore-link svg {
  transition: transform 160ms ease;
}

.explore-link:hover svg {
  transform: translateX(3px);
}

.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.platform svg {
  width: 14px;
  height: 14px;
}

.values-strip {
  display: flex;
  justify-content: center;
  gap: 52px;
  padding-block: 25px;
  border-top: 1px solid #cbd8e1;
  color: var(--muted);
  font-size: 12px;
}

.values-strip > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.values-strip svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.5;
}

/* Three ways to use a note */

.features,
.how-section,
.questions {
  padding-block: var(--section-space);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-heading .eyebrow {
  margin-bottom: 22px;
  color: var(--blue);
}

.section-heading > p:last-child:not(.eyebrow) {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feature-card + .feature-card {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.feature-icon {
  margin-bottom: 22px;
  color: var(--blue);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.4;
}

.feature-card > p {
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Small excerpts, rather than an app screenshot */

.mini-paper {
  flex: 1;
  min-width: 0;
  padding: 22px 18px;
  background: #f2f5f5;
  border-top: 1px solid #d1dde1;
  border-bottom: 1px solid #d1dde1;
}

.mini-label {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.calculation-sample > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-block: 10px;
  font: 12px/1.7 var(--mono);
}

.calculation-sample b {
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
}

.calculation-sample .calc-total {
  margin-top: 5px;
  border-top: 1px solid #c9d7de;
}

.calculation-sample > p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.writing-sample > strong {
  display: block;
  margin-bottom: 12px;
  font: 20px/1.35 var(--serif);
}

.writing-sample > p {
  font: 15px/1.9 var(--serif);
  color: var(--muted);
}

mark {
  padding: 1px 2px;
  color: var(--ink);
  background: #e3eacb;
}

.mini-format {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 22px;
  color: var(--blue);
  font-size: 11px;
}

.connected-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 12px;
  font-size: 11px;
}

.connected-note span {
  flex: 1;
}

.connected-note svg {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.connection-line {
  width: 1px;
  height: 16px;
  margin-left: 7px;
  background: #bbccd6;
}

/* A simple reading order */

.how-band {
  border-block: 1px solid var(--line);
  background: #f5f7f6;
}

.how-section .section-heading {
  max-width: 720px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-number {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font: italic 28px/1 var(--serif);
}

.how-steps h3 {
  font-size: 18px;
}

.how-steps p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Release note */

.closing {
  background: var(--blue-paper);
}

.closing-inner {
  padding-block: var(--section-space);
  text-align: center;
}

.closing-label {
  color: var(--blue);
}

.closing h2 {
  margin: 24px 0 26px;
}

.closing-note {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* Native disclosure controls work without JavaScript */

.questions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 80px;
}

.questions .eyebrow {
  margin-bottom: 20px;
  color: var(--blue);
}

.questions h2 {
  max-width: 300px;
  font-size: 42px;
}

.static-faq {
  border-bottom: 1px solid var(--line);
}

.static-faq:first-child {
  border-top: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding-block: 20px;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 160ms ease;
}

.faq-question:hover {
  color: var(--blue);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question > svg {
  width: 16px;
  height: 16px;
  transition: transform 180ms ease;
}

.static-faq[open] .faq-question > svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 36px 23px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Footer */

.footer-band {
  color: #f1f5f7;
  background: var(--footer);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-block: 35px 25px;
}

.footer > span {
  color: #bfced7;
  font: italic 18px/1.5 var(--serif);
}

.footer > a:last-of-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  color: #cfdae1;
  font-size: 12px;
}

.footer > a:last-of-type:hover {
  text-decoration: underline;
}

.footer a:focus-visible {
  outline-color: #e4eff6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding-top: 22px;
  border-top: 1px solid #526775;
  color: #bfced7;
  font-size: 11px;
}

/* Tablets: put each excerpt beside its explanation. */

@media (max-width: 960px) {
  .wrap {
    width: calc(100% - 64px);
  }

  .site-header {
    gap: 22px;
  }

  .nav {
    gap: 20px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .feature-card,
  .feature-card + .feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
    padding: 0 0 32px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .feature-card > .feature-icon,
  .feature-card > h3,
  .feature-card > p {
    grid-column: 1;
  }

  .feature-card > p {
    margin-bottom: 0;
  }

  .feature-card > .mini-paper {
    grid-column: 2;
    grid-row: 1 / 4;
  }

  .how-steps {
    gap: 30px;
  }

  .questions {
    grid-template-columns: minmax(0, 1fr);
    gap: 35px;
  }

  .questions h2 {
    max-width: none;
  }

  .footer > span {
    font-size: 16px;
  }
}

/* Phones: keep the navigation visible and every column fluid. */

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding-top: 6px;
  }

  .brand {
    width: 140px;
    height: 60px;
  }

  .brand img {
    width: 158px;
    height: 79px;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding-bottom: 7px;
  }

  .site-header > .release-label {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
  }

  .hero {
    padding-block: 60px 43px;
  }

  .hero .eyebrow {
    margin-bottom: 24px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: clamp(46px, 11.7vw, 68px);
    letter-spacing: -0.055em;
  }

  .hero-description {
    max-width: 360px;
    margin-top: 24px;
    font-size: 16px;
  }

  .values-strip {
    justify-content: space-between;
    gap: 12px;
    padding-block: 21px;
    font-size: 10px;
  }

  .values-strip > span {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .section-heading .eyebrow {
    font-size: 10px;
  }

  .section-heading > p:last-child:not(.eyebrow) {
    margin-top: 18px;
    font-size: 15px;
  }

  .section-heading br {
    display: none;
  }

  .feature-card,
  .feature-card + .feature-card {
    display: block;
    padding-bottom: 32px;
  }

  .feature-card:last-child {
    padding-bottom: 0;
  }

  .feature-icon {
    margin-bottom: 16px;
  }

  .feature-card > p {
    margin-bottom: 24px;
    font-size: 15px;
  }

  .mini-paper {
    padding: 24px;
  }

  .how-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .how-steps li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 14px;
  }

  .step-number {
    grid-row: 1 / 3;
    margin: 0;
    font-size: 25px;
  }

  .how-steps p {
    margin-top: 8px;
  }

  .questions h2 {
    font-size: 36px;
  }

  .faq-answer {
    padding-right: 12px;
  }

  .footer {
    gap: 18px;
    padding-block: 24px;
  }

  .footer > span {
    order: 3;
    width: 100%;
  }

  .footer > a:last-of-type {
    font-size: 11px;
  }

  .footer-bottom {
    order: 4;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media print {
  body,
  .opening-band,
  .site-header-shell,
  .how-band,
  .closing,
  .footer-band {
    color: black;
    background: white;
  }

  .nav,
  .hero-actions,
  .footer > a:last-of-type {
    display: none;
  }

  .wrap {
    width: 100%;
  }

  .features,
  .how-section,
  .questions,
  .closing-inner {
    padding-block: 32px;
  }

  .feature-card,
  .static-faq {
    break-inside: avoid;
  }
}
