/* NoteDrifter website: Download page. */

.download-page { background: #000; }
.download-main { width: min(1180px, 100%); margin: 0 auto; padding: calc(var(--header-h) + 60px) clamp(20px, 4vw, 52px) 100px; }

/* ------------------------------------------------------------------ intro */
.download-intro { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.download-eyebrow, .recommendation-eyebrow { display: block; margin: 0 0 16px; font: 400 14px/1.2 var(--display); letter-spacing: .26em; color: var(--soft); }
.download-intro h1 { margin: 0; font: 400 clamp(56px, 7.4vw, 92px)/1 var(--display); letter-spacing: -.01em; text-shadow: 0 0 18px rgba(255, 255, 255, .3); }
.download-lead { max-width: 640px; margin: 24px auto 14px; font-size: 21px; line-height: 1.55; color: var(--muted); text-wrap: balance; }
.download-platform-summary { margin: 0; font-size: 16px; letter-spacing: .14em; color: var(--soft); }

/* --------------------------------------------------------- recommendation */
.device-recommendation {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  max-width: 980px; margin: 44px auto 96px; padding: 30px 32px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
}
.device-recommendation::before { /* a slow light that travels along the top edge */
  content: ''; position: absolute; inset: 0 0 auto; height: 1px; opacity: .8;
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95) 25%, transparent 50%, rgba(255, 255, 255, .95) 75%, transparent);
  background-size: 200% 100%; animation: div-flow 7.8s linear infinite;
}
.device-recommendation-copy { min-width: 0; }
.recommendation-eyebrow { margin-bottom: 10px; font-size: 12px; }
.device-recommendation h2 { margin: 0 0 6px; font: 400 32px/1.15 var(--display); color: #fff; }
.device-recommendation p { margin: 0; font-size: 18px; line-height: 1.45; color: var(--muted); }
/* the recommendation text is rewritten once the system is known; let it settle in */
[data-recommendation-title], [data-recommendation-details] { transition: opacity .35s var(--out); }
.device-recommendation.is-checking [data-recommendation-title], .device-recommendation.is-checking [data-recommendation-details] { opacity: .55; }
.recommendation-button { flex: none; min-width: 230px; min-height: 54px; font-size: 21px; }

/* ---------------------------------------------------------------- options */
.download-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.download-section-heading .download-eyebrow { margin-bottom: 10px; }
.download-section-heading h2 { margin: 0; font: 400 clamp(36px, 4vw, 50px)/1.1 var(--display); }
.download-section-heading > p { max-width: 380px; margin: 0 0 4px; font-size: 17px; line-height: 1.5; color: var(--soft); }

.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.platform-card {
  --tilt: .3; position: relative; min-width: 0; padding: 30px 30px 26px;
  border: 1px solid var(--hairline); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
}
.platform-card:hover { border-color: rgba(255, 255, 255, .3); box-shadow: 0 24px 50px rgba(0, 0, 0, .55); }
.platform-card.is-recommended { border-color: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 0 40px rgba(255, 255, 255, .1), 0 24px 50px rgba(0, 0, 0, .55); }
.platform-card.is-recommended::before { /* chip, like the app's "Preset" tag */
  content: 'Recommended'; position: absolute; top: 28px; right: 28px; z-index: 2;
  padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; background: rgba(0, 0, 0, .55);
  font: 400 14px/1.2 var(--body); letter-spacing: .02em; color: #fff;
  animation: pop-in .7s var(--spring) backwards;
}
.platform-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding-right: 130px; }
.platform-heading > div { min-width: 0; }
/* system icons: white line art in a hairline tile, like the app's icon buttons */
.platform-icon {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none;
  border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .05);
  transition: border-color .5s, background-color .5s, box-shadow .7s var(--out), scale .9s var(--spring);
}
.platform-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.platform-card:hover .platform-icon { border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 22px rgba(255, 255, 255, .18); scale: 1.06; }
.platform-card.is-recommended .platform-icon { border-color: #fff; background: rgba(255, 255, 255, .1); box-shadow: 0 0 26px rgba(255, 255, 255, .22); }
.platform-icon svg { transition: translate .8s var(--spring); }
/* brand logos are solid shapes, not line art */
.platform-icon svg.brand-glyph { width: 24px; height: 24px; fill: #fff; stroke: none; }
.platform-card:hover .platform-icon svg { translate: 0 -1.5px; }
.platform-heading h3 { margin: 0 0 4px; font: 400 38px/1.1 var(--display); }
.platform-heading p { margin: 0; font-size: 16px; line-height: 1.35; color: var(--soft); }
.platform-description { margin: 0 0 22px; max-width: 44em; font-size: 17px; line-height: 1.55; color: var(--muted); }

.build-options { display: grid; gap: 4px; }
.build-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-inline: -14px; padding: 14px; border-radius: 14px;
  transition: background-color .45s, box-shadow .45s;
}
.build-option + .build-option { box-shadow: 0 -1px 0 var(--hairline); }
.build-option:hover { background-color: rgba(255, 255, 255, .04); }
.build-option.is-recommended { background-color: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.build-option h4 { margin: 0 0 3px; font: 400 21px/1.2 var(--display); }
.build-option p { margin: 0; font-size: 16px; color: var(--soft); }
.build-option > div { translate: 0 0; transition: translate .58s var(--out); }
.build-option:hover > div, .build-option:focus-within > div { translate: 4px 0; }

.download-button { min-height: 46px; padding: 10px 22px; font-size: 18px; white-space: nowrap; }
.download-button span { font: 400 14px/1 var(--body); letter-spacing: .03em; opacity: .62; }
.download-button::after { /* small download arrow */
  content: ''; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v9m-4-4 4 4 4-4M3 14h10' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v9m-4-4 4 4 4-4M3 14h10' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate .8s var(--spring);
}
.download-button:hover::after { translate: 0 2px; }

.linux-builds { display: grid; gap: 4px; }
.linux-build-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-width: 0;
  margin-inline: -14px; padding: 14px; border-radius: 14px; transition: background-color .45s;
}
.linux-build-row + .linux-build-row { box-shadow: 0 -1px 0 var(--hairline); }
.linux-build-row:hover { background-color: rgba(255, 255, 255, .04); }
.linux-build-row h4 { grid-column: 1 / -1; margin: 0 0 2px; font: 400 21px/1.2 var(--display); }
.linux-build-row h4 { translate: 0 0; transition: translate .58s var(--out); }
.linux-build-row:hover h4, .linux-build-row:focus-within h4 { translate: 4px 0; }
.linux-build-row .download-button, .download-button-wide { width: 100%; min-width: 0; padding-inline: 16px; gap: 8px; font-size: 17px; white-space: nowrap; }
.platform-chromebook .linux-builds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.download-button-wide { justify-content: center; }

/* notes */
.download-instruction { margin: 16px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.install-notes { margin-top: 18px; border-top: 1px solid var(--hairline); padding-top: 4px; }
.install-notes summary {
  display: flex; align-items: center; gap: 10px; width: fit-content; padding: 10px 0;
  list-style: none; cursor: pointer; font-size: 17px; color: var(--text); transition: color .4s;
}
.install-notes summary::-webkit-details-marker { display: none; }
.install-notes summary::after {
  content: ''; width: 12px; height: 12px; background: currentColor; transition: rotate .8s var(--spring);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.install-notes summary:hover { color: #fff; }
.install-notes[open] summary::after { rotate: 180deg; }
.install-notes p, .install-notes li { font-size: 16px; line-height: 1.55; color: var(--muted); }
.install-notes p { margin: 4px 0 8px; }
.install-notes[open] > p, .install-notes[open] > ul { animation: content-drift .48s var(--out); }
.install-notes ul { margin: 4px 0 6px; padding-left: 20px; }

@media (prefers-reduced-motion: reduce) {
  .build-option:hover > div, .build-option:focus-within > div,
  .linux-build-row:hover h4, .linux-build-row:focus-within h4 { translate: 0 0; }
}
.install-notes li { margin-bottom: 6px; padding-left: 4px; }
.install-notes li::marker { color: var(--soft); }
.install-notes strong { font-weight: 500; color: #fff; }
.install-notes code, .download-instruction code {
  display: inline-block; padding: 1px 7px; border: 1px solid var(--hairline); border-radius: 6px;
  background: rgba(255, 255, 255, .05); color: #fff; font: 13px/1.6 var(--mono); overflow-wrap: anywhere;
}
.download-detection-note { max-width: 980px; margin: 30px auto 0; font-size: 15px; font-style: italic; color: var(--soft); text-align: center; }

/* ------------------------------------------------------------------ narrow */
@media (max-width: 860px) {
  .platform-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .download-main { padding-top: calc(var(--header-h) + 36px); }
  .download-intro { margin-bottom: 28px; }
  .download-intro h1 { font-size: 58px; }
  .download-lead { font-size: 19px; }
  .device-recommendation { flex-direction: column; align-items: stretch; margin: 30px auto 70px; padding: 24px; }
  .recommendation-button { width: 100%; min-width: 0; }
  .download-section-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  .platform-card { padding: 24px 22px 22px; }
}
@media (max-width: 480px) {
  .download-main { padding-inline: 16px; }
  .download-intro h1 { font-size: 48px; }
  .download-platform-summary { font-size: 14px; }
  .platform-heading { padding-right: 0; }
  .platform-heading h3 { font-size: 32px; }
  .platform-card.is-recommended::before { position: static; display: inline-block; margin: 0 0 14px; }
  .build-option { flex-direction: column; align-items: stretch; }
  .download-button { width: 100%; }
  .linux-build-row, .platform-chromebook .linux-builds { grid-template-columns: 1fr; }
}
