/* The front page and the guide. Colours, type and buttons come from app.css; this file is their layout. */
.home-wrap { max-width: 1440px; margin: 0 auto; padding: 0 60px; }
.home-page .mast { padding: 0 56px; min-height: 80px; }
.home-page .mast .wordmark { font-size: 28px; }
.home-page .mast .wordmark svg { width: 32px; height: 32px; }
.mast-links { margin-left: auto; display: flex; align-items: center; gap: 30px; }

/* ---- first screen ------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; background: var(--ink) url(/static/hardware-hero.jpg) right center / cover no-repeat; color: var(--on-ink); }
.hero::before { content: ""; position: absolute; inset: 0;
                background: linear-gradient(90deg, rgba(9, 11, 16, .94) 0%, rgba(9, 11, 16, .75) 32%, rgba(9, 11, 16, 0) 66%); }
.hero .home-wrap { position: relative; min-height: 557px; padding-top: 59px; padding-bottom: 80px; }
.hero .service { display: flex; align-items: center; gap: 12px; }
.hero .service i { width: 26px; height: 2px; background: var(--on-ink-accent); }
.hero .service .eyebrow { font-size: 12px; color: var(--on-ink-accent); white-space: pre; }
.hero h1 { margin: 26px 0 0 -5px; font-size: clamp(56px, 7vw, 100px); font-weight: 500; letter-spacing: -.052em; line-height: 1.02; }
.hero h1 span { display: block; }
.hero .lead { margin-top: 32px; max-width: 26em; font-size: 19px; line-height: 28px; color: var(--on-ink-2); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 17px; margin-top: 40px; }
.hero .fine { font-size: 14px; color: var(--on-ink-2); }
.hero-photo { display: none; }
:lang(zh) .hero h1, :lang(ja) .hero h1 { letter-spacing: -.03em; line-height: 1.12; }

/* ---- what the service is, in five words ------------------------------------------ */
.specs { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.spec { min-width: 0; }
.spec .value { margin-top: 8px; font-size: 16px; font-weight: 500; }

/* ---- what it costs --------------------------------------------------------------- */
.plans { padding: 30px 0 8px; display: flex; flex-direction: column; gap: 16px; }
.plan { display: grid; grid-template-columns: minmax(260px, 38%) minmax(0, 1fr) auto; align-items: center;
        background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 25px 56px 30px 24px; }
.plan .cost .model { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.plan .cost .amount { margin: 12px 0 0 -2px; font-size: 53px; font-weight: 500; letter-spacing: -.052em; line-height: 1.02;
                      font-variant-numeric: tabular-nums; }
.plan .cost .per { margin-top: 24px; font-size: 15px; color: var(--text-2); }
.plan .what { align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--border);
              padding: 6px 32px 6px 34px; }
.plan .what h2 { font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.plan .what p { margin-top: 14px; font-size: 16px; line-height: 24px; color: var(--text-2); max-width: 30em; }
.plan .what .credit { margin-top: 12px; font-size: 14px; color: var(--ok); }
:lang(zh) .plan .cost .amount, :lang(ja) .plan .cost .amount { letter-spacing: -.02em; }

/* ---- the rest of the page: how it goes, and what to know first --------------------- */
.band { padding: 60px 0 8px; }
.band > .eyebrow { display: block; margin-bottom: 14px; }
.band > h2 { font-size: 30px; font-weight: 500; letter-spacing: -.035em; margin-bottom: 28px; }
:lang(zh) .band > h2, :lang(ja) .band > h2 { letter-spacing: 0; font-size: 26px; }

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step;
        background: var(--surface); border: 1px solid var(--border); }
.flow li { counter-increment: step; padding: 22px 24px 26px; border-left: 1px solid var(--border); }
.flow li:first-child { border-left: 0; }
.flow li::before { content: "0" counter(step); display: block; margin-bottom: 18px; font-family: var(--mono); font-size: 11px; font-weight: 500;
                   letter-spacing: .05em; color: var(--accent); }
.flow h3 { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.flow p { color: var(--text-2); line-height: 1.6; }

.know { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px;
        border-top: 1px solid var(--border); }
.know li { padding: 20px 0 22px; border-bottom: 1px solid var(--border); }
.know h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.know p { color: var(--text-2); line-height: 1.6; }

.home-foot { margin-top: 56px; padding: 26px 0 40px; color: var(--text-2); font-size: 13px; }
.home-foot .foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.home-foot .foot-row .eyebrow { margin-right: auto; }
.home-foot a { color: var(--text-2); text-decoration: none; }
.home-foot a:hover { color: var(--text); }
.home-foot .sep { color: var(--border-strong); }
.home-foot .marks { margin-top: 14px; color: var(--text-3); font-size: 12px; }

/* ---- the guide -------------------------------------------------------------------- */
.guide-page .home-wrap { max-width: 1160px; padding: 0 54px; }
.guide-head { padding: 35px 0 46px; }
.guide-head h1 { margin-top: 20px; font-size: clamp(34px, 4vw, 44px); font-weight: 500; letter-spacing: -.045em; line-height: 1.1; }
.guide-head p { margin-top: 18px; font-size: 16px; color: var(--text-2); }
:lang(zh) .guide-head h1, :lang(ja) .guide-head h1 { letter-spacing: -.01em; }
.guide-body { display: grid; grid-template-columns: 269px minmax(0, 1fr); gap: 28px; align-items: start; }
.guide-toc { position: sticky; top: 104px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
             padding: 20px 20px 24px; display: flex; flex-direction: column; }
.guide-toc .eyebrow { margin-bottom: 22px; }
.guide-toc a { padding: 8px 0; color: var(--text); text-decoration: none; font-size: 14px; line-height: 18px; }
.guide-toc a:hover { color: var(--accent); }
.guide-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 28px 30px; min-width: 0; }
.guide-article section { padding: 24px 0 28px; border-top: 1px solid var(--border); scroll-margin-top: 104px; }
.guide-article section:first-child { border-top: 0; }
.guide-article h2 { font-size: 26px; font-weight: 500; letter-spacing: -.035em; margin-bottom: 14px; }
:lang(zh) .guide-article h2, :lang(ja) .guide-article h2 { letter-spacing: 0; font-size: 22px; }
.guide-article p { margin: 10px 0; line-height: 1.75; max-width: 46em; }
.guide-article ul { margin: 10px 0; padding-left: 22px; line-height: 1.75; max-width: 46em; }
.guide-article li + li { margin-top: 6px; }
.guide-code { margin: 12px 0; padding: 14px 18px; background: var(--ink); color: #e6edf3; border-radius: var(--radius-sm);
              font-family: var(--mono); font-size: 14px; overflow-x: auto; }

/* ---- narrow windows ----------------------------------------------------------------- */
@media (max-width: 1000px) {
  .plan { grid-template-columns: 1fr; padding: 24px 24px 26px 22px; gap: 22px; }
  .plan .what { border-left: 0; border-top: 1px solid var(--border); padding: 22px 0 0; }
  .plan > .btn { justify-self: start; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(odd) { border-left: 0; }
  .flow li:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .guide-body { grid-template-columns: 1fr; }
  .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0 22px; padding: 16px 20px; }
  .guide-toc .eyebrow { width: 100%; margin-bottom: 8px; }
}
@media (max-width: 720px) {
  .home-wrap, .guide-page .home-wrap { padding: 0 22px; }
  .home-page .mast { padding: 0 22px; min-height: 67px; }
  .mast-links { gap: 18px; }
  .mast-links .guide-link { display: none; }                 /* the page and its foot have it too */
  .hero { background-image: none; }
  .hero::before { display: none; }
  .hero .home-wrap { min-height: 0; padding-top: 26px; padding-bottom: 26px; }
  .hero .service i { display: none; }
  .hero h1 { margin: 12px 0 0 -2px; font-size: clamp(44px, 14.5vw, 60px); line-height: 1.08; }
  .hero .lead { margin-top: 16px; font-size: 16px; line-height: 24px; }
  .hero .actions { margin-top: 24px; }
  .hero-photo { display: block; position: relative; height: 175px;
                background: var(--ink) url(/static/hardware-hero.jpg) 78% center / cover no-repeat; }
  .specs { flex-direction: column; gap: 0; padding: 4px 0 0; border-bottom: 0; }
  .spec { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
  .spec .eyebrow { font-family: var(--sans); font-size: 14px; letter-spacing: 0; text-transform: none; }
  .spec .value { margin: 0; text-align: right; }
  .plans { padding-top: 26px; }
  .plan .cost .amount { font-size: 44px; }
  .band { padding-top: 44px; }
  .flow, .know { grid-template-columns: 1fr; }
  .flow li { border-left: 0; }
  .flow li + li { border-top: 1px solid var(--border); }
  .guide-article { padding: 2px 20px 22px; }
}
