/* Linkitecture web kit: black and white, architectural, quiet.
   Colour comes only from real work (screenshots of client sites and the app). Everything else is ink on paper.
   Layout uses logical properties (inline/block) so Arabic mirrors correctly with dir="rtl". */

:root {
  --paper: #ffffff;
  --paper-2: #f4f4f2;
  --paper-3: #eaeae7;
  --ink: #0a0a0a;
  --ink-2: #2e2e2e;
  --ink-3: #626262;
  --ink-4: #8d8d8a;
  --line: #e3e3df;
  --line-2: #cbcbc6;
  --night: #0a0a0a;
  --night-2: #151515;
  --night-3: #222222;
  --night-line: #2c2c2c;
  --silver: #c9cbd8;            /* the logo's metal, used sparingly on dark */
  --focus: #0a0a0a;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-ar: "IBM Plex Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
[lang="ar"] body, body[lang="ar"], html[lang="ar"] body { font-family: var(--font-ar); font-size: 17px; line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible { --focus: #fff; }
::selection { background: var(--ink); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--pill); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.02em; line-height: 1.04; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.3; font-weight: 700; }
.display { font-size: clamp(40px, 7.4vw, 104px); font-stretch: 112%; font-weight: 750; letter-spacing: -0.035em; line-height: .98; }
html[lang="ar"] .display { font-size: clamp(36px, 6.4vw, 84px); line-height: 1.25; }
.h1 { font-size: clamp(36px, 5.4vw, 72px); font-stretch: 108%; letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 3.6vw, 48px); font-stretch: 104%; }
.h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.01em; line-height: 1.2; }
html[lang="ar"] .h1 { font-size: clamp(32px, 4.6vw, 60px); }
html[lang="ar"] .h2 { font-size: clamp(26px, 3.2vw, 42px); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; line-height: 1.5; }
.mono, .eyebrow, .sheet { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; }
html[lang="ar"] .mono, html[lang="ar"] .eyebrow, html[lang="ar"] .sheet { font-family: var(--font-ar); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.eyebrow { color: var(--ink-3); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.prose p { margin: 0 0 1em; max-width: 64ch; }
.prose h2 { margin: 1.6em 0 .5em; font-size: 26px; }
.prose ul { padding-inline-start: 1.2em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.dark { background: var(--night); color: #f2f2f0; }
.dark .muted, .dark .lead { color: #a9a9a6; }
.dark .eyebrow { color: #9a9a97; }
.tone { background: var(--paper-2); }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-block-start: var(--s, 16px); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Section head: drawing-sheet label + hairline, the architectural signature. */
.head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-block-end: clamp(28px, 4vw, 48px); }
.head .sheet { color: var(--ink-3); }
.head::after { content: ""; height: 1px; background: var(--line-2); }
.dark .head::after { background: var(--night-line); }
.dark .head .sheet { color: #8e8e8b; }

/* Blueprint grid background (very faint). */
.blueprint { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; background-position: -1px -1px; }
.blueprint-fade { -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%); }

/* The logo's stepped ramp, used as a divider. */
.steps { display: block; width: 100%; height: 28px; color: var(--ink); }
.dark .steps { color: #f2f2f0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-block-end: 1px solid transparent; transition: border-color .25s var(--ease), transform .3s var(--ease); }
.site-header.scrolled { border-block-end-color: var(--line); }
.site-header.hide { transform: translateY(-100%); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; font-stretch: 108%; }
.brand svg { width: 24px; height: auto; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: inline-block; padding: 8px 12px; border-radius: var(--pill); text-decoration: none; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.lang { font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: var(--pill); border: 1px solid var(--line-2); }
.lang:hover { border-color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: var(--pill); border: 1px solid var(--line-2); background: transparent; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.menu-btn span { width: 16px; height: 1.5px; background: currentColor; display: block; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; inset-inline: 0; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
.menu-btn span::before { top: -5px; } .menu-btn span::after { top: 5px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 920px) {
  .nav-links, .nav-tools .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-tools { margin-inline-start: auto; }
}
.drawer { display: none; }
.menu-open .drawer { display: block; position: fixed; inset: 68px 0 0 0; background: var(--paper); z-index: 49; padding: 24px var(--gutter) 40px; overflow-y: auto; }
.drawer ul { list-style: none; padding: 0; margin: 0 0 24px; }
.drawer li a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-block-end: 1px solid var(--line); text-decoration: none; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
html[lang="ar"] .drawer li a { font-family: var(--font-ar); }
.menu-open { overflow: hidden; }

/* ---------- buttons ---------- */
.btn { --bg: var(--ink); --fg: var(--paper); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: var(--pill); background: var(--bg); color: var(--fg); border: 1px solid var(--bg); font: 600 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; white-space: nowrap; }
html[lang="ar"] .btn { font-family: var(--font-ar); white-space: normal; text-align: center; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn.lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.dark .btn { --bg: #f4f4f2; --fg: var(--ink); }
.dark .btn.ghost { --bg: transparent; --fg: #f4f4f2; border-color: #444; }
.dark .btn.ghost:hover { border-color: #f4f4f2; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; border-block-end: 1px solid currentColor; padding-block-end: 2px; }

/* ---------- cards, badges ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 2.4vw, 32px); position: relative; }
.tone .card { background: var(--paper); }
.dark .card { background: var(--night-2); border-color: var(--night-line); }
.card.link-card { text-decoration: none; transition: border-color .2s, transform .25s var(--ease); display: block; }
.card.link-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.dark .card.link-card:hover { border-color: #6a6a6a; }
.num { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-4); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--pill); border: 1px solid var(--line-2); font: 500 12.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: var(--paper); }
html[lang="ar"] .badge { font-family: var(--font-ar); text-transform: none; letter-spacing: 0; font-size: 13px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.badge.live .dot { animation: pulse 2s infinite; }
.badge.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.badge.solid .dot { background: var(--paper); }
.dark .badge { background: transparent; border-color: #3a3a3a; color: #d8d8d5; }
.dark .badge .dot { background: #f2f2f0; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-block-end: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.list li::before { content: ""; width: 6px; height: 6px; flex: none; background: currentColor; transform: translateY(-2px); }
.list.minus li::before { width: 8px; height: 1.5px; transform: translateY(-4px); }
.dark .list li { border-color: var(--night-line); }
.note { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px 16px; font-size: 14px; color: var(--ink-3); }
.dark .note { border-color: #3a3a3a; color: #a3a3a0; }
.alert { border-radius: var(--r); padding: 14px 16px; border: 1px solid var(--ink); background: var(--paper); }

/* ---------- media ---------- */
.shot { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.dark .shot { border-color: var(--night-line); background: var(--night-2); }
.phone { border-radius: 34px; padding: 8px; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); max-width: 300px; }
.phone img { border-radius: 27px; width: 100%; }
.dark .phone { background: #1c1c1c; box-shadow: 0 0 0 1px #2c2c2c, 0 30px 60px -30px rgba(0, 0, 0, .8); }
.browser { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--paper); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .35); }
.browser .bar { display: flex; gap: 6px; align-items: center; height: 30px; padding-inline: 12px; border-block-end: 1px solid var(--line); background: var(--paper-2); }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-2); }
.browser .bar span { margin-inline-start: 10px; font: 500 11.5px var(--font-mono); color: var(--ink-3); direction: ltr; }
.caption { font: 500 12px/1.4 var(--font-mono); color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em; margin-block-start: 10px; }
html[lang="ar"] .caption { font-family: var(--font-ar); text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; min-inline-size: 0; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13.5px; color: var(--ink-3); }
fieldset { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 13px 14px; width: 100%; min-height: 50px; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, .08); }
textarea { min-height: 140px; resize: vertical; }
input[type="tel"], input[type="email"] { direction: ltr; }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"] { text-align: right; }
.field.invalid input, .field.invalid textarea { border-color: var(--ink); border-width: 2px; }
.field .err { display: none; font-size: 13.5px; font-weight: 600; }
.field.invalid .err { display: block; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; min-height: 0; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: var(--pill); border: 1px solid var(--line-2); font-size: 15px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute !important; inset-inline-start: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: #d8d8d5; padding-block: 72px 40px; }
.site-footer a { color: #f2f2f0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-grid h4 { font: 500 12.5px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: #8e8e8b; margin-block-end: 14px; }
html[lang="ar"] .foot-grid h4 { font-family: var(--font-ar); text-transform: none; letter-spacing: 0; font-size: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.foot-base { margin-block-start: 56px; padding-block-start: 24px; border-block-start: 1px solid var(--night-line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13.5px; color: #8e8e8b; }
.wordmark-xl { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; letter-spacing: -0.05em; font-size: clamp(34px, 8.6vw, 124px); line-height: .9; color: #f2f2f0; margin: 56px 0 0; white-space: nowrap; overflow: hidden; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.draw path, .draw line, .draw rect, .draw polyline { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); }
.draw.in path, .draw.in line, .draw.in rect, .draw.in polyline { animation: draw 1.6s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .draw path, .draw line, .draw rect, .draw polyline { stroke-dashoffset: 0; } }
.marquee { overflow: hidden; border-block: 1px solid var(--line); white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 48px; padding-block: 18px; animation: slide 38s linear infinite; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; }
html[lang="ar"] .marquee .track { font-family: var(--font-ar); animation-name: slide-rtl; }
.marquee .track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee .track span::after { content: ""; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes slide-rtl { to { transform: translateX(50%); } }

/* ---------- utilities ---------- */
.mt-0 { margin-block-start: 0; } .mt-1 { margin-block-start: 8px; } .mt-2 { margin-block-start: 16px; } .mt-3 { margin-block-start: 24px; } .mt-4 { margin-block-start: 40px; } .mt-5 { margin-block-start: 64px; }
.center { text-align: center; }
.hide-sm { } @media (max-width: 640px) { .hide-sm { display: none !important; } }
.show-sm { display: none; } @media (max-width: 640px) { .show-sm { display: initial; } }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.dark .hr { background: var(--night-line); }

/* Rich footer (agency): a blueprint grid that fades out, grain, and the mark drawn in outline like a technical drawing. */
.site-footer.rich { position: relative; overflow: hidden; isolation: isolate; }
.site-footer.rich::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 100%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 70% 80% at 85% 100%, #000 10%, transparent 70%); }
.site-footer.rich::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .28; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.site-footer.rich .foot-mark { position: absolute; z-index: -1; inset-inline-end: -3%; top: 6%; width: min(42vw, 520px); pointer-events: none; }
.site-footer.rich .foot-mark svg { width: 100%; height: auto; display: block; }
.site-footer.rich .foot-mark path { fill: rgba(255,255,255,.025); stroke: rgba(255,255,255,.16); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.site-footer.rich .wordmark-xl { background: linear-gradient(180deg, #f2f2f0 0%, #f2f2f0 35%, rgba(242,242,240,.12) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Device frames: iPhone 17 and iPad, drawn in CSS to the real proportions.
   iPhone 17: body 71.5 x 149.6 mm, aluminium frame, thin black border, 402 x 874 pt screen, Dynamic Island 126 x 37 pt,
   Action button + volume on the left, side button + Camera Control on the right. Finishes: Black, White, Mist Blue,
   Sage, Lavender. Every size is in container units (cqw), so a frame looks the same at any width. */

.iphone {
  --fin: #3b3c40; --fin-hi: #9a9ca2; --fin-lo: #1c1d20;
  container-type: inline-size; position: relative; width: 100%; max-width: var(--ip-max, 320px); margin: 0; flex: none;
  -webkit-user-select: none; user-select: none;
}
.iphone.fin-white { --fin: #dedfe0; --fin-hi: #ffffff; --fin-lo: #a7a8ab; }
.iphone.fin-mist { --fin: #9fb4c9; --fin-hi: #dfe9f3; --fin-lo: #687e96; }
.iphone.fin-sage { --fin: #a7b598; --fin-hi: #e1e8d8; --fin-lo: #6f7e63; }
.iphone.fin-lavender { --fin: #b8a8cf; --fin-hi: #ebe3f4; --fin-lo: #7f709a; }

/* The aluminium body. Its front edge shows as a thin ring that catches light top-left and bottom-right. */
.ip-body {
  position: relative; aspect-ratio: 71.5 / 149.6; border-radius: 16.9cqw; padding: 1.7cqw;
  background:
    linear-gradient(140deg, var(--fin-hi) 0%, var(--fin) 9%, var(--fin-lo) 30%, var(--fin) 52%, var(--fin-lo) 74%, var(--fin) 90%, var(--fin-hi) 100%);
  box-shadow:
    inset 0 0 0 .32cqw color-mix(in srgb, var(--fin-hi) 55%, transparent),
    inset 0 .5cqw .6cqw color-mix(in srgb, #fff 30%, transparent),
    inset 0 -.5cqw .8cqw rgba(0, 0, 0, .28),
    0 .6cqw 1.2cqw rgba(0, 0, 0, .18),
    0 6cqw 10cqw -4cqw rgba(0, 0, 0, .32),
    0 22cqw 30cqw -14cqw rgba(0, 0, 0, .38);
  transition: background .5s ease, box-shadow .5s ease;
}
/* Buttons sit just proud of the frame. */
.ip-btn { position: absolute; z-index: -1; width: 1.4cqw; border-radius: .8cqw; background: linear-gradient(90deg, var(--fin-lo), var(--fin-hi) 45%, var(--fin) 100%); transition: background .5s ease; }
.ip-btn.act { inset-inline-start: -.75cqw; top: 19.6%; height: 3.6%; }
.ip-btn.vu { inset-inline-start: -.75cqw; top: 26.8%; height: 6.4%; }
.ip-btn.vd { inset-inline-start: -.75cqw; top: 34.8%; height: 6.4%; }
.ip-btn.pw { inset-inline-end: -.75cqw; top: 28.2%; height: 10%; background: linear-gradient(270deg, var(--fin-lo), var(--fin-hi) 45%, var(--fin) 100%); }
.ip-btn.cc { inset-inline-end: -.45cqw; top: 56.5%; height: 6%; background: linear-gradient(270deg, #111, color-mix(in srgb, var(--fin) 50%, #222)); }
[dir="rtl"] .ip-btn { transform: scaleX(-1); }

/* Black glass border, then the screen. */
.ip-bezel { position: relative; height: 100%; border-radius: 15.2cqw; padding: 2.55cqw; background: #030303; box-shadow: inset 0 0 0 .22cqw #1d1d1f; }
.ip-bezel::after { content: ""; position: absolute; inset: 0; z-index: 8; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 30%, rgba(255,255,255,0) 46%); }
.ip-screen {
  --scr-bg: #f2f2f2; --sb-ink: #0b0b0b;
  container-type: inline-size; position: relative; height: 100%; border-radius: 12.6cqw; overflow: hidden; isolation: isolate;
  background: var(--scr-bg); color: #111; direction: ltr; text-align: start; line-height: 1.3;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}
.ip-screen.sb-light { --sb-ink: #fff; }

/* Status bar (54 pt) and Dynamic Island (126 x 37 pt, 11 pt from the top). */
.ip-sb { position: absolute; z-index: 6; inset: 0 0 auto 0; height: 13.4cqw; display: flex; align-items: center; justify-content: space-between;
  padding: .8cqw 7.4cqw 0 10.2cqw; color: var(--sb-ink); font: 600 4.3cqw/1 -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif; letter-spacing: -.01em; }
.ip-sb .r { display: flex; align-items: center; gap: 1.4cqw; }
.ip-sb svg { height: 2.9cqw; width: auto; fill: currentColor; }
.ip-sb .bat { width: 6.4cqw; height: 3cqw; border-radius: 1cqw; padding: .3cqw; border: .3cqw solid color-mix(in srgb, currentColor 40%, transparent); position: relative; }
.ip-sb .bat i { display: block; height: 100%; width: 78%; border-radius: .5cqw; background: currentColor; }
.ip-sb .bat::after { content: ""; position: absolute; inset-inline-end: -1cqw; top: 32%; width: .5cqw; height: 36%; border-radius: 0 .6cqw .6cqw 0; background: color-mix(in srgb, currentColor 40%, transparent); }
.ip-island { position: absolute; z-index: 7; top: 2.74cqw; left: 50%; width: 31.3cqw; height: 9.2cqw; transform: translateX(-50%); border-radius: 9cqw; background: #000;
  box-shadow: inset 0 0 0 .2cqw #0b0b0b; }
.ip-island::after { content: ""; position: absolute; top: 50%; right: 7.6%; width: 3.3cqw; height: 3.3cqw; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3550 0%, #0d1020 45%, #050608 70%); box-shadow: 0 0 0 .3cqw #0a0a0c; }
.ip-home { position: absolute; z-index: 7; bottom: 2cqw; left: 50%; width: 35cqw; height: 1.3cqw; transform: translateX(-50%); border-radius: 1cqw; background: color-mix(in srgb, var(--sb-ink) 85%, transparent); }

/* An app screenshot sits under the status bar. "fit" keeps a taller shot whole, with a blurred copy behind. */
.ip-shot { position: absolute; inset: 13.4cqw 0 auto 0; width: 100%; height: auto; display: block; }
.ip-shots .ip-shot { opacity: 0; transition: opacity .4s ease; }
.ip-shots .ip-shot.on { opacity: 1; }
.ip-screen.fit .ip-shot { inset: 13.4cqw 0 0 0; height: calc(100% - 13.4cqw); width: 100%; object-fit: contain; object-position: top; }
.ip-screen.fit .ip-fill { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(14px) saturate(1.1); opacity: .9; z-index: -1; }

/* Safari: the website under the status bar, the floating address bar at the bottom (iOS 26). */
.ip-screen.safari { --scr-bg: #fff; }
.ip-screen.safari .ip-shot { inset: 13.4cqw 0 auto 0; }
.ip-url { position: absolute; z-index: 6; inset-inline: 4cqw; bottom: 6.4cqw; height: 12cqw; display: grid; grid-template-columns: 12cqw 1fr 12cqw; align-items: center; gap: 2cqw; }
.ip-url > * { height: 12cqw; border-radius: 6cqw; display: grid; place-items: center; color: #1b1b1b;
  background: rgba(250, 250, 250, .72); -webkit-backdrop-filter: blur(10px) saturate(1.6); backdrop-filter: blur(10px) saturate(1.6);
  box-shadow: inset 0 .3cqw .4cqw rgba(255,255,255,.9), 0 1cqw 3cqw rgba(0,0,0,.16), inset 0 0 0 .2cqw rgba(0,0,0,.06); }
.ip-url b { font: 500 3.7cqw/1 -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 3cqw; display: block; line-height: 12cqw; text-align: center; }
.ip-url svg { width: 4.6cqw; height: 4.6cqw; }

/* Lock screen: photo wallpaper, date and time, notifications in Liquid Glass. */
.ip-wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ip-screen.lock::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.2), transparent 30%, transparent 55%, rgba(0,0,0,.32)); }
.ip-date { position: absolute; top: 17.5cqw; inset-inline: 0; text-align: center; color: rgba(255,255,255,.92); font: 600 5cqw/1 -apple-system, "SF Pro Display", "Inter", system-ui, sans-serif; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.ip-time { position: absolute; top: 22.5cqw; inset-inline: 0; text-align: center; color: rgba(255,255,255,.95); font: 700 27cqw/1 "SF Pro Rounded", -apple-system, "Inter", system-ui, sans-serif; letter-spacing: -.03em; text-shadow: 0 2px 20px rgba(0,0,0,.2); }
.ip-ntfs { position: absolute; inset-inline: 3.4cqw; bottom: 30cqw; display: grid; gap: 2.2cqw; }
.ip-ntf { display: grid; grid-template-columns: 9.6cqw 1fr; gap: 3cqw; padding: 3.2cqw 3.6cqw; border-radius: 6.2cqw; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.12));
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.06); backdrop-filter: blur(18px) saturate(1.8) brightness(1.06);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.55), inset 0 0 0 .5px rgba(255,255,255,.28), 0 10px 30px -12px rgba(0,0,0,.35); }
.ip-ntf .ic { width: 9.6cqw; height: 9.6cqw; border-radius: 2.3cqw; background: var(--ntf-ic, #d4ee7c); color: #14170a; display: grid; place-items: center; font: 750 3.2cqw/1 -apple-system, "Inter", system-ui, sans-serif; }
.ip-ntf .b { display: grid; grid-template-columns: 1fr auto; column-gap: 2cqw; min-width: 0; }
.ip-ntf .b > b { font-size: 3.75cqw; font-weight: 600; }
.ip-ntf time { font-size: 3.4cqw; opacity: .72; }
.ip-ntf p { grid-column: 1 / -1; margin: .5cqw 0 0; font-size: 3.6cqw; line-height: 1.28; }
.ip-ntf strong { display: block; font-weight: 600; }
.ip-ntf.drop { animation: ip-drop .8s 1s cubic-bezier(.2, 1.2, .3, 1) both; }
@keyframes ip-drop { from { opacity: 0; transform: translateY(-6cqw) scale(.94); } to { opacity: 1; transform: none; } }
.ip-lockfoot { position: absolute; inset-inline: 10cqw; bottom: 8cqw; display: flex; justify-content: space-between; }
.ip-lockfoot span { width: 12.4cqw; height: 12.4cqw; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 .4cqw .6cqw rgba(255,255,255,.35); }
.ip-lockfoot svg { width: 5.4cqw; height: 5.4cqw; }
.ip-screen.lock .ip-home { background: rgba(255,255,255,.9); }

/* iPad (landscape): a thin even border, rounded corners, camera on the long edge. */
.ipad { container-type: inline-size; position: relative; width: 100%; margin: 0; }
.ipad-body { position: relative; aspect-ratio: 1.39; border-radius: 3.9cqw; padding: .55cqw;
  background: linear-gradient(140deg, #c6c8cc, #8d9096 30%, #b9bbbf 55%, #7d8086 80%, #c9cbcf);
  box-shadow: inset 0 0 0 .12cqw rgba(255,255,255,.6), 0 3cqw 6cqw -2cqw rgba(0,0,0,.35); }
.ipad-bezel { position: relative; height: 100%; border-radius: 3.4cqw; padding: 1.7cqw; background: #050505; }
.ipad-bezel::before { content: ""; position: absolute; top: .55cqw; left: 50%; width: .55cqw; height: .55cqw; border-radius: 50%; transform: translateX(-50%); background: #1a1f2c; }
.ipad-screen { container-type: inline-size; height: 100%; border-radius: 1.8cqw; overflow: hidden; position: relative; }
