/* Premium Card — the card system (Home 1 and every inner page)
   The idea: the page is the card the buyer cannot get. Folder-tab chamfers mark every control,
   surfaces are tone steps of bone, the footer is the back of the card with its magnetic stripe. */

/* ---------- the chamfer: the tab shape returns on every control ---------- */
.tabbed { clip-path: polygon(var(--tab) 0, calc(100% - var(--tab)) 0, 100% var(--tab), 100% 100%, 0 100%, 0 var(--tab)); }

/* ---------- top bar ---------- */
.bar { position: relative; z-index: 40; background: var(--bg); }
.bar__row { display: flex; align-items: center; gap: var(--gutter); min-height: var(--bar); }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: var(--step-body); white-space: nowrap; }
.wordmark svg { width: 30px; height: 20px; flex: none; }
.bar__links { display: none; gap: clamp(1rem, 2vw, 2rem); margin-inline-start: auto; }
.bar__links a { text-decoration: none; font-size: var(--step-small); font-weight: 500; padding-block: 0.4rem; text-underline-offset: 0.35em; text-decoration-thickness: 2px; }
.bar__links a[aria-current="page"], .bar__links a:hover { text-decoration-line: underline; }
.bar__actions { display: flex; align-items: center; gap: 0.25rem; margin-inline-start: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 44px; min-height: 44px; padding-inline: 0.5rem; text-decoration: none; font-size: var(--step-small); font-weight: 500; transition: background-color var(--t-hover) ease; }
.icon-btn .ph, .icon-btn .ph-bold { font-size: 1.35rem; }
.count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding-inline: 0.3rem; background: var(--accent); color: var(--accent-ink); --text: currentColor; --heading: currentColor; font-size: var(--step-small); font-weight: 700; line-height: 1.2; }
.only-wide { display: none !important; }
.menu-btn { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface); } }
@media (min-width: 64em) {
  .bar__links { display: flex; }
  .bar__links + .bar__actions { margin-inline-start: 0; }
  .only-wide { display: inline-flex !important; }
  .menu-btn { display: none !important; }
}

/* the search field inside the bar (inner pages) */
.bar__search { display: none; position: relative; flex: 0 1 22rem; }
.bar__search input { width: 100%; min-height: 44px; padding-block: 0; padding-inline: 2.6rem 1rem; background: var(--surface); border: 0; font-size: var(--step-small); }
.bar__search .ph { position: absolute; inset-inline-start: 0.85rem; top: 50%; translate: 0 -50%; color: var(--muted); }
@media (min-width: 80em) { .bar__search { display: block; } }

/* ---------- mobile sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; background: var(--field-1); color: var(--field-1-ink); --text: currentColor; --heading: currentColor; display: flex; flex-direction: column; padding: 0 var(--margin) var(--margin); overflow-y: auto; }
.sheet__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--bar); }
.sheet__links { display: grid; gap: 0.25rem; margin-top: 1.5rem; }
.sheet__links a { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.45; text-decoration: none; }
.sheet__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: 0.5rem; font-size: var(--step-small); }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0 1.6rem;
  background: var(--accent); color: var(--accent-ink); --text: currentColor; --heading: currentColor;
  font-weight: 600; font-size: var(--step-body); text-decoration: none; white-space: nowrap;
  clip-path: polygon(var(--tab) 0, calc(100% - var(--tab)) 0, 100% var(--tab), 100% 100%, 0 100%, 0 var(--tab));
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.btn:active { transform: scale(0.97); }
.btn--quiet { background: var(--surface-2); color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: var(--bg); --text: currentColor; --heading: currentColor; }
  .btn--quiet:hover { background: var(--ink); color: var(--bg); --text: currentColor; --heading: currentColor; }
}
.textlink { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; font-weight: 500; }
.textlink:hover { text-decoration-thickness: 2px; }

/* ---------- fields ---------- */
.field { display: grid; gap: 0.45rem; }
.field label, .label { font-size: var(--step-small); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 3.25rem; padding: 0.8rem 1rem;
  background: var(--bg); border: 1.5px solid var(--muted); border-radius: 0; font-size: max(1rem, var(--step-body));
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.8; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.textarea { min-height: 9rem; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: -2.5px; }
.input[aria-invalid="true"] { border-color: var(--danger); outline: 1px solid var(--danger); outline-offset: -2.5px; }
.hint { font-size: var(--step-small); color: var(--muted); }
.error { font-size: var(--step-small); color: var(--danger); font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 0.7rem; cursor: pointer; font-size: var(--step-small); }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--accent); flex: none; }

/* ---------- sections and headings ---------- */
.sec { padding-block: calc(var(--section) / 2); }
.sec--first { padding-top: clamp(2rem, 5vw, 4rem); }
.sec-title { font-size: var(--step-head); line-height: 1.3; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem var(--gutter); margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sec-head p { color: var(--ink); max-width: 46ch; }
.field-sec { background: var(--field-1); color: var(--field-1-ink); --text: currentColor; --heading: currentColor; }
.field-sec .muted { color: var(--field-1-ink); opacity: 0.85; }
.tone-sec { background: var(--surface); }

/* page title band on inner pages */
.page-title { padding-block: clamp(2rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.page-title h1 { font-size: var(--step-head); line-height: 1.3; max-width: 22ch; }
.page-title p { margin-top: 1rem; font-size: var(--step-lead); line-height: 1.75; max-width: 46ch; }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--step-small); color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.4rem; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); padding: clamp(1.25rem, 3vw, 2rem); }
.panel--deep { background: var(--surface-2); }

/* ---------- text tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.tabs button, .tabs a { min-height: 44px; font-size: var(--step-lead); font-weight: 500; color: var(--muted); text-decoration: none; text-underline-offset: 0.35em; text-decoration-thickness: 3px; transition: color var(--t-hover) ease; }
.tabs [aria-selected="true"], .tabs [aria-current="true"] { color: var(--ink); text-decoration-line: underline; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }

/* ---------- name and price rows ---------- */
.rows { display: grid; gap: 1.4rem; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1.5rem; align-items: baseline; text-decoration: none; }
.row__name { font-size: var(--step-body); font-weight: 500; }
.row__price { font-size: var(--step-body); white-space: nowrap; }
.row__note { grid-column: 1 / -1; font-size: var(--step-small); color: var(--muted); max-width: 40ch; }
a.row:hover .row__name { text-decoration: underline; text-underline-offset: 0.22em; }

/* ---------- accordion ---------- */
.acc { display: grid; gap: 0.5rem; }
.acc details { background: var(--surface); transition: background-color var(--t-hover) ease; }
.tone-sec .acc details, .field-sec .acc details { background: var(--bg); }
.acc details[open] { background: var(--surface-2); }
.tone-sec .acc details { border-inline-start: 4px solid transparent; }
.tone-sec .acc details[open] { background: var(--bg); border-inline-start-color: var(--ink); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4rem; padding: 1.1rem 1.4rem; color: var(--ink); font-size: var(--step-body); font-weight: 600; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ph { transition: transform var(--t-ui) var(--ease-out); }
.acc details[open] summary .ph { transform: rotate(45deg); }
.acc .acc__body { padding: 0 1.4rem 1.4rem; color: var(--text); max-width: 62ch; line-height: 1.9; }

/* ---------- quantity stepper ---------- */
.qty { display: inline-flex; align-items: center; background: var(--surface-2); }
.qty button { width: 44px; height: 44px; display: grid; place-items: center; }
.qty button:hover { background: var(--ink); color: var(--bg); --text: currentColor; --heading: currentColor; }
.qty output { min-width: 2.5rem; text-align: center; font-weight: 700; }

/* ---------- service mark tile ---------- */
.mark { display: grid; place-items: center; aspect-ratio: 1; background: var(--surface); }
.mark img { width: 48%; height: 48%; object-fit: contain; }
:root[data-theme="dark"] .mark img { filter: invert(0.92); }
.mark__mono { font-family: var(--font-display); font-weight: 800; font-size: 1.6em; line-height: 1.2; }

/* ---------- state labels (inside tables and lists only) ---------- */
.state { display: inline-block; padding: 0.2rem 0.6rem; background: var(--surface-2); font-size: var(--step-small); font-weight: 600; }
.state--ok { background: var(--accent); color: var(--accent-ink); --text: currentColor; --heading: currentColor; }

/* ---------- empty state ---------- */
.empty { display: grid; gap: 1rem; justify-items: start; padding: clamp(2rem, 5vw, 3.5rem); background: var(--surface); }
.empty .ph { font-size: 3rem; }
.empty h2 { font-size: var(--step-lead); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--step-small); }
.table th { text-align: start; font-weight: 600; padding: 0.8rem 0.6rem; background: var(--surface-2); }
.table td { padding: 0.9rem 0.6rem; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }

/* ---------- footer: the back of the card ---------- */
.foot { background: var(--field-1); color: var(--field-1-ink); --text: currentColor; --heading: currentColor; overflow: hidden; }
.foot__stripe { height: clamp(40px, 5vw, 64px); background: #0f1204; }
:root[data-theme="dark"] .foot__stripe { background: #000; }
.foot__name { display: block; max-width: none; font-family: var(--font-display); font-weight: 800; line-height: 1.3; white-space: nowrap; margin-top: clamp(4.5rem, 9vw, 7rem); }
.foot__body { display: grid; gap: 3rem var(--gutter); padding-top: clamp(3rem, 6vw, 4.5rem); }
.foot__places { display: grid; gap: 0.35rem; }
.foot__places a { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); line-height: 1.45; text-decoration: none; }
.foot__places a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
.foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem var(--gutter); }
.foot__cols h3 { font-family: var(--font-text); font-size: var(--step-small); font-weight: 700; margin-bottom: 0.75rem; }
.foot__cols ul { display: grid; gap: 0.45rem; list-style: none; padding: 0; }
.foot__cols a { text-decoration: none; font-size: var(--step-small); }
.foot__cols a:hover { text-decoration: underline; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: clamp(3rem, 7vw, 6rem) 1.5rem; font-size: var(--step-small); }
.foot__legal a { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 64em) {
  .foot__body { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .foot__places { grid-column: 1 / span 5; }
  .foot__cols { grid-column: 7 / span 6; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

