/* Alsaliheen site styles. Colours, type and spacing come from tokens.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.75 var(--font-body);
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-s); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.25rem/1 var(--font-display); }
.wordmark svg { width: 18px; height: 18px; flex: none; }
.site-nav { display: flex; gap: 22px; font-size: var(--step--1); }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Breadcrumb (inside a section) */
.crumbs { font-size: var(--step--1); color: var(--text-2); padding-top: 22px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { margin: 0 8px; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-family: var(--font-body); }
p { margin: 0 0 1em; }
.lead { font-size: var(--step-1); color: var(--text-2); max-width: var(--measure); line-height: 1.7; }
.muted { color: var(--text-2); }
[lang="en"] { direction: ltr; text-align: left; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: var(--radius-s); font-weight: 600; font-size: var(--step-0); text-decoration: none;
  background: var(--action-bg); color: var(--action-text); border: 1px solid var(--action-bg);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary { background: var(--action-2-bg); color: var(--action-2-text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--text-2); filter: none; }
.btn[aria-disabled="true"] { background: var(--surface-quiet); color: var(--text-2); border-color: var(--line); cursor: default; filter: none; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 var(--space-section); display: grid; gap: 48px; align-items: center; }
.hero h1 { max-width: 13em; text-wrap: balance; }
.hero .lead { margin-top: 20px; }
.hero-figure { justify-self: center; width: min(320px, 78vw); }
@media (min-width: 900px) {
  .hero:not(.solo) { grid-template-columns: 1.35fr 1fr; }
  .hero-figure { justify-self: end; }
}

/* Device frame: a flat titanium bezel, no shadow. */
.device { border: 10px solid var(--surface-quiet); outline: 1px solid var(--line); border-radius: 34px; overflow: hidden; background: var(--surface); }
.device img { width: 100%; height: auto; aspect-ratio: 540 / 1161; }

/* Sections on a page */
.block { padding: calc(var(--space-section) * 0.7) 0; border-top: var(--hairline); }
.block-head { display: grid; gap: 12px; margin-bottom: 40px; }
@media (min-width: 900px) {
  .block-head { grid-template-columns: 1fr 1.35fr; align-items: end; }
  .block-head p { margin: 0; }
}

/* Index of sections: hairline rows, like a catalogue. */
.index { list-style: none; margin: 0; padding: 0; border-top: var(--hairline); }
.index li { border-bottom: var(--hairline); }
.index a, .index .row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center;
  padding: 22px 4px; color: inherit; text-decoration: none;
}
.index a:hover { background: var(--surface); }
.index img { width: 56px; height: 56px; border-radius: 14px; }
.index .name { font: 600 var(--step-2)/1.3 var(--font-display); display: block; }
.index .desc { color: var(--text-2); display: block; margin-top: 4px; }
.index .status { font-size: var(--step--1); color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.index .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--section); }
.index .glyph { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--section-soft); color: var(--section); }
.index .glyph svg { width: 26px; height: 26px; }
.index .placeholder { width: 56px; height: 56px; border-radius: 14px; border: 1px dashed var(--line); }
@media (max-width: 600px) {
  .index a, .index .row { grid-template-columns: 48px 1fr; }
  .index img, .index .glyph { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--section-soft); color: var(--section); }
.index .glyph svg { width: 26px; height: 26px; }
.index .placeholder { width: 48px; height: 48px; }
  .index .status { grid-column: 2; }
}

/* Principles / features: a two-column definition list with hairlines, not cards. */
.facts { display: grid; gap: 0; margin: 0; border-top: var(--hairline); }
.facts div { padding: 20px 0; border-bottom: var(--hairline); display: grid; gap: 4px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--text-2); }
@media (min-width: 900px) {
  .facts { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* Section pages: the section colour marks this section only. */
.section-mark { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-mark img { width: 64px; height: 64px; border-radius: 16px; }
.section-mark .tag { font-size: var(--step--1); color: var(--section); border: 1px solid currentColor; border-radius: var(--radius-s); padding: 2px 10px; }
.section-khushoo .facts dt::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--section); margin-inline-end: 10px; vertical-align: middle; }

.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(240px, 62vw); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots img { border-radius: var(--radius-l); border: var(--hairline); scroll-snap-align: start; aspect-ratio: 540 / 1161; height: auto; }
@media (min-width: 900px) { .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; } }

/* Numbered steps: only for real sequences. */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: var(--hairline); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px 0; border-bottom: var(--hairline); }
.steps li::before { content: counter(step); grid-row: span 2; font: 600 var(--step-2)/1 var(--font-display); color: var(--section); }
.steps strong { font-weight: 600; }
.steps span { color: var(--text-2); }

/* Long text (privacy policy) */
.doc { max-width: 44em; padding: clamp(40px, 7vw, 80px) 0 var(--space-section); }
.doc h1 { font-size: var(--step-3); margin-bottom: 8px; }
.doc h2 { font-size: var(--step-1); font-family: var(--font-body); margin: 36px 0 8px; }
.doc ul { padding-inline-start: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc section + section { border-top: var(--hairline); margin-top: 56px; padding-top: 56px; }

/* Footer */
.site-footer { border-top: var(--hairline); padding: 32px 0 48px; font-size: var(--step--1); color: var(--text-2); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Small phones: the menu wraps under the wordmark instead of pushing the page wide. */
@media (max-width: 600px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 4px; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { gap: 16px; flex-wrap: wrap; }
}

/* ===== One-screen pages =====
 * Every page except long documents fits the screen: header, content centred in the space, footer.
 * min-height (not a hard lock), so a very small screen scrolls a little instead of cutting text off.
 */
body.fit { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
body.fit > main { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(16px, 4vh, 48px); width: 100%; }
body.fit h1 { font-size: clamp(2rem, min(5.4vw, 7.5vh), 4rem); text-wrap: balance; max-width: 14em; }
body.fit .lead { margin-top: clamp(10px, 2vh, 20px); }
body.fit .actions { margin-top: clamp(16px, 3vh, 28px); }
body.fit .site-footer { padding: 18px 0; }
body.fit .crumbs { padding-top: 0; margin-bottom: clamp(12px, 2.5vh, 24px); }
.page-body { margin-top: clamp(20px, 4.5vh, 48px); }
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* Home: two doors */
.doors { display: grid; gap: 12px; }
.doors a { display: grid; gap: 4px; padding: clamp(14px, 2.5vh, 22px) 20px; border: var(--hairline); border-radius: var(--radius-m); background: var(--surface); color: inherit; text-decoration: none; }
.doors a:hover { border-color: var(--text-2); }
.doors strong { font: 600 var(--step-1)/1.3 var(--font-display); }
.doors span { color: var(--text-2); font-size: var(--step--1); }
@media (min-width: 700px) { .doors { grid-template-columns: 1fr 1fr; max-width: 760px; } }

/* Tighter rows inside one-screen pages */
body.fit .index a, body.fit .index .row { padding-block: clamp(12px, 2.2vh, 22px); }
body.fit .facts div { padding-block: clamp(10px, 1.8vh, 18px); }
body.fit .steps li { padding-block: clamp(10px, 1.8vh, 18px); }
@media (min-width: 900px) {
  body.fit .steps { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; border-top: 0; }
  body.fit .steps li { border-top: var(--hairline); border-bottom: 0; grid-template-columns: 1fr; row-gap: 6px; }
  body.fit .steps li::before { grid-row: auto; }
}

/* Section page with the phone beside the text */
.split { display: grid; gap: 40px; align-items: center; }
.split .device { width: auto; height: min(62vh, 560px); aspect-ratio: 540 / 1161; margin-inline: auto; }
.split .device img { height: 100%; width: 100%; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; } }
@media (max-width: 899px) { .split .device-col { display: none; } }

@media (max-width: 600px) {
  body.fit .facts { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  body.fit .facts dd { font-size: var(--step--1); line-height: 1.55; }
  body.fit .steps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  body.fit .steps li { grid-template-columns: 1fr; row-gap: 2px; }
  body.fit .steps li::before { grid-row: auto; font-size: var(--step-1); }
  body.fit .steps span { font-size: var(--step--1); line-height: 1.55; }
  body.fit .site-footer .wrap { gap: 6px; }
}

/* Section title with its icon on one line */
.section-mark h1 { margin: 0; }
body.fit .section-mark { margin-bottom: 0; }

/* Phones: buttons share one row; short screens tighten type and gaps. */
@media (max-width: 600px) {
  body.fit .actions { flex-wrap: nowrap; gap: 8px; }
  body.fit .actions .btn { flex: 1 1 0; justify-content: center; padding: 0 12px; font-size: var(--step--1); min-height: 44px; white-space: nowrap; }
  body.fit .section-mark img { width: 52px; height: 52px; border-radius: 13px; }
}
@media (max-width: 600px) and (max-height: 800px) {
  body.fit h1 { font-size: 1.85rem; }
  body.fit .lead { font-size: var(--step-0); line-height: 1.6; }
  body.fit > main { padding-block: 14px; }
  .page-body { margin-top: 18px; }
  body.fit .index .desc { font-size: var(--step--1); line-height: 1.55; }
  body.fit .site-footer { padding: 12px 0; }
}

/* Forms */
.form { display: grid; gap: clamp(10px, 1.8vh, 16px); max-width: 760px; }
@media (min-width: 700px) { .form { grid-template-columns: 1fr 1fr; column-gap: 20px; } .form .wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; min-height: 46px; width: 100%;
}
.field textarea { resize: vertical; min-height: 0; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: #C62828; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.form-end p { margin: 0; font-size: var(--step--1); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 600px) and (max-height: 800px) {
  .field textarea { height: 5.2em; }
  .field input, .field select { min-height: 42px; padding: 8px 12px; }
}
@media (max-width: 699px) {
  .form { grid-template-columns: 1fr 1fr; column-gap: 12px; gap: 10px; }
  .form .field:has(#name), .form .field:has(#contact), .form .wide { grid-column: 1 / -1; }
  .field input, .field select { min-height: 42px; padding: 8px 12px; }
  .field textarea { height: 4.8em; }
  .field label { font-size: 0.8125rem; }
  .form-end .btn { width: 100%; justify-content: center; }
  body.fit .form.page-body { margin-top: 14px; }
}

/* ===== Finishing pass: two-column stage, visuals, brand ===== */
.wordmark .mark { width: 22px; height: 22px; }
@media (min-width: 900px) {
  .site-nav { font-size: 0.95rem; gap: 28px; }
  .site-header .wrap { min-height: 72px; }
}

/* Text on one side, a visual on the other. */
.stage { display: grid; gap: 40px; align-items: center; }
.stage-visual { display: none; }
@media (min-width: 900px) {
  .stage { grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 5vw, 72px); }
  .stage-visual {
    display: grid; place-items: center; height: min(64vh, 560px); padding: 20px;
    background: var(--surface); border: var(--hairline); border-radius: var(--radius-m); overflow: hidden;
  }
  .stage-visual > svg.v { width: 100%; height: 100%; }
}

/* Visual drawing styles (shared by every illustration) */
.v-grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.v-guide * , .v-guide { fill: none; stroke: var(--text-2); stroke-opacity: .4; stroke-width: 1; stroke-dasharray: 4 5; }
.v-guide-strong { fill: none; stroke: var(--line); stroke-width: 2; }
.v-dim path { fill: none; stroke: var(--link); stroke-width: 1.2; }
.v-signal { fill: var(--link); }
.v-ink { fill: var(--text); }
.v-ti { fill: var(--line); }
.v-paper { fill: var(--bg); }
.v-card { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.v-label { font: 500 12px var(--font-body); fill: var(--text-2); }
.v-cap { font: 600 14px var(--font-body); fill: var(--text-2); }
.v-type { font: 600 22px var(--font-display); fill: var(--text); }
.v-mail { font: 500 16px var(--font-display); fill: var(--text); direction: ltr; }

/* Phone frame inside a stage, on the section's soft colour */
.stage-visual.phone-stage { background: var(--section-soft); border-color: transparent; padding: 28px; }
.stage-visual.phone-stage .device { height: 100%; width: auto; aspect-ratio: 540 / 1161; }
.stage-visual.phone-stage .device img { height: 100%; width: 100%; }

/* Text panel used as the visual (e.g. "after you send") */
.stage-visual.panel { place-items: start; align-content: center; padding: clamp(24px, 4vh, 40px); }
.stage-visual.panel h2 { font-size: var(--step-1); margin-bottom: 16px; }
body.fit .stage-visual .steps { display: block; border-top: var(--hairline); }
body.fit .stage-visual .steps li { display: grid; grid-template-columns: 40px 1fr; border-top: 0; border-bottom: var(--hairline); }
body.fit .stage-visual .steps li::before { grid-row: span 2; }

/* Home: the two live areas as tiles */
.bento { display: grid; gap: 12px; }
.tile { display: grid; border: var(--hairline); border-radius: var(--radius-m); background: var(--surface); color: inherit; text-decoration: none; overflow: hidden; }
.tile:hover { border-color: var(--text-2); }
.tile-art { display: none; }
.tile-text { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 16px 18px; }
.tile-text strong { font: 600 var(--step-1)/1.3 var(--font-display); grid-column: 1 / -1; }
.tile-text span { color: var(--text-2); font-size: var(--step--1); grid-column: 1 / -1; }
.tile-icon { width: 40px; height: 40px; border-radius: 10px; grid-row: span 2; grid-column: 1 !important; }
.tile-app .tile-text strong, .tile-app .tile-text span { grid-column: 2; }
@media (min-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; height: min(64vh, 560px); }
  .tile { grid-template-rows: 1fr auto; }
  .tile-art { display: grid; place-items: center; overflow: hidden; border-bottom: var(--hairline); min-height: 0; }
  .tile-design .tile-art svg { width: 100%; height: 100%; padding: 12px; }
  .tile-app .tile-art { background: var(--section-soft); align-items: start; padding-top: 28px; }
  .tile-app .tile-art img { width: 64%; border-radius: 18px; border: 6px solid var(--surface); }
}

/* Services: one service, presented as a block */
.service { display: grid; gap: clamp(12px, 2.4vh, 20px); }
.service-head { display: flex; align-items: center; gap: 14px; }
.service-head .glyph { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--section-soft); color: var(--section); }
.service-head .glyph svg { width: 24px; height: 24px; }
.service-head h2 { font-size: var(--step-2); }
.service-head .status { margin-inline-start: auto; font-size: var(--step--1); color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.service-head .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--section); }
.service .actions { margin-top: 4px; }

@media (max-width: 600px) {
  .service .facts dd { display: none; }
  .service .facts div { padding-block: 8px; }
}
/* Fixes: drawings lay out left-to-right (Arabic still shapes correctly); keep image ratios. */
svg.v { direction: ltr; }
.tile-app .tile-art img { height: auto; aspect-ratio: 540 / 1161; }
@media (max-width: 600px) and (max-height: 800px) {
  .form .field textarea { height: 3.4em; }
  .form { gap: 8px; }
  body.fit .crumbs { margin-bottom: 8px; }
}
