/* Orderette · the instruction sheets: How it works, Pricing, Live demo and Questions, each its own page under the tab
   strip. Each is the envelope's instruction sheet (envelope.css) set at a reading size under a masthead, plus the
   pieces only these pages have: the "or" between the plans, the pilot round, the demo line and the live board. */

.leaf { background: var(--kraft); }
/* a reading scale: the comp unit floors at a size that reads on a laptop and stops growing on wide screens */
.leaf .sheet2 > * { --u: clamp(0.62px, calc(100cqw / 2000), 0.8px); --dash: max(calc(2.5 * var(--u)), 1.5px); }
.leaf .instruction { width: min(100% - 2 * clamp(10px, 2.2vw, 36px), 1760px); margin: clamp(18px, 2.6vw, 40px) auto clamp(32px, 4.4vw, 72px); box-sizing: border-box; font-size: max(calc(28 * var(--u)), 16px); }
.leaf .lead { font-size: max(calc(33 * var(--u)), 18px); }

/* the masthead: the page's name set like the envelope's headline */
.leaf-head { padding-top: calc(48 * var(--u)); }
.leaf-row .sheet-head { flex: none; }
.leaf-title { margin: 0; font: 400 max(calc(132 * var(--u)), 46px) / 0.96 var(--display); letter-spacing: calc(1.5 * var(--u)); -webkit-text-stroke: calc(1.4 * var(--u)) currentColor; paint-order: stroke fill; text-wrap: balance; }
.leaf-head .lead { margin-top: calc(26 * var(--u)); }
.instruction .fine-line { margin-top: calc(32 * var(--u)); color: var(--ink-soft); font: italic 250 max(calc(29 * var(--u)), 16px) / 1.4 var(--sans); font-stretch: 90%; }

/* links inside the sheet's own sentences (not the foot, which keeps its dashed underline): ink, underlined in red */
.instruction :is(.lead, dd) a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: max(calc(2 * var(--u)), 1.5px); text-underline-offset: 0.18em; transition: color 160ms ease-out; }
.instruction :is(.lead, dd) a:hover { color: var(--red); }

/* ---- pricing: the circle on the seam between the two plans, and the pilot round ---- */
.terms .term-or { position: relative; }
.terms .or { position: absolute; left: calc(-20 * var(--u) - max(calc(2.5 * var(--u)), 1.5px) - 24px); top: 50%; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-top: -24px; border: 2px solid var(--ink); border-radius: 50%; box-sizing: border-box; background: var(--kraft); font: 600 15px / 1 var(--label); font-stretch: 80%; letter-spacing: 0.1em; text-transform: uppercase; }
.round { display: flex; flex-wrap: wrap; align-items: flex-end; gap: calc(36 * var(--u)) calc(110 * var(--u)); margin-top: calc(8 * var(--u)); }
.round p { display: flex; flex-direction: column; gap: calc(14 * var(--u)); max-width: none; }
.round .num-display { font-size: max(calc(128 * var(--u)), 58px); letter-spacing: calc(2 * var(--u)); }
.round .label { font-size: max(calc(24 * var(--u)), 13px); font-weight: 600; letter-spacing: 0.2em; }
.round-clock .num-display { color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.round-clock[hidden] { display: none; }
.instruction .pilot-sheet .lead { margin-top: calc(40 * var(--u)); }

/* ---- contact: the form set on the sheet. Fields are ruled boxes in ink on the paper, labels are the sheet's
   condensed labels, the button is the world's red cut piece ---- */
.hidden { display: none !important; }
.post { display: grid; gap: calc(30 * var(--u)); max-width: 1180px; }
.post-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(30 * var(--u)) calc(40 * var(--u)); }
.post-field { display: grid; gap: calc(12 * var(--u)); }
.post-field .label { font-size: max(calc(22 * var(--u)), 12px); font-weight: 600; letter-spacing: 0.18em; }
.post-field .hint { margin-left: 0.6em; color: var(--ink-soft); font-weight: 500; }
.post :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-height: max(calc(72 * var(--u)), 46px); padding: calc(14 * var(--u)) calc(18 * var(--u)); border: max(calc(2 * var(--u)), 1.5px) solid var(--ink); border-radius: max(calc(8 * var(--u)), 5px); background: rgba(255, 252, 244, 0.55); color: var(--ink); font: 400 max(calc(28 * var(--u)), 16px) / 1.35 var(--sans); font-stretch: 90%; }
.post textarea { min-height: max(calc(220 * var(--u)), 140px); resize: vertical; }
.post select { appearance: none; padding-right: calc(60 * var(--u)); background: rgba(255, 252, 244, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232a2925' stroke-width='1.8'/%3E%3C/svg%3E") right calc(20 * var(--u)) center / max(calc(22 * var(--u)), 13px) auto no-repeat; }
.post :is(input, select, textarea):focus-visible { outline: max(var(--dash), 2px) dashed var(--red); outline-offset: 3px; }
.post button.btn { appearance: none; background: none; cursor: pointer; }
.post button.btn.primary { background: var(--red-chip); }
.post button.btn.primary:hover { background: var(--red-press); }
.post button.btn:disabled { opacity: 0.6; cursor: default; }
.instruction .post .actions { margin-top: 0; }
.post-error { padding: calc(14 * var(--u)) calc(18 * var(--u)); border: max(calc(2 * var(--u)), 1.5px) dashed var(--red); border-radius: max(calc(8 * var(--u)), 5px); color: var(--red-ink); font-weight: 500; }
.instruction .post-sent { margin-top: calc(10 * var(--u)); padding: calc(18 * var(--u)) calc(22 * var(--u)); border: max(calc(2 * var(--u)), 1.5px) solid #52704e; border-radius: max(calc(8 * var(--u)), 5px); color: var(--green); font-weight: 500; }

/* ---- the demo line ---- */
.call-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(40 * var(--u)) calc(110 * var(--u)); }
.call-number { display: inline-flex; flex-direction: column; gap: calc(6 * var(--u)); color: var(--ink); text-decoration: none; font: 400 max(calc(120 * var(--u)), 50px) / 1 var(--display); letter-spacing: calc(1.5 * var(--u)); white-space: nowrap; }
.call-number .call-word { color: var(--red); font-size: 0.62em; letter-spacing: calc(4 * var(--u)); }
.call-number .call-digits { border-bottom: max(calc(3 * var(--u)), 2px) solid var(--red); padding-bottom: calc(10 * var(--u)); }
.call-number:hover .call-digits { color: var(--red); }
.call-steps { display: grid; gap: calc(22 * var(--u)); }
.call-steps li { display: grid; grid-template-columns: max(calc(56 * var(--u)), 34px) minmax(0, 1fr); align-items: center; gap: calc(22 * var(--u)); }
.call-steps .num { display: flex; align-items: center; justify-content: center; width: max(calc(56 * var(--u)), 34px); height: max(calc(56 * var(--u)), 34px); border: max(calc(2 * var(--u)), 1.5px) solid var(--ink); border-radius: 50%; box-sizing: border-box; font: 600 max(calc(28 * var(--u)), 16px) / 1 var(--label); font-stretch: 80%; }

/* ---- the live board: the kitchen tablet's four lanes, laid out on the pattern tissue ---- */
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.board-live { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); font: 600 max(calc(22 * var(--u)), 12px) / 1 var(--label); font-stretch: 80%; letter-spacing: 0.22em; text-transform: uppercase; }
.board-live .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.board-live.on { color: var(--red-ink); }
.board-live.on .dot { background: var(--red); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(26 * var(--u)); padding: calc(30 * var(--u)); border: var(--dash) dashed var(--ink); border-radius: calc(10 * var(--u)); background: linear-gradient(rgba(241, 224, 194, 0.18), rgba(241, 224, 194, 0.18)), image-set(url(plates/tissue-paper.webp) type("image/webp"), url(plates/tissue-paper.png) type("image/png")) center / cover var(--tissue); }
/* the lanes are sections of the board, not sections of the sheet: no sheet spacing above them */
.instruction .lane { padding-top: 0; }
.lane h3 { margin: 0 0 calc(18 * var(--u)); padding-bottom: calc(12 * var(--u)); border-bottom: max(calc(2 * var(--u)), 1.5px) solid var(--ink); font-size: max(calc(22 * var(--u)), 12px); font-weight: 600; letter-spacing: 0.2em; line-height: 1.2; white-space: normal; }
.lane ol { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: calc(18 * var(--u)); min-height: calc(190 * var(--u)); }
.lane ol:empty { border: max(calc(2 * var(--u)), 1.5px) dashed rgba(42, 41, 37, 0.32); border-radius: calc(8 * var(--u)); }
.board-piece { position: relative; display: grid; gap: calc(10 * var(--u)); padding: calc(20 * var(--u)) calc(22 * var(--u)) calc(18 * var(--u)); border: max(calc(2 * var(--u)), 1.5px) dashed var(--ink); border-radius: calc(8 * var(--u)); background: var(--paper); font-size: max(calc(26 * var(--u)), 15px); line-height: 1.3; transform-origin: 50% 30%; }
/* the live piece is traced in red, like the homepage's live piece; every piece carries the circled piece number */
.board-piece[data-status="new"] { border-style: solid; border-color: var(--red); }
.instruction .board-piece p, .instruction .board-piece ul { max-width: none; }
/* the top and foot lines wrap inside a narrow lane rather than push the piece over the next one */
.bp-top { display: flex; flex-wrap: wrap; row-gap: 6px; align-items: baseline; gap: 0.7em; font-family: var(--label); font-stretch: 80%; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.bp-name { font-size: 1.05em; }
.bp-lang { color: var(--ink-soft); font-weight: 500; }
.bp-num { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.75em; height: 1.75em; margin-right: 0.1em; border: max(calc(1.6 * var(--u)), 1.25px) solid var(--ink); border-radius: 50%; box-sizing: border-box; font-size: 0.9em; letter-spacing: 0; align-self: center; }
.bp-items { display: grid; gap: 2px; font-weight: 400; }
.bp-items b { font: 600 1em / 1 var(--label); font-stretch: 80%; }
.bp-items [lang="ar"] { font-family: var(--arabic); font-weight: 400; }
.bp-more { color: var(--ink-soft); font: 500 0.82em / 1.4 var(--label); font-stretch: 80%; letter-spacing: 0.14em; }
.bp-price { padding-top: calc(8 * var(--u)); border-top: max(calc(1.5 * var(--u)), 1px) dashed rgba(42, 41, 37, 0.5); }
.bp-foot { display: flex; flex-wrap: wrap; row-gap: 6px; justify-content: space-between; align-items: center; gap: 12px; }
.bp-total { font: 400 1.15em / 1 var(--display); letter-spacing: 0.04em; }
/* the status stamp, as on the homepage's pieces: green and outlined while the order moves, red and filled when NEW */
.bp-stamp { display: inline-flex; align-items: center; min-height: 1.9em; padding: 0 0.7em; border: max(calc(2.2 * var(--u)), 1.5px) solid #52704e; border-radius: max(calc(8 * var(--u)), 5px); color: var(--green); font: 500 0.74em / 1 'Oswald', var(--label); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; transform: rotate(-1.2deg); }
.bp-stamp.new { border-color: var(--red-chip); background: var(--red-chip); color: #fff; }
.bp-time { color: var(--ink-soft); font: 500 0.78em / 1 var(--label); font-stretch: 80%; letter-spacing: 0.16em; }
.bp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-tag { padding: 4px 8px 3px; border: max(calc(2 * var(--u)), 1.5px) solid var(--green); border-radius: 5px; color: var(--green); font: 600 0.72em / 1 var(--label); font-stretch: 80%; letter-spacing: 0.14em; }
.bp-tag.red { border-color: var(--red-ink); color: var(--red-ink); }
.board-empty { margin-top: calc(24 * var(--u)); font-size: max(calc(30 * var(--u)), 17px); }
.board-empty a { color: inherit; font-weight: 500; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* a new order settles onto the board the way the homepage's live piece does */
.board-piece.landing { animation: settle 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@media (prefers-reduced-motion: no-preference) {
  .board-live.on .dot { animation: breathe 2.4s ease-in-out infinite; }
}
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- the four steps two by two where four columns would squeeze their titles ---- */
@media (min-width: 901px) and (max-width: 1199px) {
  .leaf .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: calc(44 * var(--u)); }
  .leaf .step-list li:nth-child(odd) { border-left: 0; }
}

/* ---- phones and small tablets ---- */
@media (max-width: 900px) {
  /* the sheet keeps clear of a phone's sensor housing in landscape, as the strip above it does */
  .leaf .instruction { width: auto; margin: 14px max(10px, env(safe-area-inset-right)) 28px max(10px, env(safe-area-inset-left)); padding: 22px 18px 30px; font-size: 1rem; }
  .leaf .lead { font-size: 1.12rem; }
  .leaf-head { padding-top: 22px; }
  .leaf-title { font-size: clamp(2.6rem, 13vw, 3.6rem); -webkit-text-stroke-width: 0.5px; }
  .terms .or { left: 50%; top: -31px; margin: 0 0 0 -24px; }
  .round { gap: 22px 40px; }
  .round .num-display { font-size: clamp(3rem, 15vw, 4.2rem); }
  .call-row { grid-template-columns: 1fr; }
  .call-number { font-size: clamp(2.6rem, 12.5vw, 3.6rem); }
  .board { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
  .board .lane.is-empty { display: none; }
  .board.is-empty { display: none; }
  .lane ol { min-height: 0; }
  .board-piece { padding: 14px 16px 12px; }
  .post-two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .board-piece.landing { animation: none; }
}
