/* Tramontana: site styles. One family (Titillium Web, from the Accademia di
   Belle Arti di Urbino), a cold clear palette, and the indicator's own green,
   red and grey used only where they mean what they mean on the chart. The
   screenshots carry the page; the type around them stays quiet. */

@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/titillium-web-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/titillium-web-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/titillium-web-latin-700-normal.woff2") format("woff2");
}

:root {
  --sky: #edf2f5;
  --ink: #142330;
  --ink-2: #4a5b68;
  --rule: #c8d4dc;
  --north: #1d4c78;
  --north-deep: #153a5d;
  --chart: #151b26;
  --gauge: #1e1e1e;
  --up: #26a65b;
  --down: #d64545;
  --flat: #828282;
  --measure: 62ch;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

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

a:hover {
  color: var(--north-deep);
}

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

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  background: var(--north);
  color: #fff;
  border-radius: 4px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
  color: #fff;
}

/* ---- Header ---- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.01em;
}

.brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}

.site-nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

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

.site-nav .wide {
  display: none;
}

@media (min-width: 860px) {
  .site-nav .wide {
    display: list-item;
  }
}

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

.hero {
  padding-block: 24px 64px;
}

@media (min-width: 980px) {
  .hero {
    padding-block: 40px 88px;
  }
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

.lead {
  font-size: 1.375rem;
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 28px 0 12px;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  background: var(--north);
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.button:hover {
  background: var(--north-deep);
  color: #fff;
}

.small {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.shot-hero {
  margin-top: 40px;
}

/* ---- Screenshots ---- */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--chart);
}

.shot-frame {
  position: relative;
}

/* Names of the parts, drawn on the hero screenshot itself. Too small to read
   on a phone, where the list under the picture takes their place. */
.shot-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
}

.shot-labels text {
  fill: var(--sky);
  font-family: "Titillium Web", system-ui, sans-serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.01em;
}

.shot figcaption {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: var(--measure);
}

.shot figcaption p {
  margin: 0;
}

.shot figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.legend {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

@media (min-width: 760px) {
  .shot-labels {
    display: block;
  }

  .legend {
    display: none;
  }
}

/* A screenshot with its caption beside it */
@media (min-width: 900px) {
  .shot-side {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 32px;
    align-items: start;
  }

  .shot-side figcaption {
    margin-top: 0;
  }
}

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

.section {
  padding: 64px 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 760px) {
  .section {
    padding: 88px 0;
  }
}

.section > .wrap > h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.5rem);
  letter-spacing: -0.005em;
  margin-bottom: 28px;
}

.section h3 {
  font-size: 1.3125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* What it shows: the score, with its zones, then four blocks */

.score-block {
  margin-bottom: 48px;
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}

.score-block p:last-child {
  margin-bottom: 0;
}

/* The zones, drawn like the gauge: dark panel, a cell per 25 points, the
   names in the colours they have on the chart. */
.zones {
  display: grid;
  gap: 1px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  background: #555;
  border: 1px solid #555;
  border-radius: 4px;
  overflow: hidden;
}

.zones li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--gauge);
}

.zone-name {
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.zone-range {
  flex: none;
  font-size: 0.9375rem;
  color: #a7b3bc;
  font-variant-numeric: tabular-nums;
}

.zones .down .zone-name {
  color: var(--down);
}

.zones .flat .zone-name {
  color: var(--flat);
}

.zones .up .zone-name {
  color: var(--up);
}

@media (min-width: 1060px) {
  .zones {
    grid-template-columns: repeat(8, 1fr);
  }

  .zones .flat {
    grid-column: span 2;
  }

  .zones li {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 14px 8px;
    text-align: center;
  }
}

.how {
  display: grid;
  gap: 36px 56px;
}

@media (min-width: 760px) {
  .how {
    grid-template-columns: 1fr 1fr;
  }
}

.how > div {
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}

.how p {
  margin-bottom: 0;
}

/* Examples */

.section h3.example-title {
  font-size: 1.5rem;
  margin: 56px 0 20px;
}

.moments {
  display: grid;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.examples-side {
  display: grid;
  gap: 48px;
}

/* Made for Renko charts */

.notes {
  display: grid;
  gap: 36px 48px;
}

@media (min-width: 900px) {
  .notes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.notes > div {
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}

.notes p {
  margin-bottom: 0;
}

/* Coming soon: the one band in the north blue */

.section.soon {
  background: var(--north);
  color: #fff;
  border-top: 0;
}

.soon p {
  color: #dce6ee;
}

.soon .button {
  background: #fff;
  color: var(--north);
}

.soon .button:hover {
  background: #dce6ee;
  color: var(--north-deep);
}

.soon :focus-visible {
  outline-color: #fff;
}

/* How to get the free version: a real sequence, so numbered */

.steps {
  display: grid;
  gap: 40px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}

.steps > li {
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  display: block;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--north);
  margin-bottom: 14px;
}

.steps .button {
  margin: 6px 0 14px;
}

.contact {
  margin: 40px 0 0;
}

/* Questions */

.faq {
  max-width: 760px;
  border-bottom: 1px solid var(--rule);
}

.faq details {
  border-top: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.1875rem;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  width: 1em;
  text-align: center;
  color: var(--north);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 20px;
}

/* About the name and the maker */

.about {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 760px) {
  .about {
    grid-template-columns: 96px 1fr;
    gap: 32px;
  }
}

.about svg {
  width: 96px;
  height: 96px;
}

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

.site-foot {
  padding: 48px 0 64px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

/* ---- Plain pages: privacy, not found ---- */

.page {
  padding-block: 32px 80px;
}

.page h1 {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  margin-bottom: 12px;
}

.page h2 {
  font-size: 1.375rem;
  margin: 40px 0 10px;
}
