/* Erth Al-Karam United v9 - "security print": ivory security paper, navy intaglio ink,
   guilloche signal rings, brass foil. Brand values: إدارة التواصل الاجتماعي/01 - الهوية/brand.md */

@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--paper: #F7F1E5;      /* Ivory: the security paper */
	--paper-2: #EFE5D0;    /* one tone step: panels printed on the paper */
	--paper-3: #E6D8BC;
	--ink: #002846;        /* Karam Navy: intaglio ink */
	--ink-hi: #0B3A5E;
	--text: #13202D;
	--soft: #3D4F5E;       /* secondary text on paper, 7:1 */
	--line: #1E4C60;       /* Heritage Teal: guilloche linework */
	--mist: #5A8A94;
	--brass: #BF9555;      /* foil, seals, stamps */
	--brass-hi: #D2AC6F;
	--brass-ink: #6E4F1F;  /* brass as text on paper, 5:1 */
	--cyan: #00A8CC;       /* the live signal only */
	--night: #001A2E;      /* the reverse side */
	--night-text: #E9E2D3;
	--night-soft: #C3D2DC;

	--f-display: "Cairo", "Tajawal", system-ui, sans-serif;
	--f-text: "Tajawal", "Cairo", system-ui, sans-serif;

	--s-display: clamp(40px, 5vw, 80px);
	--s-h2: clamp(30px, 3.4vw, 54px);
	--s-h3: clamp(21px, 1.7vw, 27px);
	--s-body: clamp(17px, 1.2vw, 19px);
	--s-small: 15px;

	--edge: clamp(20px, 5vw, 88px);  /* the paper's own margin: what the hero rosette bleeds into */
	--m: max(var(--edge), (100vw - 1760px) / 2);
	--gap: clamp(16px, 2vw, 32px);
	--sec: clamp(96px, 11vw, 176px);
	--out: cubic-bezier(.16, 1, .3, 1);
	color-scheme: light;
	accent-color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; scrollbar-color: var(--line) var(--paper-2); }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 var(--s-body)/1.8 var(--f-text); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; caret-color: var(--ink); }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); line-height: 1.2; text-wrap: balance; }
a { color: inherit; text-underline-offset: .3em; text-decoration-thickness: 1px; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.en) .t-en, html.en .t-ar { display: none; }
html.en body { line-height: 1.65; }
html.en h1, html.en h2 { letter-spacing: -.02em; }
.skip { position: absolute; inset-inline-start: var(--m); top: -80px; z-index: 60; background: var(--ink); color: var(--paper); padding: 12px 18px; }
.skip:focus { top: 12px; }

/* ---------- the world's materials ---------- */
.band { display: block; width: 100%; height: 14px; overflow: visible; }
.band path { fill: none; stroke: var(--line); stroke-width: .9; vector-effect: non-scaling-stroke; opacity: .75; }
.rosette { width: 96px; height: 96px; }
.rosette path { fill: none; stroke: var(--mist); stroke-width: .7; vector-effect: non-scaling-stroke; }
.micro { font: 700 10.5px/1.4 var(--f-display); letter-spacing: .24em; color: var(--line); white-space: nowrap; overflow: hidden; direction: ltr; text-align: left; opacity: .85; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* engraved photograph: navy intaglio on paper; true colour when looked at */
.eng { position: relative; overflow: hidden; background: var(--paper); isolation: isolate; }
.eng img, .eng video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; transition: filter .7s var(--out); }
.eng::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--ink); mix-blend-mode: screen; transition: opacity .7s var(--out); pointer-events: none; }
.eng:hover img, .eng:focus-within img, .plate:hover .eng img, .step.now .eng img, .step.now .eng video, .eng:hover video { filter: none; mix-blend-mode: normal; }
.eng:hover::before, .plate:hover .eng::before, .step.now .eng::before { opacity: 0; }
.eng.engraved img { filter: none; mix-blend-mode: normal; }
.eng.engraved::before { display: none; }

/* stamps: the one action, printed */
.stamp {
	display: inline-flex; align-items: center; justify-content: center; gap: .65em; min-height: 56px; padding: 0 30px;
	background: var(--ink); color: var(--paper); font: 700 18px/1.2 var(--f-text); text-decoration: none; border: 0; border-radius: 0;
	outline: 1.5px solid var(--ink); outline-offset: 4px; cursor: pointer; position: relative;
	transition: background-color .25s, outline-offset .25s var(--out), transform .15s;
}
.stamp:hover { background: var(--ink-hi); outline-offset: 6px; }
.stamp:active { transform: translateY(1px) scale(.985); outline-offset: 2px; }
.stamp:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.stamp-sm { min-height: 44px; padding: 0 18px; font-size: 16px; outline-offset: 3px; }
.stamp-brass { background: var(--brass); color: var(--night); outline-color: var(--brass); }
.stamp-brass:hover { background: var(--brass-hi); }
/* the press leaves an ink ring that spreads into the paper */
.stamp::after { content: ""; position: absolute; inset: 0; outline: 1.5px solid var(--ink); outline-offset: 4px; opacity: 0; pointer-events: none; }
.stamp-brass::after { outline-color: var(--brass); }
.stamp.inked::after { animation: ink .6s var(--out); }
@keyframes ink { from { opacity: .9; outline-offset: 4px; } to { opacity: 0; outline-offset: 22px; } }

/* ---------- header ---------- */
.bar {
	position: sticky; top: 0; z-index: 40; background: var(--paper);
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 14px var(--m) 0;
}
.admin-bar .bar { top: 32px; }
.bar .band { grid-column: 1 / -1; height: 10px; margin-top: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 46px; height: 46px; }
.brand-name { font: 800 20px/1.1 var(--f-display); color: var(--ink); white-space: nowrap; }
.nav { display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a { position: relative; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; padding: 8px 0; }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 2px; background: var(--brass); transform: scaleX(0); transition: transform .35s var(--out); }
.nav a:hover::after { transform: scaleX(1); }
.bar-end { display: flex; align-items: center; gap: 12px; }
.lang { min-width: 48px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 700 15px/1 var(--f-display); cursor: pointer; transition: background-color .2s, color .2s; }
.lang:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); align-items: center; gap: 0 clamp(24px, 3vw, 56px); padding: 12px var(--m) 0; min-height: calc(100svh - 110px); }
.hero-copy { padding-block: 24px; }
.hero h1 { font-size: min(5.6vw, 96px); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.hero h1 .l { display: block; white-space: nowrap; }
.lead { margin-top: 28px; max-width: 34em; font-size: clamp(18px, 1.35vw, 21px); color: var(--text); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 30px; margin-top: 40px; }
.tel { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; padding-block: 8px; border-bottom: 2px solid var(--brass); transition: border-color .2s, color .2s; }
.tel:hover { color: var(--brass-ink); }
.hero > .micro { grid-column: 1 / -1; padding-block: 10px 14px; }

.signal { position: relative; width: calc(100% + var(--edge)); max-width: min(600px, 62svh); justify-self: end; margin-inline-end: calc(-1 * var(--edge)); }
.rings { width: 100%; height: auto; overflow: visible; }
.rings .core path { fill: none; stroke: var(--line); stroke-width: .7; opacity: .7; }
.rings .cover { transform-origin: 360px 360px; transition: transform .9s var(--out); }
.rings .cover path { fill: none; stroke: var(--mist); stroke-width: 1.2; }
.rings .cover path.edge { stroke: var(--cyan); stroke-width: 2; }
.rings .cover path.wave { stroke: var(--line); stroke-width: 1.4; opacity: 0; transform-origin: 360px 360px; }
.rings text { font: 700 21px var(--f-text); fill: var(--line); text-anchor: middle; direction: ltr; unicode-bidi: plaintext; }
.oval { position: absolute; left: 50%; top: 50%; width: 31%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%; border: 2.5px solid var(--ink); outline: 1.5px solid var(--brass); outline-offset: 7px; }
.seal { position: absolute; top: 2%; inset-inline-end: calc(var(--edge) * .8); width: clamp(96px, 9vw, 132px); aspect-ratio: 1; border-radius: 50%; background: var(--brass); display: grid; place-items: center; text-align: center; color: var(--night); }
.seal .rosette { position: absolute; inset: 6%; width: 88%; height: 88%; }
.seal .rosette path { stroke: var(--night); opacity: .18; }
.seal span { position: relative; font: 800 clamp(13px, 1.05vw, 15px)/1.35 var(--f-display); }
.calc { margin: 0; margin-inline: auto var(--edge); max-width: 520px; display: grid; gap: 6px; }
.calc label { font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.calc output { font-family: var(--f-display); font-weight: 800; }
.calc input[type=range] { width: 100%; height: 36px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.calc input[type=range]::-webkit-slider-runnable-track { height: 6px; background: var(--paper-3); }
.calc input[type=range]::-moz-range-track { height: 6px; background: var(--paper-3); }
.calc input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); outline: 1.5px solid var(--ink); }
.calc input[type=range]::-moz-range-thumb { box-sizing: border-box; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); outline: 1.5px solid var(--ink); }
.calc-out { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--soft); }
.calc-out strong { font: 800 clamp(26px, 2.2vw, 34px)/1 var(--f-display); color: var(--ink); white-space: nowrap; }
.calc-note { font-size: var(--s-small); color: var(--soft); }

/* ---------- bridge ---------- */
.bridge { padding: var(--sec) var(--m) calc(var(--sec) * .7); text-align: center; }
.bridge-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .7fr) minmax(0, 1fr); align-items: start; gap: var(--gap); margin-top: clamp(40px, 5vw, 72px); }
.bridge-side { display: grid; justify-items: center; gap: 18px; }
.bridge-side .eng { width: min(100%, 360px); aspect-ratio: 3 / 4; }
.arch { border-radius: 999px 999px 0 0; border: 2px solid var(--ink); outline: 1.5px solid var(--brass); outline-offset: 6px; }
.bridge-side h3 { font-size: var(--s-h3); font-weight: 800; margin-top: 10px; }
.bridge-side p { max-width: 30em; color: var(--text); }
.bridge-span { align-self: center; margin-top: -120px; }
.bridge-span .band { height: 30px; }
.bridge-span .band path { stroke: var(--line); opacity: .8; }

/* ---------- fields ---------- */
.fields { padding: 0 var(--m) var(--sec); }
.fields > .band { margin-bottom: clamp(56px, 7vw, 96px); }
.fields-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "comms heritage heritage" "comms tech build"; gap: var(--gap); margin-top: clamp(32px, 4vw, 56px); }
.field { position: relative; background: var(--paper-2); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.field-comms { grid-area: comms; } .field-heritage { grid-area: heritage; } .field-tech { grid-area: tech; } .field-build { grid-area: build; }
.field > .band { margin: calc(-1 * clamp(28px, 3vw, 44px)) calc(-1 * clamp(28px, 3vw, 44px)) 8px; width: calc(100% + 2 * clamp(28px, 3vw, 44px)); height: 14px; }
.field h3 { font-size: clamp(24px, 2vw, 32px); font-weight: 800; max-width: 12em; }
.field-sum { color: var(--text); max-width: 32em; }
.field ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 20px; }
.field li { position: relative; padding-inline-start: 20px; font-weight: 500; color: var(--ink); line-height: 1.6; }
.field li::before { content: ""; position: absolute; inset-inline-start: 0; top: .68em; width: 8px; height: 8px; background: var(--brass); transform: rotate(45deg); }
.field-photo { margin-top: auto; aspect-ratio: 16 / 9; }
.field-comms .field-photo { aspect-ratio: 4 / 5; }
.field-heritage { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 44px); align-content: start; }
.field-heritage > .band { grid-column: 1 / -1; }
.field-heritage > :not(.field-photo):not(.band) { grid-column: 1; }
.field-heritage .field-photo { grid-column: 2; grid-row: 2 / span 3; aspect-ratio: 4 / 5; margin: 0; }

/* ---------- site study form ---------- */
.site { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); padding: 0 var(--m) var(--sec); align-items: start; }
.sheet-lead { margin-top: 16px; color: var(--text); max-width: 30em; }
.choices { border: 0; margin: 32px 0 0; padding: 0; display: grid; }
.choice { position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 4px; cursor: pointer; border-bottom: 1px solid var(--paper-3); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 26px; height: 26px; flex: none; border: 2px solid var(--ink); display: grid; place-items: center; transition: background-color .2s; }
.box::after { content: ""; width: 12px; height: 7px; border: solid var(--paper); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.choice-name { font: 700 clamp(19px, 1.6vw, 24px)/1.35 var(--f-display); color: var(--soft); transition: color .2s; }
.choice:hover .choice-name { color: var(--ink); }
.choice input:checked ~ .box { background: var(--ink); }
.choice input:checked ~ .box::after { opacity: 1; }
.choice input:checked ~ .choice-name { color: var(--ink); }
.choice input:focus-visible ~ .box { outline: 3px solid var(--brass); outline-offset: 3px; }
.receipt { background: var(--paper-2); padding: 0 clamp(24px, 3vw, 48px) clamp(28px, 3vw, 44px); display: grid; gap: 22px; position: sticky; top: 110px; }
.receipt > .band { margin-inline: calc(-1 * clamp(24px, 3vw, 48px)); width: calc(100% + 2 * clamp(24px, 3vw, 48px)); height: 18px; }
.receipt-no { font: 700 11px/1 var(--f-display); letter-spacing: .24em; color: var(--brass-ink); }
.stub { display: grid; gap: 18px; margin-inline: calc(-1 * clamp(24px, 3vw, 48px)); padding: 22px clamp(24px, 3vw, 48px) 0; border-top: 2px dashed var(--paper-3); position: relative; }
.stub::before, .stub::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); }
.stub::before { inset-inline-start: -10px; } .stub::after { inset-inline-end: -10px; }
.answer h3 { font-size: var(--s-h3); font-weight: 800; margin-bottom: 14px; }
.answer ol { counter-reset: n; display: grid; gap: 10px; }
.answer li { counter-increment: n; display: grid; grid-template-columns: 2.2em 1fr; gap: 8px; line-height: 1.55; }
.answer li::before { content: counter(n); font: 800 var(--s-small)/1.6 var(--f-display); color: var(--brass-ink); }
.receipt-need { color: var(--soft); font-size: var(--s-small); }
.receipt .stamp { justify-self: start; }
.ring-micro { font: 700 9px var(--f-display); letter-spacing: .3em; fill: var(--line); direction: ltr; opacity: .8; }
@supports selector(:has(*)) {
	.answer { display: none; }
	.site:has(input[value="oil"]:checked) [data-answer="oil"], .site:has(input[value="port"]:checked) [data-answer="port"],
	.site:has(input[value="office"]:checked) [data-answer="office"], .site:has(input[value="security"]:checked) [data-answer="security"],
	.site:has(input[value="heritage"]:checked) [data-answer="heritage"] { display: block; animation: printin .5s var(--out); }
}
@keyframes printin { from { opacity: .2; filter: blur(2px); } }

/* ---------- devices: the reverse side ---------- */
.devices { position: relative; background: var(--night); color: var(--night-text); padding: var(--sec) var(--m); overflow: hidden; isolation: isolate; }
.devices .h2 { color: var(--paper); }
.devices-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 88px); align-items: end; }
.devices-head p { color: var(--night-soft); max-width: 36em; }
.specimens { display: grid; grid-template-columns: .8fr .8fr 1.2fr 1.4fr; gap: var(--gap); align-items: end; margin-top: clamp(56px, 7vw, 104px); }
.specimen { display: grid; gap: 10px; }
.specimen img { margin-bottom: 18px; transition: transform .6s var(--out); }
.specimen:hover img { transform: translateY(-10px); }
.specimen-hytera-hp78x img, .specimen-hytera-hp79xex img { height: clamp(240px, 27vw, 420px); width: auto; }
.specimen-hytera-hm78x img { width: min(100%, 340px); }
.specimen-hytera-rd98x img { width: min(100%, 420px); }
.specimen h3 { color: var(--brass); font-size: var(--s-h3); font-weight: 700; }
.specimen p { color: var(--night-soft); max-width: 22em; }
.devices-note { margin-top: 48px; font-size: var(--s-small); color: var(--night-soft); }

/* ---------- method: one serial row ---------- */
.method { padding: var(--sec) var(--m); }
.track { position: relative; margin-top: clamp(40px, 5vw, 72px); overflow-x: auto; scrollbar-width: thin; padding-bottom: 8px; }
.track-line { position: absolute; top: 4px; inset-inline: 0; width: 100%; min-width: 1400px; height: 24px; }
.track-line path { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.steps { position: relative; display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 20px; min-width: 1400px; }
.step { display: flex; flex-direction: column; gap: 10px; cursor: default; }
.node-row { display: flex; align-items: center; gap: 10px; margin: 7px 0 10px; }
.node { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); transition: background-color .3s, transform .4s var(--out); }
.step.now .node { background: var(--brass); border-color: var(--brass); transform: scale(1.35); }
.serial { font: 700 11px/1 var(--f-display); letter-spacing: .2em; color: var(--brass-ink); }
.step h3 { font-size: 20px; font-weight: 800; }
.step p { font-size: var(--s-small); line-height: 1.6; color: var(--soft); min-height: 4.8em; }
.step-photo { aspect-ratio: 4 / 5; margin-top: 6px; }
@media (min-width: 1280px) { .steps, .track-line { min-width: 0; } .steps { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* ---------- work ---------- */
.work { padding: 0 var(--m) var(--sec); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.filters { display: flex; gap: 6px; }
.filters button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 700 16px/1 var(--f-text); cursor: pointer; transition: background-color .2s, color .2s; }
.filters button:hover { background: var(--paper-2); }
.filters button.on { background: var(--ink); color: var(--paper); }
.plates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(180px, 16vw, 250px); grid-auto-flow: dense; gap: var(--gap); margin-top: clamp(32px, 4vw, 56px); }
.plate { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.plate-link { flex: 1; min-height: 0; display: flex; cursor: zoom-in; }
.plate .eng { flex: 1; min-height: 0; }
.plate p { font-size: var(--s-small); color: var(--soft); line-height: 1.4; }
.plate.tall { grid-row: span 2; } .plate.wide { grid-column: span 2; }
.plate[hidden] { display: none; }

/* ---------- company certificate ---------- */
.company { padding: 0 var(--m) var(--sec); }
.cert { position: relative; max-width: 1080px; margin: 0 auto; background: var(--paper-2); outline: 2px solid var(--ink); outline-offset: 10px; }
.corner { position: absolute; width: 72px; height: 72px; background: var(--paper); border-radius: 50%; z-index: 1; }
.corner .rosette { width: 100%; height: 100%; }
.corner .rosette path { stroke: var(--line); }
.corner.c0 { top: -36px; left: -36px; } .corner.c1 { top: -36px; right: -36px; } .corner.c2 { bottom: -36px; left: -36px; } .corner.c3 { bottom: -36px; right: -36px; }
.cert > .band { height: 22px; }
.cert-body { padding: clamp(32px, 5vw, 72px) clamp(24px, 6vw, 96px); display: grid; justify-items: center; text-align: center; gap: 14px; }
.cert-mark { width: 96px; height: 96px; }
.cert-name { color: var(--soft); font-size: var(--s-small); letter-spacing: .02em; max-width: 46em; }
.cert-rows { display: grid; width: 100%; margin-top: 24px; text-align: start; }
.cert-rows div { display: grid; grid-template-columns: minmax(110px, .3fr) 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--paper-3); }
.cert-rows dt { color: var(--soft); }
.cert-rows dd { color: var(--ink); font-weight: 500; }
.cert-mark-note { margin-top: 18px; color: var(--soft); max-width: 40em; }

/* ---------- contact & footer: back on the paper ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; background: var(--paper); color: var(--text); padding: var(--sec) var(--m) clamp(64px, 7vw, 104px); display: grid; justify-items: start; gap: clamp(32px, 4vw, 48px); }
.big-rosette { position: absolute; z-index: -1; inset-inline-end: -6vw; top: 50%; width: min(52vw, 640px); transform: translateY(-50%); opacity: .5; pointer-events: none; }
.big-rosette .rosette { width: 100%; height: auto; }
.big-rosette .rosette path { stroke: var(--mist); stroke-width: .8; }
.contact .big-rosette { opacity: .4; }
.devices .big-rosette { top: 0; transform: translateY(-30%); opacity: .3; }
.contact-title { font-size: clamp(36px, 5vw, 80px); font-weight: 900; color: var(--ink); max-width: 14em; line-height: 1.15; }
.contact .stamp { min-height: 64px; font-size: 19px; }
.contact-lines { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 16px 64px; }
.contact-lines li { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.contact-lines .ico { color: var(--brass-ink); }
.contact-lines a { color: var(--ink); text-decoration: none; font-weight: 700; }
.contact-lines a:hover { color: var(--brass-ink); }
.foot { background: var(--paper); color: var(--soft); padding: 0 var(--m) 28px; }
.foot .micro { padding: 18px 0; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: var(--s-small); }
.foot-links { display: flex; gap: 24px; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 500; }
.foot a:hover { color: var(--brass-ink); }

/* ---------- plain pages ---------- */
.plain { max-width: 820px; margin: 0 auto; padding: 120px var(--m) 96px; display: grid; gap: 28px; }
.plain h1 { font-size: var(--s-h2); }
.plain .stamp { justify-self: start; }

.h2 { font-size: var(--s-h2); font-weight: 900; }

/* ---------- motion: the engraving is cut once, then the signal breathes ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js .bar .band path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cut 1.8s var(--out) .2s forwards; }
	.drawer { translate: 0 100%; transition: translate .45s var(--out), display .45s allow-discrete, overlay .45s allow-discrete; }
	.drawer:popover-open { translate: 0 0; }
	@starting-style { .drawer:popover-open { translate: 0 100%; } }
	/* the language switch turns the sheet: the new side is printed in from where it is read */
	html.flip::view-transition-old(root) { animation: none; }
	html.flip::view-transition-new(root) { animation: turn-ar .7s var(--out); }
	html.flip.en::view-transition-new(root) { animation-name: turn-en; }
	::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--out); }
}
@keyframes turn-ar { from { clip-path: inset(0 0 0 100%); } }
@keyframes turn-en { from { clip-path: inset(0 100% 0 0); } }
/* guilloche borders are engraved as the reader reaches them; rosettes turn with the scroll */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		main .band path { stroke-dasharray: 1; animation: draw linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
		main .band path:nth-child(even) { animation-name: draw-back; }
		.field .band path { animation-range: entry 25% cover 50%; }
		.receipt .band path { animation-range: entry 0% cover 25%; }
		.cert .band path { animation-range: entry 0% cover 55%; }
		.big-rosette .rosette { animation: spin linear both; animation-timeline: view(); }
		.seal .rosette { animation: spin-seal linear both; animation-timeline: scroll(root); }
		.rings .core { transform-origin: 360px 360px; animation: spin-core linear both; animation-timeline: scroll(root); animation-range: 0px 1000px; }
	}
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes draw-back { from { stroke-dashoffset: -1; } to { stroke-dashoffset: 0; } }
@keyframes spin { from { rotate: -24deg; } to { rotate: 24deg; } }
@keyframes spin-seal { to { rotate: 360deg; } }
@keyframes spin-core { to { rotate: -36deg; } }
@media (prefers-reduced-motion: no-preference) {
	.js .rings .core path, .js .rings .cover path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cut 2.4s var(--out) forwards; }
	.js .rings .core path:nth-child(odd) { animation-delay: .15s; }
	.js .rings .cover path { animation-delay: .6s; }
	.js .rings .cover path.edge { animation: cut 2.4s var(--out) .9s forwards, pulse 4.8s ease-in-out 3.4s infinite; }
}
@keyframes cut { to { stroke-dashoffset: 0; } }
@keyframes pulse { 50% { stroke-width: 3.5; opacity: .55; } }

/* ---------- viewer: a work photo printed large, in its true colour ---------- */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(16px, 3vw, 40px) var(--m) calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom)); border: 0; background: var(--paper); color: var(--text); overscroll-behavior: contain; }
.viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: clamp(16px, 2vw, 24px); animation: fadein .3s var(--out); }
.viewer::backdrop { background: var(--paper); }
.viewer-plate { min-height: 0; display: grid; align-content: center; gap: 18px; justify-items: center; }
.viewer-plate img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; border: 2px solid var(--ink); outline: 1.5px solid var(--brass); outline-offset: 6px; touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
.viewer-plate img.pass { animation: pass .8s var(--out); }
.viewer figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 18px; color: var(--soft); font-size: var(--s-small); text-align: center; }
.viewer-acts { display: flex; justify-content: center; gap: 10px; }
.viewer-btn { display: grid; place-items: center; width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s; }
.viewer-btn:hover { background: var(--ink); color: var(--paper); }
html:not(.en) .viewer .prev .ico, html.en .viewer .next .ico { transform: scaleX(-1); }
@keyframes pass { from { clip-path: inset(0 0 100% 0); } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- phone dock and the sections drawer ---------- */
.dock, .drawer { display: none; }
.dock-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 0 6px; border: 0; background: transparent; color: var(--ink); font: 700 15px/1.1 var(--f-text); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dock-btn:active { color: var(--brass-ink); }
@supports selector(:popover-open) {
	.drawer:popover-open { display: block; }
}
.drawer { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 86dvh; margin: 0; padding: 0 var(--m) calc(18px + env(safe-area-inset-bottom)); border: 0; background: var(--paper); color: var(--text); overflow-y: auto; overscroll-behavior: contain; }
.drawer::backdrop { background: rgb(19 32 45 / .45); }
.drawer > .band { margin: 0 calc(-1 * var(--m)) 6px; width: calc(100% + 2 * var(--m)); height: 12px; }
.drawer nav { display: grid; }
.drawer nav a { position: relative; display: flex; align-items: center; min-height: 58px; padding-inline-start: 24px; border-bottom: 1px solid var(--paper-3); color: var(--ink); font: 800 21px/1.2 var(--f-display); text-decoration: none; }
.drawer nav a::before { content: ""; position: absolute; inset-inline-start: 2px; width: 8px; height: 8px; background: var(--brass); transform: rotate(45deg); transition: transform .3s var(--out); }
.drawer nav a:active::before { transform: rotate(45deg) scale(1.6); }
.drawer-close { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 18px; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 700 16px/1 var(--f-text); cursor: pointer; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
	.nav, .bar .stamp-sm { display: none; }
	body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
	.dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 16px var(--m) calc(8px + env(safe-area-inset-bottom)); background: var(--paper); }
	.dock > .band { position: absolute; inset-inline: 0; top: 0; height: 8px; }
	.dock .stamp { min-height: 48px; padding: 0 12px; font-size: 17px; outline-offset: 3px; }
	.dock .stamp::after { outline-offset: 3px; }
	.hero { grid-template-columns: 1fr; min-height: 0; }
	.hero h1 { font-size: 7.4vw; }
	.signal { max-width: 600px; width: 100%; margin-inline-end: 0; justify-self: center; }
	.calc { margin-inline-end: auto; }
	.seal { inset-inline-end: 0; }
	.rings text { font-size: 26px; }
	.fields-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "comms heritage" "comms tech" "build build"; }
	.field-heritage { display: flex; }
	.field-heritage .field-photo { aspect-ratio: 16 / 9; }
	.site { grid-template-columns: 1fr; }
	.receipt { position: static; }
	.specimens { grid-template-columns: 1fr 1fr; row-gap: 64px; }
	.devices-head { grid-template-columns: 1fr; }
	.plates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 680px) {
	:root { --edge: 20px; --m: 20px; --sec: 88px; }
	.bar { gap: 10px; padding-top: 10px; }
	.brand img { width: 38px; height: 38px; }
	.brand-name { font-size: 17px; }
	.stamp-sm span { display: none; }
	.stamp-sm { padding: 0 12px; }
	.hero { padding-top: 24px; }
	.hero h1 { font-size: 8.8vw; }
	.acts { gap: 18px; }
	.acts .stamp { width: 100%; }
	.seal { width: 88px; top: 0; }
	.rings text { font-size: 30px; }
	.signal { width: 100%; margin-inline-end: 0; max-width: 100%; }
	.calc { margin-inline-end: 0; }
	.seal { inset-inline-end: 0; }
	.corner { width: 48px; height: 48px; }
	.corner.c0, .corner.c1 { top: -24px; } .corner.c2, .corner.c3 { bottom: -24px; } .corner.c0, .corner.c2 { left: -14px; } .corner.c1, .corner.c3 { right: -14px; }
	.cert { outline-offset: 6px; }
	.bridge { text-align: start; }
	.bridge-row { grid-template-columns: 1fr; gap: 56px; }
	.bridge-span { display: none; }
	.bridge-side { justify-items: start; }
	.fields-grid { grid-template-columns: 1fr; grid-template-areas: "comms" "heritage" "tech" "build"; }
	.field ul { grid-template-columns: 1fr; }
	.field-comms .field-photo { aspect-ratio: 16 / 10; }
	.specimens { grid-template-columns: 1fr 1fr; }
	.specimen-hytera-hp78x img, .specimen-hytera-hp79xex img { height: 230px; }
	.steps { grid-template-columns: repeat(7, 74vw); min-width: 0; }
	.track { scroll-snap-type: x mandatory; }
	.step { scroll-snap-align: start; }
	.track-line { min-width: calc(7 * 74vw + 120px); }
	.plates { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
	.plate.wide { grid-column: span 2; }
	.cert-rows div { grid-template-columns: 1fr; gap: 2px; }
	.contact-lines { grid-template-columns: 1fr; }
	.contact .stamp { width: 100%; flex-wrap: wrap; padding-block: 12px; }
	.foot-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
