/* Refabra home page. The layout, type scale, buttons, nav and motion come from the
   taste-skill kit in /assets (unchanged copies). This file holds the brand tokens
   and the few rules that sit inside a visual. Loaded after layout.css. */

/* The brand's own colours, as `start.mjs brand` prints them (paper, ink, terracotta). */
:root {
  --p-bg: #f4efe6; --p-surface: #e8e3da; --p-ink: #1b1a17; --p-muted: #65625d;
  --p-accent: #c4522d; --p-accent-ink: #ffffff; --p-action: #c4522d; --p-action-ink: #ffffff;
  --p-inv-bg: #1b1a17; --p-inv-surface: #272623; --p-inv-ink: #f4efe6; --p-inv-muted: #99968f;
  --p-inv-accent: #c4522d; --p-inv-accent-ink: #ffffff; --p-inv-action: #c4522d; --p-inv-action-ink: #ffffff;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.04em;
  --display-stretch: 96%;
}

/* The same two faces, self-hosted by next/font (no request to Google from the visitor). */
:root {
  --font-display: var(--font-refabra-display), system-ui, sans-serif;
  --font-text: var(--font-refabra-text), system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* The lockup: never under 120px wide (brand sheet). */
.nav__logo svg { height: 30px; width: auto; display: block; }
.nav__logo .logo-symbol { display: none; height: 28px; }
@media (max-width: 639px) { .nav__logo .logo-lockup { height: 29px; } }
@media (max-width: 359px) { .nav .nav__logo .logo-lockup { display: none; } .nav .nav__logo .logo-symbol { display: block; } }

/* A product screen: one hairline round it, cropped from its top-left corner. */
.shot { background: #fcfcfb; box-shadow: inset 0 0 0 1px var(--line); }
.shot > img { object-position: 0% 0%; }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; z-index: 1; }
.hero__media.shot > img { object-position: 0% 0%; }

#steps .panel { --p-h: 300px; }
#orders .shot--wide { margin-top: var(--s-7); }
#margins .tabs { margin-bottom: var(--s-5); }
#margins .frame > img[hidden] { display: none; }
#shopify .shopify-text { display: grid; gap: var(--s-5); align-content: start; }

/* The name across the wrap is the brand's own wordmark. */
.close__word { font-size: 0; line-height: 0; }
.close__word > svg { display: block; width: calc(50% - var(--gutter) / 2); height: auto; }
@media (max-width: 639px) { .close__word > svg { width: 100%; } }

.footer__note { color: var(--muted); max-width: 72ch; }

@media (min-width: 1024px) and (max-width: 1279px) { #steps .panel { --p-h: 216px; } }
/* the tablet stacks the four steps, two to a screen: each panel takes what its screen leaves
   (the first screen also holds the heading) */
@media (min-width: 640px) and (max-width: 1023px) {
  #steps .grid > .card { grid-column: 1 / -1; }
  #steps .group .panel { --p-h: calc(50svh - 337px); }
  #steps .wrap > .grid .panel { --p-h: calc(50svh - 258px); }
  .closing__links .grid > .footer__col { grid-column: span 4; }
}
/* a phone screen holds two steps: the heading keeps its first sentence, the panels are shorter */
@media (max-width: 639px) {
  #steps .group .panel { --p-h: 150px; }
  #steps .wrap > .grid .panel { --p-h: 190px; }
  #steps h2 .muted { display: none; }
}

/* On a phone a screen is shown far larger than its frame and cut by it (from the top-left corner),
   so the figures and labels in that corner stay readable: a 1440 px capture needs about 60% scale. */
@media (max-width: 639px) {
  .shot > img, .hero__media.shot > img { inset: 0 auto auto 0; width: 270%; max-width: none; height: auto; min-height: 100%; object-fit: cover; }
  .hero__media.shot > img { width: 250%; }
  #steps .panel.shot > img { inset: 0 auto auto 0; width: 250%; max-width: none; height: auto; min-height: 100%; object-fit: cover; }
  #orders .shot > img { width: 330%; }
  #margins .shot > img, #margins .frame > img { width: 190%; }
  #margins .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #margins .tab { padding: 0 var(--s-1); }
}
