/* The homepage after launch (launch.html), on top of style.css: the Sunlight window carries Download,
   GitHub and the Homebrew line instead of the waitlist, and a section under the canvas says what
   Sunlight needs, with the email sign-up for new versions. */

/* The Sunlight window */
.hero .headline { font-size: 104px; margin-top: 18px; }
.hero .sub { max-width: none; font-size: 22px; margin-top: 14px; text-wrap: balance; }
.hero-body .mark { width: 112px; height: 112px; }
.get { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 28px 0 0; }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 22px;
  border-radius: 12px;
  border: 1.5px solid rgba(46, 35, 6, .28);
  color: var(--ink);
  font: 600 17px var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.button svg.gh { fill: currentColor; stroke: none; }
.button:hover { background: rgba(46, 35, 6, .07); border-color: rgba(46, 35, 6, .45); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); border-color: var(--ink); color: #FFC928; }
.button.primary:hover { background: #45350D; border-color: #45350D; }

.brew {
  display: flex; align-items: center; gap: 4px;
  max-width: 100%;
  margin: 16px 0 0; padding: 4px 4px 4px 16px;
  border-radius: 10px;
  background: rgba(46, 35, 6, .08);
  border: 1px solid rgba(46, 35, 6, .12);
}
.brew code {
  min-width: 0; overflow-x: auto; white-space: nowrap;
  font: 14px/1.4 var(--mono); color: var(--ink);
  user-select: all; -webkit-user-select: all;
  cursor: text;
  scrollbar-width: none;
}
.brew code span { opacity: .45; user-select: none; -webkit-user-select: none; }
.copy {
  flex: none;
  height: 30px; padding: 0 12px;
  border: 0; border-radius: 7px;
  background: transparent; color: rgba(46, 35, 6, .7);
  font: 600 13px var(--font);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.copy:hover { background: rgba(46, 35, 6, .1); color: var(--ink); }
.copy.done { color: var(--ink); }
.meta { margin: 14px 0 0; font-size: 14px; color: rgba(46, 35, 6, .62); }
.meta a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* The intro shows the buttons with the rest of the window, as the teaser does its form. */
.hero .get { transition: opacity .8s ease; }
.canvas.s1 .hero .get { opacity: 0; }

/* The narrow window, on a phone: the buttons stack, and the Homebrew line drops the prompt. */
.hero.narrow .headline { font-size: 76px; }
.hero.narrow .sub { font-size: 19px; }
.hero.narrow .mark { width: 96px; height: 96px; }
.hero.narrow .buttons { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
.hero.narrow .button { justify-content: center; }
.hero.narrow .brew { max-width: 340px; }
.hero.narrow .brew code { font-size: 12px; }

/* The requirements modal: what it needs and the two ways to run it. */
.modal {
  width: min(1120px, calc(100% - 32px)); max-height: calc(100% - 32px);
  margin: auto; padding: 28px;
  border: 1px solid var(--hair); border-radius: 22px;
  background: #18181B; color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  overscroll-behavior: contain;
}
.modal::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .22s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.modal-close {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: var(--text2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.modal h2 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.modal h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.modal p { margin: 0; color: var(--text2); text-wrap: pretty; }
.modal p + p { margin-top: 12px; }
.modal p b { color: var(--text); font-weight: 600; }
.modal a { color: var(--sun); text-underline-offset: 3px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 24px; border-radius: 16px; background: #1F1F23; border: 1px solid var(--hair); }
.card ul { margin: 0; padding: 0; list-style: none; color: var(--text2); }
.card li { position: relative; padding-left: 22px; }
.card li + li { margin-top: 8px; }
.card li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--sun);
}
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.links a { font-weight: 600; }

/* Sunlight Updates: a second drawn window on the canvas, with the email sign-up for new versions. */
.pane {
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  background: #1E1E21;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 16px 32px rgba(0, 0, 0, .45);
}
.pane.lifted { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 30px 60px rgba(0, 0, 0, .55); }
.pane-body { flex: 1; display: flex; flex-direction: column; padding: 30px 32px 18px; }
.pane h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.pane p { margin: 0; font-size: 15px; color: var(--text2); text-wrap: pretty; }
.pane .waitlist { max-width: none; margin: 20px 0 0; }
.pane .form-note { min-height: 0; }
.pane .form-note:empty { display: none; }
.pane .thanks { font-size: 14px; }
.pane .joined { background: var(--sun); color: var(--ink); }
.pane-links {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  margin: auto -32px -18px; padding: 12px 32px 14px;
  border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--text3);
}
.pane-links a { color: var(--text2); text-decoration: none; }
.pane-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pane-links span { margin-left: auto; }
.pane { transition: opacity .9s ease; }
:is(.canvas.s1, .canvas.s2) .pane { opacity: 0; }


@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
    .modal { padding: 20px; }
  .modal h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .get, .button, .copy, .modal-close, .pane { transition: none; }
  .modal[open] { animation: none; }
}
.hero.narrow .brew code span { display: none; }

/* On a phone or tablet a touch drag anywhere moves the canvas, never the page. */
@media (pointer: coarse) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .canvas { height: 100dvh; min-height: 0; touch-action: none; }
}
