/*
 * Public spec sheet. Every size is in em of .board, whose font-size is
 * 24px × --k, so the page script can shrink the whole board to fit 1080×1920.
 */
:root {
  --accent: #d21f2b;
  --primary: #1f3a93;
  --ink: #141821;
  --muted: #6b7384;
  --line: #e4e7ee;
  --soft: #f4f6f9;
  --font: Inter, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-ar: Cairo, 'Segoe UI', Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #e9ecf1; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { font-family: var(--font-ar); }
.muted { color: var(--muted); }

.draft { background: #fff4d6; color: #7a5200; text-align: center; padding: 10px 16px; font: 600 14px var(--font); }

/* ---------------------------------------------------------------- board */
.stage { margin: 16px auto 24px; }
.board { --k: 1; font-size: calc(24px * var(--k)); background: #fff; line-height: 1.35; position: relative; }
.board-inner { padding: 1.6em 1.8em 1.4em; display: flex; flex-direction: column; gap: 1.1em; }

/* poster = fixed 1080×1920 portrait, scaled by the script */
.poster body { background: #fff; overflow: hidden; }
.poster .stage { overflow: hidden; margin: 0 auto; }
.poster .board { width: 1080px; height: 1920px; overflow: hidden; transform-origin: top left; }
html[dir="rtl"].poster .board { transform-origin: top right; }
.poster .board-inner { height: 1920px; }

/* phone = normal flowing page */
html:not(.poster) .stage { margin: 10px 0 0; }
html:not(.poster) .board { font-size: 15px; }
html:not(.poster) .board-inner { padding: 18px 16px 24px; }

/* ---------------------------------------------------------------- header & hero */
#secret-exit { cursor: default; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.b-head { direction: ltr; display: flex; justify-content: space-between; align-items: center; min-height: 3em; }
.b-logo img { display: block; height: 3em; max-width: 9.5em; object-fit: contain; }
.b-logo.end img { height: 3.4em; }
.b-logo.square img { height: 9em; max-width: 9em; }
.b-head .b-logo { flex: 1 1 0; }
.b-head .b-logo.end { display: flex; justify-content: flex-end; }
/* Language switch: the only control on the sheet (showroom tablets). */
.b-lang {
  flex: 0 0 auto; padding: .45em 1.3em; border: 1.5px solid #c9ced8; border-radius: 999px; background: #fff;
  color: var(--ink); font: 700 .9em var(--font); text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.b-lang[lang="ar"] { font-family: var(--font-ar); }
/* Its own line above the footer, pinned to the bottom with it. */
.b-terms { margin: auto 0 .9em; font-size: .78em; font-weight: 700; color: var(--ink); }
.b-terms + .b-foot { margin-top: 0; }

.b-hero { text-align: center; position: relative; }
.b-hero h1 { margin: 0; font-size: 3.4em; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.b-sub { margin: .35em 0 0; display: flex; justify-content: center; align-items: center; gap: .5em; flex-wrap: wrap; font-size: 1.25em; font-weight: 700; }
.b-trim { color: var(--accent); }
.b-year { color: #fff; background: var(--ink); border-radius: 999px; padding: .1em .7em; font-size: .85em; }
.b-photo {
  margin: .6em auto 0; height: 13em; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(ellipse 60% 18% at 50% 92%, rgba(20, 24, 33, .16), transparent 70%);
}
.b-photo img { max-height: 100%; max-width: 92%; object-fit: contain; mix-blend-mode: multiply; }
.b-price {
  margin: .5em auto 0; display: inline-flex; flex-direction: column; align-items: center;
  padding: .45em 1.6em .5em; border-radius: 1em; background: var(--soft); border: 1px solid var(--line);
}
.b-price-label { font-size: .75em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .b-price-label { letter-spacing: 0; font-size: .85em; }
.b-price-value { font-size: 2.3em; font-weight: 800; color: var(--accent); line-height: 1.1; }
.b-price-note { font-size: .75em; color: var(--muted); }

/* ---------------------------------------------------------------- highlights */
.b-highlights { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: .5em; }
.b-tile { background: var(--ink); color: #fff; border-radius: .8em; padding: .7em .5em .6em; text-align: center; display: flex; flex-direction: column; gap: .15em; justify-content: center; }
.b-tile-value { font-size: 1.25em; font-weight: 800; line-height: 1.15; }
.b-tile-label { font-size: .7em; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
html[lang="ar"] .b-tile-label { text-transform: none; letter-spacing: 0; font-size: .8em; }

/* ---------------------------------------------------------------- spec cards */
.b-grid { column-count: 2; column-gap: .8em; flex: 1 1 auto; }
.b-card { break-inside: avoid; margin: 0 0 .8em; border: 1px solid var(--line); border-radius: .8em; padding: .75em .9em .6em; background: #fff; }
.b-card h2 {
  margin: 0 0 .5em; font-size: .8em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
  display: flex; align-items: center; gap: .5em;
}
.b-card h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
html[lang="ar"] .b-card h2 { text-transform: none; letter-spacing: 0; font-size: .95em; }

.b-specs { margin: 0; }
.b-spec { display: flex; justify-content: space-between; gap: 1em; padding: .32em 0; border-bottom: 1px dashed var(--line); font-size: .78em; }
.b-spec:last-child { border-bottom: 0; }
.b-spec dt { color: var(--muted); font-weight: 500; }
.b-spec dd { margin: 0; font-weight: 700; text-align: end; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }

.b-features { list-style: none; margin: 0; padding: 0; display: grid; gap: .28em; }
.b-features li { position: relative; padding-inline-start: 1.5em; font-size: .78em; line-height: 1.3; }
.b-features li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .2em; width: .95em; height: .95em; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* ---------------------------------------------------------------- footer */
.b-foot { display: flex; align-items: center; gap: 1em; padding-top: .9em; border-top: 1px solid var(--line); margin-top: auto; }
.b-foot canvas { width: 4.4em; height: 4.4em; flex: 0 0 auto; }
.b-foot-text { display: flex; flex-direction: column; gap: .15em; font-size: .72em; }
.b-foot-text strong { font-size: 1.15em; }

/* ---------------------------------------------------------------- phones */
html:not(.poster) .b-hero h1 { font-size: 2.1em; }
html:not(.poster) .b-photo { height: 11em; }
html:not(.poster) .b-price-value { font-size: 1.9em; }
html:not(.poster) .b-highlights { grid-template-columns: repeat(2, 1fr); }
html:not(.poster) .b-tile-value { font-size: 1.15em; }
html:not(.poster) .b-grid { column-count: 1; }
html:not(.poster) .b-spec, html:not(.poster) .b-features li { font-size: .95em; }
html:not(.poster) .b-card h2 { font-size: .85em; }
html:not(.poster) .b-logo img { height: 2.4em; }
html:not(.poster) .b-logo.square img { height: 6em; }
html:not(.poster) .b-foot canvas { display: none; }
html:not(.poster) .b-foot-text { font-size: .85em; }

/* ---------------------------------------------------------------- print (A4 portrait) */
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body { background: #fff; }
  .draft, .b-lang { display: none; }
  .stage { margin: 0; width: auto !important; height: auto !important; overflow: visible; }
  .board { transform: none !important; width: auto !important; height: auto !important; box-shadow: none !important; border-radius: 0 !important; font-size: 13px !important; }
  .board-inner { height: auto !important; padding: 0; }
  .b-card { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
