/* =============================== Pons Materials ==============================
   Flat and matte on purpose. Every material on this page is a glossy, lit,
   specular object, so the page around it stays quiet or the two fight.

   The discipline that keeps it calm: one column, one left edge, one accent, one
   card. Sections are a stacked heading block and then one thing. Small print is
   mono and grey, so the eye has exactly one entry point per screen.
========================================================================== */

:root {
  --bone:   #EBE7DF;
  --card:   #F7F4EE;
  --deep:   #17150F;

  --ink:    #14120E;
  --ink-2:  #6B6459;
  --ink-3:  #9C9488;

  --line:   rgba(20, 18, 14, 0.13);
  --line-2: rgba(20, 18, 14, 0.07);
  --wash:   rgba(20, 18, 14, 0.05);

  --accent: #C1432A;

  --r:      32px;
  --r-md:   20px;

  --disp: 'Archivo', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bone);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bone); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.sec { padding-block: clamp(80px, 11vw, 150px); }
section[id] { scroll-margin-top: 96px; }

/* ------------------------------- typography -------------------------------
   Four sizes and no more: display, h2, the card title, body. Anything that is
   data is mono and grey rather than another size.
--------------------------------------------------------------------------- */

.display, .h2, .k, .stat-n {
  font-family: var(--disp);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.display { font-size: clamp(2.9rem, 9vw, 6.6rem); line-height: 0.88; }
.h2      { font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 0.92; }
.k       { font-size: 1.25rem; line-height: 1.1; }

.eyebrow {
  display: block;
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lede { font-size: 1.12rem; line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.body { color: var(--ink-2); line-height: 1.62; max-width: 32em; }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* The one heading block used by every section. Stacked, left aligned, never
   split into two columns, so each section has a single entry point. */
.block { margin-bottom: clamp(38px, 5vw, 60px); }
.block .h2   { margin-top: 16px; }
.block .body { margin-top: 20px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------- header --------------------------------- */

/* One bar, and it is a real object rather than text floating over the page.
   Without a container the page scrolls straight under the wordmark and the
   two collide, which is exactly what it looked like. */
.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: 14px 24px;
  transition: padding 0.35s var(--ease);
  pointer-events: none;
}
.head.scrolled { padding: 8px 24px; }

/* Without this, page content slides through the gap between the top of the
   viewport and the top of the bar, which reads as a glitch. The ground fades
   out just below the bar so anything approaching it dissolves instead. */
.head::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; bottom: -20px;
  background: linear-gradient(var(--bone) 62%, transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 0;
}
.head.scrolled::before { opacity: 1; }

.head-in {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  pointer-events: auto;
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
/* Lifted off the page only once there is something underneath it to lift off. */
.head.scrolled .head-in {
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.05), 0 10px 30px -12px rgba(20, 18, 14, 0.22);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
/* The mark is the wordmark P cast in the materials themselves. It is a tall
   glyph carrying a lot of detail, so it was mush at 30px in a pill of its own.
   Height drives it, width follows. */
.brand .mark { height: 36px; width: auto; }
.brand b {
  font-family: var(--disp); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 0.95rem;
}

.nav { display: flex; gap: 22px; margin-left: auto; margin-right: 10px; }
.nav a {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav { display: none; } }
/* With the nav gone the CTA needs to be told to take the right-hand end. */
@media (max-width: 860px) { .head-in .btn-primary { margin-left: auto; } }

/* --------------------------------- buttons -------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid transparent; border-radius: 999px;
  padding: 13px 26px;
  font: 500 0.95rem var(--sans);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.978); }
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------------------------------- hero ----------------------------------
   Words first, then one picture. The picture is three artworks wearing the
   same material, which is the whole argument in one frame.
--------------------------------------------------------------------------- */

.hero { padding-top: clamp(120px, 15vw, 190px); padding-bottom: clamp(16px, 3vw, 40px); }
.hero .lede { margin-top: 28px; }
.hero .row  { margin-top: 32px; }

.panel { border-radius: var(--r); overflow: hidden; background: var(--deep); }

/* ---------------------------------- steps --------------------------------- */

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .grid-4 { grid-template-columns: 1fr; } }

.step { padding: 28px; }
.step .n { display: block; font: 500 0.7rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0.14em; }
.step .k { margin: 16px 0 10px; }
.step .body { font-size: 0.92rem; }

/* ---------------------------------- demo ---------------------------------- */

.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }
.demo .panel img { width: 100%; aspect-ratio: 1; }

.pick { padding: clamp(26px, 3vw, 36px); display: flex; flex-direction: column; gap: 30px; }
.pick .thumbs, .pick .swatches { margin-top: 16px; }
/* Twelve and eight both wrap ragged in a flex row at this width, so the two
   pickers are laid out as whole blocks instead: 6 x 2 and 4 x 2. */
.pick .swatches { display: grid; grid-template-columns: repeat(6, 50px); }
.pick .thumbs   { display: grid; grid-template-columns: repeat(4, 50px); }
@media (max-width: 420px) {
  .pick .swatches { grid-template-columns: repeat(4, 50px); }
}
.pick-foot {
  margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.pick-foot .mono { flex: 1; min-width: 12em; }

.swatches, .thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 50px; height: 50px; padding: 0;
  border: 2px solid transparent; border-radius: 15px;
  background: var(--deep); cursor: pointer; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.2s;
}
.swatch img { width: 100%; height: 100%; border-radius: 12px; }
.swatch:hover { transform: translateY(-3px); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }

.thumb {
  width: 50px; height: 50px; padding: 0;
  border: 1px solid var(--line); border-radius: 15px;
  background: transparent; color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.25s var(--ease), color 0.2s, border-color 0.2s, background 0.2s;
}
.thumb svg { width: 27px; height: 27px; }
.thumb:hover { transform: translateY(-3px); color: var(--ink-2); }
.thumb[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bone); }

/* -------------------------------- catalogue ------------------------------- */

.cards { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }

.mat { padding: 10px; border-radius: var(--r-md); }
.mat img { width: 100%; aspect-ratio: 1; border-radius: 12px; background: var(--deep); }
.mat .meta { display: flex; align-items: baseline; gap: 10px; padding: 14px 8px 6px; }
.mat .nm { font-family: var(--disp); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 0.88rem; }
.mat .mono { margin-left: auto; }

/* ---------------------------------- band ---------------------------------- */

.band {
  background: var(--deep); color: var(--bone);
  border-radius: var(--r);
  padding: clamp(52px, 8vw, 96px) clamp(28px, 5vw, 68px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.band .btn-ghost { border-color: rgba(235, 231, 223, 0.35); color: var(--bone); }
.band .btn-ghost:hover { border-color: var(--bone); background: var(--bone); color: var(--ink); }

/* ---------------------------------- note ---------------------------------- */

.note { padding: clamp(28px, 3vw, 38px); max-width: 40em; }
.note .k { margin: 14px 0 12px; }

/* ---------------------------------- misc ---------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; }
}

footer { padding: 34px 0 60px; border-top: 1px solid var(--line-2); margin-top: clamp(60px, 8vw, 100px); }
.foot { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

/* ------------------------------ live + buying -----------------------------
   The page is a shop now, so a card has to carry a price and a way to act on
   it without turning into a dashboard.
------------------------------------------------------------------------- */

.buyrow {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 6px;
}
.buyrow .price { flex: 1; }
.mat .btn-sm { padding: 7px 15px; font-size: 0.8rem; }
/* Always visible. A shop that hides its buy button until you hover reads as a
   shop with no buy button. */
.mat .buy { transition: background .2s, transform .2s var(--ease); }
.mat .buy.done { background: #2f7d55; }
.mat .buy[disabled] { opacity: .55; cursor: wait; }

.live-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.dot {
  width: 7px; height: 7px; border-radius: 999px; background: #2f7d55;
  box-shadow: 0 0 0 0 rgba(47, 125, 85, .5);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(47, 125, 85, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(47, 125, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 125, 85, 0); }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.rows { margin-top: 26px; display: grid; gap: 1px; background: var(--line-2); border-radius: 14px; overflow: hidden; }
.rw {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); padding: 14px 16px;
}
.rw .eyebrow { flex: 0 0 auto; min-width: 11em; }
.lnk { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; }
.lnk:hover { color: var(--accent); border-color: var(--accent); }
.rw .btn-sm { margin-left: auto; }

/* Cards lift a touch on hover now that they are clickable objects. */
.mat { transition: transform .3s var(--ease), border-color .3s var(--ease); }
.mat:hover { transform: translateY(-3px); border-color: rgba(20, 18, 14, .26); }

/* --------------------------------- forms ---------------------------------
   The write side. Three panels, each one action, each saying what it costs
   before it asks for a signature.
------------------------------------------------------------------------- */

.grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }

.form { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.form .sm { font-size: 0.88rem; }
.form .frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.form .frow .btn { margin-left: auto; }
.form .frow .btn + .btn { margin-left: 0; }

.fld { display: block; }
.fld > span {
  display: block; margin-bottom: 6px;
  font: 500 0.66rem/1 var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.fld input, .fld select {
  width: 100%; box-sizing: border-box;
  font: 400 0.86rem var(--mono);
  color: var(--ink); background: var(--bone);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px;
  transition: border-color .2s, background .2s;
}
.fld input:focus, .fld select:focus {
  outline: none; border-color: var(--ink); background: #fff;
}
.fld input::placeholder { color: var(--ink-3); }
.fld select { font-family: var(--sans); font-size: 0.92rem; cursor: pointer; }

.big { font: 800 1.9rem/1 var(--disp); letter-spacing: .01em; }

.msg { min-height: 1.2em; font-size: 0.72rem; color: var(--ink-3); word-break: break-all; }
.msg.good { color: #2f7d55; }
.msg.bad { color: var(--accent); }

@media (max-width: 620px) { .hide-sm2 { display: none; } }

/* the create page */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.fld textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  font: 400 0.76rem/1.6 var(--mono);
  color: var(--ink); background: var(--bone);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
}
.fld textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.form code { font: 500 .85em var(--mono); background: var(--wash); padding: 1px 5px; border-radius: 5px; }
.cap .thumbs { gap: 6px; }
.cap .thumb { width: 34px; height: 34px; border-radius: 11px; }
.cap .thumb svg { width: 19px; height: 19px; }

/* the X link sits in the header as a mark, not a word */
.btn-icon { padding: 0; width: 36px; height: 36px; flex: 0 0 36px; }
.btn-icon svg { width: 15px; height: 15px; display: block; }

/* One status line for every action, so a failure is readable */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 14px);
  max-width: min(560px, calc(100vw - 40px));
  background: var(--deep); color: var(--bone);
  font: 400 0.83rem/1.45 var(--sans);
  padding: 13px 18px; border-radius: 14px;
  box-shadow: 0 10px 34px -10px rgba(20,18,14,.5);
  opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: #2f7d55; }
.toast.bad { background: var(--accent); }

/* The landing hero reads centred; everything below keeps its single left edge
   so the page still has a spine to hang the sections on. */
.hero { text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .row { justify-content: center; }
