/* Portals storefront look: colors sampled from the Printwise brand artwork. Mobile first. */
:root {
  --bg: #ffffff;
  --surface: #e5eaee;
  --line: #d3dbe1;
  --text: #1d2933;
  --muted: #4c5c69;
  --accent: #3f6680;
  --accent-dark: #2f4e63;
  --rust: #d9734e;
  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.375rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.0625rem; }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
main.wrap { padding-top: 2rem; padding-bottom: 4rem; }
.prose { max-width: 42rem; }
.lead { font-size: 1.1875rem; color: var(--muted); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 0.5rem 1rem; }
.skip-link:focus { left: 0; z-index: 10; }

.site-header { border-bottom: 1px solid var(--line); }
.header-row, .footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand { display: block; }
.brand img { width: 12rem; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
nav a { display: inline-block; padding: 0.375rem 0; color: var(--text); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

.site-footer { background: var(--surface); color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer nav a { color: var(--muted); }

/* Hero follows the storefront banner: tiles on both sides of a white card. */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
}
.hero-card {
  grid-column: 1 / -1;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg);
}
.hero-card h1 { margin-top: 0; }
.hero-tiles {
  aspect-ratio: 478 / 541;
  background: center / contain no-repeat;
}
.hero-tiles-left { background-image: url("tiles-left.png"); }
.hero-tiles-right { background-image: url("tiles-right.png"); }

.button {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.625rem 1.75rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent-dark); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.card { position: relative; }
.card[hidden] { display: none; }
.card-photo { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.card-photo img { width: 100%; height: 100%; object-fit: contain; }
.card-title { margin: 0.875rem 0 0.25rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { text-decoration: underline; }
.card-pitch { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.9375rem; }
.price { margin: 0.25rem 0; font-weight: 600; }

.photo-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters[hidden] { display: none; }
.filters button {
  min-height: 2.75rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--accent-dark);
  font: inherit;
  cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--accent); color: #ffffff; }

.empty, .unavailable { color: var(--muted); }
.values { margin-top: 3rem; }
.values ul { padding-left: 1.25rem; }
.values li::marker { color: var(--rust); }

.breadcrumb { margin-top: 0; color: var(--muted); font-size: 0.9375rem; }
.product { display: grid; gap: 1.5rem; }
/* Phones: first photo, then name, price and Buy, then the other photos. */
.product-photos { display: contents; }
.product-photos > * { order: 2; }
.product-photos > :first-child { order: 0; }
.product-info { order: 1; }
.product-photos img { width: 100%; border-radius: var(--radius); background: var(--surface); }
.product .price { font-size: 1.375rem; }
.buy-note, .shipping-note { margin: 0.5rem 0 1rem; color: var(--muted); font-size: 0.9375rem; }

.placeholder {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border: 1px dashed #8a6d00;
  background: #fff3c4;
  color: #3f3300;
}

@media (min-width: 48rem) {
  h1 { font-size: 2.75rem; }
  .product { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .product-photos { display: grid; gap: 1rem; align-content: start; }
  .product h1 { font-size: 2.25rem; }
}

@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; padding: 1rem; gap: 1rem; }
  .hero-card {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem;
  }
  .hero-tiles-left { grid-column: 1; grid-row: 1; }
  .hero-tiles-right { grid-column: 3; grid-row: 1; }
}
