/* css/info.css — area G (Home and software). Owned by area G during the build; every class
   carries the prefix .info-. Shared components come only from css/sas.css; the
   lead folds this file into its AREA G section in phase (c).

   orc.org's idiom (sassrv-api.md §5.7): flat, square, navy on periwinkle, 1px navy
   rules, the display face for headings, a navy band for what matters, no radius,
   no shadow, no gradient. The home page is a little more generous than the
   application pages (larger headings, more air), as orc.org's own pages are.

   Sections: 1 home, signed out · 2 home, signed in · 3 software · 4 phone width */


/* ==========================================================================
   1. Home, signed out (index.html #info-out)
   ========================================================================== */

.info-noscript {
  padding: 20px;
  background: var(--orc-tint);
}

/* The hero: the title, what Sailor Services is, Register and Sign in; a polar
   diagram beside it from 992 px (decoration: aria-hidden). */
.info-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 10px 0 40px;
  border-bottom: var(--orc-rule);
}

@media (min-width: 992px) {
  .info-hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 60px;
    padding: 20px 0 60px;
  }
}

.info-hero h1 {
  margin: 0 0 20px;
  font-size: 44px;
  line-height: 1;
}

@media (min-width: 768px) {
  .info-hero h1 { font-size: 64px; }
}

@media (min-width: 1280px) {
  .info-hero h1 { font-size: 80px; }
}

.info-lead {
  max-width: 36em;
  margin: 0 0 25px;
  font-size: 18px;
  line-height: 24px;
}

@media (min-width: 992px) {
  .info-lead { font-size: 22px; line-height: 30px; }
}

.info-hero-actions { margin: 0 0 20px; }

.info-btn-big {
  padding: 10px 16px;
  font-size: 18px;
  line-height: 24px;
}

@media (min-width: 768px) {
  .info-btn-big { font-size: 20px; }
}

.info-hero-note {
  max-width: 40em;
  margin: 0;
  color: var(--sas-muted);
  font-size: 14px;
  line-height: 19px;
}

/* The refit panel under the hero (js/views/refit.js, css/refit.css), while
   Sailor Services is being rebuilt. */
.info-refit { margin-top: 40px; }

/* The polar: speed rings and angle spokes, three wind speeds mirrored, as a
   speed guide draws them. */
.info-polar { display: none; }

@media (min-width: 992px) {
  .info-polar { display: block; }
}

.info-polar svg {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
}

.info-polar-grid {
  fill: none;
  stroke: var(--orc-navy);
  stroke-opacity: .16;
  stroke-width: 1;
}

.info-polar-wind {
  fill: none;
  stroke: var(--orc-navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-polar-curve {
  fill: none;
  stroke: var(--orc-navy);
  stroke-linecap: round;
}

.info-polar-6 { stroke-width: 1.25; stroke-opacity: .45; }
.info-polar-12 { stroke-width: 1.75; stroke-opacity: .7; }
.info-polar-20 { stroke-width: 2.5; }

.info-polar-label {
  fill: var(--orc-navy);
  font-family: var(--orc-font-text);
  font-size: 11px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--orc-page);
  stroke-width: 4px;
  stroke-linejoin: round;
}

/* The curves draw themselves once, unless motion is reduced (sas.css then
   stops every animation, so the dashes are set only here). */
@media (prefers-reduced-motion: no-preference) {
  .info-polar-curve path {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: info-draw 1.6s cubic-bezier(.4, 0, .2, 1) forwards;
  }

  .info-polar-12 path { animation-delay: .25s; }
  .info-polar-20 path { animation-delay: .5s; }
}

@keyframes info-draw {
  to { stroke-dashoffset: 0; }
}

/* The home notice (homeNotice: the VPP release banner), on both pages. */
.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 30px 0 0;
  padding: 15px 20px;
  border-left: 4px solid var(--orc-navy);
  background: var(--orc-white);
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
}

.info-notice p { margin: 0; }
.info-notice .icon { margin-top: 0; }

@media (min-width: 768px) {
  .info-notice { font-size: 20px; line-height: 26px; }
}

/* Sections of the home page. */
.info-section { margin-top: 60px; }

@media (min-width: 992px) {
  .info-section { margin-top: 80px; }
}

.info-section-title {
  margin: 0 0 25px;
  font-size: 28px;
  line-height: 1.15;
}

@media (min-width: 992px) {
  .info-section-title { font-size: 36px; }
}

/* What you can do: orc.org's links module - a heading on a 1px rule, a few
   lines, then the price and the action at the foot of each card. */
.info-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .info-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .info-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.info-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px;
  padding-bottom: 10px;
  border-bottom: var(--orc-rule);
  font-size: 24px;
  line-height: 1.2;
}

.info-card > p { margin: 0 0 10px; }

.info-card > .info-card-price {
  margin-top: auto;
  padding-top: 5px;
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
}

.info-card-price strong { font-weight: 500; }

.info-card-price .info-price-note {
  font-family: var(--orc-font-text);
  font-weight: 400;
  font-size: 14px;
  color: var(--sas-muted);
}

.info-card-price .info-price-note::before { content: " · "; }

.info-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 15px;
  margin-top: auto;
  padding-top: 10px;
}

.info-card-price:not([hidden]) + .info-card-actions { margin-top: 0; }

/* Numbered steps: a rule, a large figure, a heading and a line or two. */
.info-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: info-step;
}

@media (min-width: 768px) {
  .info-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .info-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .info-steps.info-steps-plain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.info-steps > li {
  min-width: 0;
  padding-top: 10px;
  border-top: var(--orc-rule);
  counter-increment: info-step;
}

.info-steps > li::before {
  content: counter(info-step);
  display: block;
  margin: 5px 0 10px;
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
}

.info-steps h3 { margin: 0 0 8px; font-size: 20px; }
.info-steps p { margin: 0 0 10px; }
.info-steps > li > :last-child { margin-bottom: 0; }

/* The navy band: credits and the prices (from /catalogue). */
.info-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px 60px;
  margin-top: 60px;
  padding: 30px 20px;
  background: var(--orc-navy);
  color: var(--orc-white);
}

@media (min-width: 768px) {
  .info-band { padding: 40px; }
}

@media (min-width: 992px) {
  .info-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 80px;
    padding: 50px;
  }
}

.info-band a:not(.btn) { color: var(--orc-white); }
.info-band a:not(.btn):hover { color: var(--orc-tint); }
.info-band .btn-row { margin-top: 25px; }
.info-band-text p { max-width: 34em; }

.info-band-prices h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.info-prices { margin: 0; }

.info-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 20px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(237, 240, 255, .5);
}

.info-price dt { min-width: 0; }

.info-price dd {
  margin: 0 0 0 auto;   /* on a line of its own when the product's name wraps: still on the right */
  text-align: right;
  white-space: nowrap;
}

.info-price dd strong {
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 20px;
}

.info-prices .info-price-note {
  display: block;
  font-size: 14px;
  line-height: 18px;
  color: rgba(255, 255, 255, .8);
  white-space: normal;
}

.info-prices .info-price-note::first-letter { text-transform: uppercase; }

.info-prices-free {
  margin: 15px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .8);
}

/* Software and data: three ruled columns. */
.info-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .info-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.info-tools h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: var(--orc-rule);
  font-size: 22px;
}

.info-tools h3 a { text-decoration: none; }
.info-tools h3 a::after { content: " →"; }
.info-tools h3 a:hover { text-decoration: underline; }
.info-tools p { margin: 0; }

/* Good to know: smaller print in three columns. */
.info-small .info-section-title { font-size: 24px; }

.info-know {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 30px;
}

@media (min-width: 768px) {
  .info-know { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.info-know h3 { margin: 0 0 5px; font-size: 18px; }
.info-know p { margin: 0; font-size: 14px; line-height: 19px; }


/* ==========================================================================
   2. Home, signed in (index.html #info-in): the dashboard
   ========================================================================== */

/* While the page finds out who is there. */
.info-waiting { max-width: 640px; margin-top: 20px; }

.info-in > h1 { margin-bottom: 0; overflow-wrap: anywhere; }
.info-in > .info-notice { margin-top: 20px; }

.info-dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 40px;
  margin-top: 30px;
}

@media (min-width: 992px) {
  .info-dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

.info-dash-section + .info-dash-section { margin-top: 40px; }

.info-dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 20px;
  padding-bottom: 5px;
  border-bottom: var(--orc-rule);
}

.info-dash-title { margin: 0; font-size: 24px; }

.info-dash-aside > * + * { margin-top: 20px; }

.info-dash-panel .btn-row { margin-top: 0; }

.info-strip .balance-strip { margin-bottom: 15px; }

/* Continue: the latest boats. */
.info-boats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-boat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 15px 0;
  border-bottom: var(--orc-rule-soft);
}

.info-boat-main {
  flex: 1 1 280px;
  min-width: 0;
}

.info-boat-name {
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.info-boat-name:hover { text-decoration: underline; }

.info-boat-meta {
  overflow-wrap: anywhere;
  margin: 3px 0 6px;
  color: var(--sas-muted);
  font-size: 14px;
  line-height: 18px;
}

/* Each item an atomic inline, so a line breaks between items ("ITA-25305"
   stays whole) and inside one only when it is longer than the line; the
   separator ends the line it is on. */
.info-boat-meta > span {
  display: inline-block;
  max-width: 100%;
}

.info-boat-meta > span:not(:last-child)::after {
  content: "·";
  padding: 0 6px;
}

.info-boat .chips { display: flex; margin: 0; }

.info-boat-next { flex: none; }

/* In progress. */
.info-progress {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-progress-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: var(--orc-rule-soft);
}

.info-progress-item > .icon { margin-top: 2px; }
.info-progress-item > div { min-width: 0; overflow-wrap: anywhere; }

.info-progress-more { margin: 10px 0 0; }

.info-progress-meta {
  margin: 2px 0 0;
  color: var(--sas-muted);
  font-size: 14px;
  line-height: 18px;
}

/* First steps, for an account with no boats: one column, the figure beside. */
.info-steps.info-steps-dash {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
}

.info-steps-dash > li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 15px;
  padding: 15px 0;
  border-top: 0;
  border-bottom: var(--orc-rule-soft);
}

.info-steps-dash > li::before {
  grid-row: 1 / span 4;
  margin: 0;
  font-size: 36px;
}

.info-steps-dash > li > * { grid-column: 2; }

/* Shortcuts. */
.info-shortcuts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-shortcuts a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--sas-control-h);
  padding: 6px 0;
  border-bottom: var(--orc-rule-soft);
  text-decoration: none;
}

.info-shortcuts li:last-child a { border-bottom: 0; }
.info-shortcuts a:hover { text-decoration: underline; }


/* ==========================================================================
   3. Software (software.html)
   ========================================================================== */

.info-sw-toc { margin: 0 0 10px; }

.info-sw-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A program: what it is on the left, the download panel on the right from
   992 px; its notes and guides below. */
.info-sw {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 40px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: var(--orc-rule);
  scroll-margin-top: 20px;
}

@media (min-width: 992px) {
  .info-sw {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    margin-top: 60px;
  }

  .info-sw-notes { grid-column: 1 / -1; }
}

@media (min-width: 1280px) {
  .info-sw-notes { grid-column: 1; }
}

/* below the page's h1 (40px from 768 px), as every other page's h2 */
.info-sw-title {
  margin: 0 0 15px;
  font-size: 24px;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .info-sw-title { font-size: 32px; }
}

.info-sw-intro {
  max-width: 40em;
  font-size: 18px;
  line-height: 25px;
}

.info-sw-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-sw-links li + li { margin-top: 8px; }

.info-sw-links a {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.info-sw-links .icon { margin-top: 1px; }

.info-sw-get { align-self: start; }

.info-sw-version {
  margin: 0 0 5px;
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 28px;
}

.info-sw-version strong { font-weight: 500; }

.info-sw-meta {
  margin: 0 0 15px;
  color: var(--sas-muted);
  font-size: 14px;
  line-height: 19px;
}

.info-sw-download { font-size: 18px; padding: 8px 14px; }

.info-sw-register { margin: 10px 0 0; font-size: 14px; }

.info-sw-messages:not(:empty) { margin-top: 15px; }
.info-sw-messages .msg { margin-bottom: 0; }

/* Release notes: the newest open, the rest behind "Earlier versions". */
.info-sw-notes { min-width: 0; }

.info-notes-title {
  margin: 10px 0 15px;
  padding-bottom: 5px;
  border-bottom: var(--orc-rule);
  font-size: 24px;
}

/* "These notes stop at…", with the changes known since: shown only when the
   installer is newer than the notes. */
.info-notes-lag {
  margin: 0 0 20px;
  padding: 8px 12px;
  border-left: 4px solid var(--sas-warn);
  background: var(--sas-warn-bg);
  color: var(--sas-warn);
}

.info-notes-lag p { margin: 0 0 5px; }

.info-notes-lag ul {
  margin: 0;
  padding-left: 1.3em;
}

.info-notes-lag li + li { margin-top: 5px; }

.info-note { margin: 0 0 20px; }

.info-note h4 {
  margin: 0 0 5px;
  font-size: 18px;
}

.info-note-date {
  margin-left: 8px;
  font-family: var(--orc-font-text);
  font-weight: 400;
  font-size: 14px;
  color: var(--sas-muted);
}

.info-note ul,
.info-guide {
  margin: 0;
  padding-left: 1.3em;
}

.info-note li + li,
.info-guide > li + li { margin-top: 5px; }

.info-note p { margin: 0 0 5px; }

.info-details {
  margin: 0 0 10px;
  border-top: var(--orc-rule-soft);
  border-bottom: var(--orc-rule-soft);
}

.info-details + .info-details { border-top: 0; }

.info-details > summary {
  display: block;
  min-height: 44px;
  padding: 10px 0 8px 26px;
  text-indent: -26px;
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.info-details > summary::-webkit-details-marker { display: none; }

.info-details > summary::before {
  content: "";
  display: inline-block;
  margin-right: 8px;
  vertical-align: -3px;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("../img/icons/chevron-down.svg") center / contain no-repeat;
  mask: url("../img/icons/chevron-down.svg") center / contain no-repeat;
  transform: rotate(-90deg);
  transition: transform .2s;
}

.info-details[open] > summary::before { transform: rotate(0); }

.info-details > summary:hover { color: var(--orc-accent); }

.info-details > :not(summary) { margin-bottom: 15px; }

.info-details .info-note:first-of-type { margin-top: 5px; }

.info-guide code {
  padding: 1px 4px;
  background: var(--orc-white);
  border: var(--orc-rule-soft);
}

.info-sw-install {
  margin-top: 60px;
  padding-top: 20px;
  border-top: var(--orc-rule);
  scroll-margin-top: 20px;
}

.info-sw-free {
  margin: 20px 0 0;
  color: var(--sas-muted);
}


/* ==========================================================================
   4. Phone width
   ========================================================================== */

@media (max-width: 575.98px) {
  .info-hero-actions .btn,
  .info-boat-next,
  .info-boat-next .btn,
  .info-sw-download { width: 100%; }

  .info-hero-actions .btn,
  .info-sw-download { justify-content: center; text-align: center; }

  .info-boat-next { flex: 1 1 100%; }

  .info-price dd { white-space: normal; }
}
