/*
 * Thisplayable — showcase site for Thispostable and Thismountable.
 *
 * Every token here is read off the app's theme in `thisassemble`
 * (lib/src/themes/theme_base.dart, theme_light.dart, theme_dark.dart). Change
 * the theme there, then change it here — this file has no opinions of its own.
 *
 * The design language, in one breath: square corners, no blur, no gradients.
 * Depth is a printed offset (the primary button's 4px hard shadow), never a
 * light source. Filled things invert on press; flat things fill on hover.
 *
 * Layout is editorial rather than boxed: photographs carry the page, and run
 * big — a "stage" photo fills three quarters of the view (75vh tall, 3/4 of the
 * width) with the last quarter given to copy or to smaller companion photos.
 * Text sits on the page with a rule above it. A box is kept only where the box
 * is the content: an app screen, an input, a callout.
 */

/* ---------- Tokens ---------- */

:root {
  /* theme_light.dart */
  --bg: #ffffff;
  --card: #f4f5f6; /* AppColors.cardBlue */
  --rule: #cfd8dc; /* blueGrey.shade100 — a hairline, the theme's own divider is fainter */
  --display: #263238; /* blueGrey.shade900 — display / title */
  --headline: #546e7a; /* blueGrey.shade600 — headline */
  --body: #616161; /* grey.shade700 — body; neutral grey rather than the theme's blueGrey.shade700, to read lighter */
  --label: #78909c; /* blueGrey.shade400 — label (decorative only: 3.4:1 on white) */
  --primary: #000000;
  --on-primary: #ffffff;
  --disabled-bg: rgba(0, 0, 0, 0.12);
  --disabled-fg: rgba(0, 0, 0, 0.5);
  --field: #212121; /* grey.shade900 — input border */

  /* Brand — the two squares in the logo */
  --orange: #ff512c;
  --yellow: #ffe600;

  /* theme_base.dart: MavenPro for display/title/label, PlusJakartaSans for headline/body */
  --font-body: "Maven Pro", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;

  /* TpElevatedButton: no blur, offset 4/4, the button's own fill at a tenth */
  --hard-shadow: color-mix(in srgb, var(--primary) 10%, transparent);

  --gutter: 24px;
  --max: 1320px;
  --gap: 16px;
  color-scheme: light;
}

/* theme_dark.dart. Scaffold is blueGrey.shade900 darkened by 0.1 lightness.
   Each page picks its theme with <html data-theme>: light for users
   (thispostable.html, index.html), dark for photographers (thismountable.html). */
:root[data-theme="dark"] {
  --bg: #11171a;
  --card: #19232a;
  --rule: #2c3a42;
  --display: #ffffff;
  --headline: #b0bec5;
  --body: #bdbdbd; /* grey.shade400, neutral rather than the theme's blueGrey.shade50 */
  --label: #b0bec5;
  --primary: #ffffff;
  --on-primary: #000000;
  --disabled-bg: rgba(255, 255, 255, 0.1);
  --disabled-fg: rgba(255, 255, 255, 0.54);
  --field: #757575;
  color-scheme: dark;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0; /* nothing in this theme is rounded */
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.5 var(--font-body); /* bodyMedium, scaled for a desktop reader. Maven Pro starts at 400, so no thinner. */
  letter-spacing: -0.1px;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--display);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.2;
  text-wrap: balance;
}

/* Web-scale versions of displayLarge / displayMedium / titleLarge / titleMedium */
h1,
.display {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(34px, 5.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
h3 {
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h4 {
  font-size: 20px;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* headlineMedium: PlusJakartaSans w600, letter-spacing 3 */
.eyebrow {
  margin: 0 0 20px;
  color: var(--headline);
  font: 600 12px/1.2 var(--font-body);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.lede {
  max-width: 52ch;
  font-size: clamp(18px, 1.8vw, 22px); /* bodyLarge 18, scaled up */
  line-height: 1.5;
}

.small {
  font-size: 13px;
  color: var(--headline);
}

.center {
  margin-inline: auto;
  text-align: center;
}
.center .lede {
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
/*
 * baseButtonSizing: 11 x 8.5 around a bodySmall label at letter-spacing 1.5,
 * 16px icon, square, no elevation. Expressed in em so `--lg` scales the whole
 * box instead of just the type. A 1px border is on every variant — the outlined
 * one needs it, and giving it to the others keeps all of them the same size.
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85em 1.1em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--primary);
  font: 500 12px/1.2 var(--font-body);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: none; /* a hard shadow that eases is a soft shadow with extra steps */
}
.btn i {
  font-size: 16px;
}
.btn--lg {
  font-size: 14px;
}

/* Filled: solid fill, opposite label. Hover and press swap them. */
.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: 4px 4px 0 var(--hard-shadow);
}
.btn--primary:hover {
  background: var(--bg);
  color: var(--primary);
}
.btn--primary:active {
  transform: translate(4px, 4px); /* onto its own shadow */
  box-shadow: 0 0 0 var(--hard-shadow);
}

/* Outlined and text: no fill; they fill solid when pointed at. */
.btn--ghost {
  border-color: var(--primary);
}
.btn--ghost:hover,
.btn--text:hover,
.btn--icon:hover {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--ghost:active,
.btn--text:active,
.btn--icon:active {
  background: var(--bg);
  color: var(--primary);
}

.btn--icon {
  padding: 9px 11px;
}
.btn--icon i {
  font-size: 20px;
}

/* Disabled keeps the box, dimmed. Light uses black50 for the label rather than
   the theme's white-on-black12, which is the contrast the theme's own TODO
   calls too thin to read a store name in. */
.btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  border-color: transparent;
  color: var(--disabled-fg);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.center .btn-row,
.center .chip-row {
  justify-content: center;
}

/* ---------- Chips and segmented ---------- */
/* A chip is the opposite of the surface under it: page is --bg so the chip is
   --card; on a --card section the chip is --bg. */
:root {
  --chip-bg: var(--card);
}
.section--card,
.panel {
  --chip-bg: var(--bg);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--chip-bg);
  color: var(--display);
  font: 500 11px/1.2 var(--font-body);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.chip--solid {
  background: var(--primary);
  color: var(--on-primary);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seg {
  display: inline-flex;
}
.seg button {
  padding: 8px 12px;
  border: 0;
  background: var(--chip-bg);
  color: var(--display);
  font: 500 11px/1.2 var(--font-body);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
}

/* ---------- Header / footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px; /* baseAppBarTheme.toolbarHeight */
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--display);
  font: 600 18px/1 var(--font-display);
  letter-spacing: 0.08em; /* capitals need air; the HTML text stays "Thispostable" */
  text-transform: uppercase;
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a[aria-current="page"] {
  background: var(--card);
}
.bar-actions {
  display: flex;
  gap: 4px;
}
.menu-btn {
  display: none;
}

.site-footer {
  padding-block: 56px 40px;
  background: var(--card);
}
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
.foot p {
  max-width: 44ch;
  margin-top: 16px;
}
.foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.foot .small {
  grid-column: 1 / -1;
  max-width: none;
  margin-top: 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(72px, 11vw, 160px);
}
.section--card {
  background: var(--card);
}
.section--tight {
  padding-block: clamp(48px, 7vw, 96px);
}
.section__head {
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section__head > p:not(.eyebrow) {
  max-width: 52ch;
  margin-top: 24px;
  font-size: clamp(17px, 1.6vw, 20px);
}

.hero {
  padding-top: clamp(56px, 9vw, 128px);
}
.hero__text {
  padding-bottom: clamp(48px, 7vw, 96px);
}
.hero h1 {
  max-width: 22ch;
  margin-inline: auto;
}
.hero .lede {
  margin: 28px auto 0;
}
.hero .btn-row {
  margin-top: 40px;
}
.hero .chip-row {
  margin-top: 32px;
}
.hero + .section {
  padding-top: clamp(72px, 11vw, 160px);
}

/* A statement: a sentence set large enough to be the section. */
.statement {
  max-width: 18ch;
  margin: 0 auto clamp(48px, 7vw, 96px);
  text-align: center;
}

/* ---------- Photographs ---------- */

/* A photograph fills its box. Whatever the box is, the picture covers it. */
.stage {
  position: relative;
  overflow: hidden;
  background: var(--card);
}
.stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stage .chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 4px 4px 0 var(--hard-shadow);
}

/* Three quarters of the view: the big photo takes 3/4 of the width and 75vh of
   the height; the last quarter is copy or a stack of companion photos. */
.s34 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}
.s34--flip {
  grid-template-columns: 1fr 3fr;
}
.s34--flip > .stage {
  order: 2;
}
.s34 > .stage {
  height: 75vh;
  min-height: 440px;
}
.s34 > .stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
  min-height: 0;
}
.s34 > .stack > .stage {
  min-height: 0;
}
.s34 > .copy {
  align-self: end;
  padding-bottom: 4px;
}
.copy h3 {
  margin-bottom: 16px;
}
.copy > p + p,
.copy > p + .ticks {
  margin-top: 16px;
}
.copy .btn-row,
.copy .chip-row,
.copy .seg,
.copy .field {
  margin-top: 28px;
}

/* Portraits, staggered, three across at 3:4 */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
}
.trio > .stage {
  aspect-ratio: 3 / 4;
}
.trio > .stage:nth-child(2) {
  margin-top: clamp(32px, 8vw, 120px);
}
.trio > .stage:nth-child(3) {
  margin-top: clamp(16px, 3vw, 48px);
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.duo > .stage {
  aspect-ratio: 4 / 5;
}

/* A filmstrip, edge to edge */
.band {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 4px;
  height: min(52vh, 520px);
  overflow-x: auto;
  scrollbar-width: none;
}
.band::-webkit-scrollbar {
  display: none;
}

.mt {
  margin-top: clamp(56px, 8vw, 112px) !important; /* beats resets like .cols { margin: 0 } */
}

/* ---------- Unboxed copy: a rule, then the words ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: clamp(28px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cols--4 {
  --n: 4;
}
.cols--2 {
  --n: 2;
}
.col {
  padding-top: 24px;
  border-top: 2px solid var(--display);
}
.col .icon {
  display: block;
  margin-bottom: 24px;
  color: var(--display);
  font-size: 28px;
}
.col h4 {
  margin-bottom: 12px;
}
.col .chip-row,
.col .kv {
  margin-top: 20px;
}
.col__no {
  display: block;
  margin-bottom: 20px;
  color: var(--display);
  font: 600 clamp(44px, 5vw, 64px) / 1 var(--font-display);
  letter-spacing: -0.03em;
}
.col .chip {
  margin-bottom: 14px;
}

/* A text column beside a media column; used when the media is a demo, not a photo */
.row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.row--flip > :first-child {
  order: 2;
}
.row--even {
  grid-template-columns: 1fr 1fr;
}

.ticks {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ticks i {
  flex: none;
  margin-top: 3px;
  color: var(--display);
  font-size: 18px;
}

/* ---------- Boxes that earn it ---------- */

.panel {
  padding: clamp(28px, 4vw, 56px);
  background: var(--card);
}
.section--card .panel {
  background: var(--bg);
}
.panel h3 {
  margin-bottom: 16px;
}
.panel .icon {
  display: block;
  margin-bottom: 24px;
  font-size: 32px;
}
.invert,
.section--card .invert {
  background: var(--primary);
  color: var(--on-primary);
}
.invert h2,
.invert h3,
.invert .icon {
  color: var(--on-primary);
}

/* inputDecorationTheme: 2px border, square, 10 x 12 padding. Read-only here. */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border: 2px solid var(--field);
  background: transparent;
}
.field span {
  color: var(--headline);
  font: 600 11px/1.2 var(--font-body);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.field strong {
  color: var(--display);
  font: 600 20px/1.2 var(--font-display);
  letter-spacing: 2px;
}

/* ---------- App mock ---------- */

.phone {
  width: min(300px, 100%);
  margin-inline: auto;
  border: 2px solid var(--display);
  background: var(--bg);
  box-shadow: 10px 10px 0 var(--hard-shadow);
  display: flex;
  flex-direction: column;
}
.phone__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
}
.phone__bar strong {
  color: var(--display);
  font: 600 20px/1.2 var(--font-display);
  letter-spacing: -0.3px;
}
.phone__body {
  padding: 4px 10px 12px;
}
.phone__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.phone__grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--card);
}
.phone__tabs {
  display: flex;
  justify-content: space-around;
  padding: 12px 8px;
  border-top: 1px solid var(--rule);
  color: var(--label);
  font-size: 22px;
}
.phone__tabs .is-on {
  color: var(--display);
}
.phone__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
}
.phone__foot > span:first-child {
  color: var(--headline);
  font: 600 12px/1 var(--font-display);
}

.tile {
  position: relative;
}
.tile img {
  width: 100%;
  object-fit: cover;
  background: var(--card);
}
.tile .chip {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 4px 6px;
  font-size: 9px;
  background: var(--primary);
  color: var(--on-primary);
}
.tile .pick {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--bg);
  color: var(--display);
  border: 1px solid var(--primary);
  font-size: 14px;
}
.tile.is-picked .pick {
  background: var(--primary);
  color: var(--on-primary);
}

/* "Only photos with me" demo: six portraits, then only the two that are yours */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.demo-grid .tile img {
  aspect-ratio: 3 / 4;
}
.demo-grid .tile .chip {
  left: 8px;
  bottom: 8px;
  padding: 6px 10px;
  font-size: 11px;
}
[data-view="mine"] .demo-grid {
  grid-template-columns: repeat(2, 1fr);
}
[data-view="mine"] .tile:not(.is-mine) {
  display: none;
}

/* Key-value rows (analysis, EXIF) */
.kv {
  display: grid;
  gap: 0;
  margin: 0;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.kv dt {
  color: var(--headline);
  font: 600 11px/1.5 var(--font-body);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.kv dd {
  margin: 0;
  color: var(--display);
  text-align: right;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 880px;
  border-bottom: 1px solid var(--rule);
}
.faq details {
  border-top: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  color: var(--display);
  font: 600 22px/1.3 var(--font-display);
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  font: 500 28px/1 var(--font-body);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  max-width: 64ch;
  padding-bottom: 24px;
}

/* ---------- Closing ---------- */

.closing .lede {
  margin: 24px auto 0;
}
.closing .btn-row {
  margin-top: 40px;
}

/* ---------- Reveal on scroll ---------- */
/* Added by main.js, and only when it runs: without JS everything is simply there. */

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
.js .stage > img {
  transform: scale(1.08);
  transition: transform 1.6s ease;
}
.js .stage.is-in > img {
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .s34,
  .s34--flip,
  .row,
  .row--even {
    grid-template-columns: 1fr;
  }
  .s34--flip > .stage,
  .row--flip > :first-child {
    order: 0;
  }
  .s34 > .stage {
    height: 62vh;
    min-height: 360px;
  }
  .s34 > .stack {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
    height: 30vh;
    min-height: 200px;
  }
  .cols,
  .cols--4 {
    --n: 2;
  }
  .foot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .nav.is-open {
    display: flex;
  }
  .nav .btn {
    justify-content: flex-start;
  }
  .bar-actions {
    margin-left: auto;
  }
  .cols,
  .cols--4,
  .cols--2 {
    --n: 1;
  }
  .trio {
    gap: 8px;
  }
  .demo-grid {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
    --gap: 8px;
  }
  .faq summary {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal,
  .js .stage > img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
