/* Sturdybits storefront. Tokens come from /shared/ui/brand.css. */

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { text-decoration: none; }
.brand .wordmark { font-size: 1.85rem; }
.site-head nav { display: flex; gap: 22px; }
.site-head nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
.site-head nav a:hover { color: var(--primary); }

.lede { font-size: var(--step-1); line-height: 1.5; }
.small { font-size: var(--step--1); }
.fine { font-size: 0.8rem; padding-bottom: 24px; }
.block { padding-block: 64px; border-top: 1px solid var(--line); }

/* Home hero: a navy band, headline left, the tick tile right with a speech bubble. */
.hero-band { background: var(--hero); color: var(--on-hero); }
.hero-band :focus-visible { outline-color: var(--pop); }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 64px; }
.hero h1 { max-width: 13ch; color: var(--on-hero); }
.hero h1 .stop { display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.06em; border-radius: 0.05em; background: var(--pop); }
.hero .lede { color: var(--on-hero-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-cta .btn.ghost { background: transparent; border-color: color-mix(in srgb, var(--on-hero) 45%, transparent); color: var(--on-hero); }
.hero-art { position: relative; margin: 0; display: grid; justify-items: center; padding-top: 78px; }
.hero-art > img { width: min(240px, 66%); height: auto; animation: bob 4.5s ease-in-out infinite; }
.bubble { position: absolute; top: 0; left: 50%; transform: translateX(-62%); max-width: 260px;
  background: var(--on-hero); color: var(--hero); border-radius: 16px; padding: 12px 16px;
  font-size: 0.98rem; line-height: 1.35; box-shadow: 5px 5px 0 var(--pop); }
.bubble::after { content: ""; position: absolute; bottom: -9px; left: 62%; width: 18px; height: 18px; background: var(--on-hero); transform: rotate(45deg); }
.bubble b { font-family: var(--font-display); font-weight: 600; background: linear-gradient(transparent 58%, var(--pop) 58%); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Tools */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tool-card { padding: 22px; display: grid; gap: 12px; align-content: start; }
.tool-card p { margin: 0; color: var(--muted); }
.tool-link { display: flex; align-items: center; gap: 14px; color: var(--fg); text-decoration: none; }
.tool-link h3 { margin: 0; font-size: var(--step-2); }
.tool-link:hover h3 { color: var(--primary); }
.app-icon { border-radius: 22%; flex: none; display: block; }
.by { color: var(--muted); font-size: var(--step--1); }
.tool-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.soon { font-family: var(--font); font-size: 0.8rem; font-weight: 600; color: var(--muted); vertical-align: middle; }
.tool-card.next { border: 2px dashed var(--line); border-radius: var(--radius-m); background: transparent; }

/* Home page gallery: a picture of each app at work, then its name, job, price and a free try. */
.section-lede { color: var(--muted); max-width: 62ch; margin: -4px 0 26px; }
.app-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.app-card { display: flex; flex-direction: column; overflow: hidden; }
.app-shot { display: block; aspect-ratio: 16 / 10; background: var(--tile, var(--hero)); overflow: hidden; border-bottom: 1px solid var(--line); }
.app-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.35s ease; }
.app-card:hover .app-shot img, .app-card:focus-within .app-shot img { transform: scale(1.03); }
.app-shot-icon { display: grid; place-items: center; height: 100%; }
.app-card-body { display: grid; gap: 12px; align-content: start; padding: 20px 22px 22px; flex: 1; }
.app-card-body p { margin: 0; color: var(--muted); }
.app-gallery .tool-card.next { grid-column: 1 / -1; }
/* Two columns, then three. The "next" card fills the last row's empty slot when there is exactly one
   (the build adds fits-2 or fits-3 from the number of apps); otherwise it spans the full width. */
@media (min-width: 700px) {
  .app-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-gallery .tool-card.next.fits-2 { grid-column: auto; align-content: center; }
}
@media (min-width: 1040px) {
  .app-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-gallery .tool-card.next.fits-2:not(.fits-3) { grid-column: 1 / -1; align-content: start; }
  .app-gallery .tool-card.next.fits-3 { grid-column: auto; align-content: center; }
}
.hero-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-tiles img { width: 44px; height: 44px; border-radius: 22%; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3); }
.hero-tiles img:nth-child(odd) { transform: rotate(-4deg); }
.hero-tiles img:nth-child(even) { transform: rotate(3deg); }
@media (max-width: 520px) { .hero-tiles { gap: 8px; } .hero-tiles img { width: 32px; height: 32px; } }
.tool-card.next h3 { font-size: var(--step-1); margin: 0; }

.promises dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; }
.promises dt { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.promises dt::before { content: ""; width: 0.62em; height: 0.62em; flex: none; border-radius: 0.16em; background: var(--pop); }
.promises dd { margin: 0; }

/* Product pages */
.product-hero { padding-block: 40px 40px; }
.product-hero h1 { max-width: 20ch; }
.crumbs { color: var(--muted); font-size: var(--step--1); }
.crumbs a { color: var(--muted); }
.product-title { display: flex; align-items: center; gap: 14px; margin: 18px 0 18px; }
.by-line { margin: 0; color: var(--muted); line-height: 1.35; }
.by-line b { color: var(--fg); font-size: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 24px 0 12px; }
.shot-fig { margin-block: 0 64px; }
.shot { display: block; width: 100%; height: auto; border-radius: var(--radius-m); }
.shot-fig figcaption { margin-top: 10px; color: var(--muted); font-size: var(--step--1); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; margin-bottom: 12px;
  border-radius: 10px; background: var(--pop); color: var(--on-pop); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; max-width: 760px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: var(--step--1); color: var(--muted); font-weight: 700; }
.compare td { text-align: center; width: 22%; }
.compare tbody th { font-weight: 600; }
.yes { color: var(--ok); font-weight: 800; }
.no { color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 760px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; }

/* Prose pages: legal, support, guides */
.prose { padding-block: 48px 72px; max-width: 760px; }
.prose h1 { font-size: var(--step-3); }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.4em; max-width: var(--measure); }
.prose blockquote { margin: 0 0 1em; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius-s); overflow-x: auto; }
.post-list { list-style: none; padding: 0; }
.post-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-list h2, .post-list h3 { font-size: var(--step-1); margin: 0 0 6px; }
.post-list p { margin: 0; color: var(--muted); }
.post-list a { color: var(--fg); text-decoration: none; }
.post-list a:hover h3, .post-list a:focus-visible h3 { color: var(--primary); text-decoration: underline; }

/* App picker (Guides and Support): choose an app first, grouped by family */
.guides-index { padding-block: 48px 72px; }
.guides-index .lede { max-width: 62ch; }
.app-picker { display: grid; gap: 28px; margin: 28px 0 8px; }
.picker-group h2 { font-size: var(--step-1); margin: 0 0 12px; }
.picker-group ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.prose .picker-group li { margin: 0; max-width: none; }
.pick { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--fg); text-decoration: none; }
.pick:hover, .pick:focus-visible { border-color: var(--primary); }
.pick:hover b { color: var(--primary); }
.pick .app-icon { width: 44px; height: 44px; }
.pick-text { display: grid; gap: 4px; min-width: 0; }
.pick-text b { font-size: 1.05rem; }
.pick-job { color: var(--muted); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-meta { font-size: var(--step--1); font-weight: 600; color: var(--primary); }
@media (max-width: 520px) { .pick-job { display: none; } .pick { padding: 12px 14px; align-items: center; } .pick .app-icon { width: 36px; height: 36px; } }
.newest { margin-top: 48px; max-width: 760px; }
.newest h2 { font-size: var(--step-2); }

/* An app's own guides and help pages */
.app-page-head { display: flex; gap: 18px; align-items: flex-start; margin-top: 8px; }
.app-page-head h1 { margin: 0 0 6px; }
.app-page-head .lede { margin: 0; }
.app-page-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 20px 0 8px; }
.help-steps li { margin-bottom: 0.6em; }
.more-help { margin-top: 16px; font-weight: 600; }

/* Guide pages: the app the guide is about, then more guides */
.guide-app { margin-top: 48px; padding: 20px 22px; }
.guide-app-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.guide-app p { margin: 0; }
.guide-app > p + p { margin-top: 14px; }
.guide-app-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.guide-more { margin-top: 40px; }
.guide-more h2 { font-size: var(--step-1); }
.guide-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 760px; }
.guide-links a { font-weight: 600; }
.guide-links p { margin: 4px 0 0; color: var(--muted); }

.site-foot { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 32px; font-size: var(--step--1); }
.site-foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot-brand .wordmark { font-size: 1.6rem; }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 40px; gap: 8px; }
  .hero-art { padding-top: 84px; }
  .hero-art > img { width: 150px; }
  .bubble { transform: translateX(-50%); }
  .bubble::after { left: 50%; }
  .promises dl, .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .block { padding-block: 44px; }
}
