/* Cube Software — ruled, drafting-table layout around the company's own logo and copy. */

:root {
  --ink: #121c24;
  --slate: #2c3842;
  --slate-mid: #5c6b77;
  --paper: #edf0f0;
  --paper-hi: #f7f9f9;
  --line: #c4cfd3;
  --line-soft: #dde4e6;
  --teal: #0eb796;
  --teal-ink: #06634f;
  --white: #fff;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 66ch;
  --shell: 76rem;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body[dir="rtl"] { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 1.85; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; }

.skip {
  position: fixed; inset-inline-start: 0; top: -100%; z-index: 99;
  background: var(--ink); color: var(--white); padding: 0.7rem 1rem;
}
.skip:focus { top: 0; }

/* ---------- shell + rail ---------- */

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* The rail: one drafting guide line that every section hangs from. */
.railed { position: relative; }
.railed::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; border-inline-start: 1px solid var(--line); }

.band { border-top: 1px solid var(--line); }
.band-inner { padding-block: clamp(2.75rem, 6vw, 5rem); }

.head { display: grid; gap: 0.6rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); padding-inline-start: clamp(1rem, 3vw, 2.25rem); }
.head h2 { font-size: var(--step-3); }
.head p { color: var(--slate-mid); max-width: var(--measure); }
.body-col { padding-inline-start: clamp(1rem, 3vw, 2.25rem); }

/* ---------- masthead ---------- */

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.35rem; }
.mark { display: inline-flex; align-items: center; }
.mark img { display: block; height: clamp(2.9rem, 5.2vw, 4.1rem); width: auto; }

.menu { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.6rem); font-size: var(--step--1); }
.menu a { text-decoration: none; padding-block: 0.35rem; border-bottom: 1px solid transparent; }
.menu a:hover, .menu a:focus-visible { border-bottom-color: var(--teal); }

/* No hamburger: below this width the nav takes its own row and wraps. */
@media (max-width: 52rem) {
  .masthead { flex-wrap: wrap; row-gap: 0.75rem; }
  .menu { width: 100%; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 6rem); }
.hero-copy { padding-inline-start: clamp(1rem, 3vw, 2.25rem); }
.hero h1 { font-size: var(--step-4); max-width: 20ch; }

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem 1.5rem; align-items: center; }
.btn {
  display: inline-block; text-decoration: none;
  background: var(--ink); color: var(--white);
  padding: 0.85rem 1.6rem; font-weight: 600;
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--teal-ink); border-color: var(--teal-ink); }
.btn-light { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.btn-light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ---------- facts ---------- */

.spec { display: grid; gap: 0; }
@media (min-width: 48rem) { .spec { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 4rem); } }
.spec > div {
  display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 0 1.25rem;
  padding-block: 0.85rem; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.spec .k { color: var(--slate-mid); font-size: var(--step--1); }
.spec .v { font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .spec > div { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ---------- services ---------- */

.service { padding-block: clamp(1.75rem, 4vw, 2.5rem); border-top: 1px solid var(--line-soft); }
.service:first-child { border-top: 0; padding-top: 0; }
.service h3 { font-size: var(--step-2); }
.service p { margin-top: 0.9rem; max-width: var(--measure); color: var(--slate); }

/* ---------- technologies ---------- */

.tech { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3rem); align-items: flex-start; }
.tech li { display: grid; justify-items: center; gap: 0.6rem; width: 5.5rem; text-align: center; }
.tech img { width: 3.25rem; height: 3.25rem; object-fit: contain; }
.tech span { font-size: var(--step--1); color: var(--slate); }

/* ---------- process ---------- */

.steps { counter-reset: step; display: grid; }
.step {
  counter-increment: step;
  display: grid; gap: 0.3rem 1.5rem; grid-template-columns: 3rem 1fr;
  padding-block: 1.4rem; border-top: 1px solid var(--line-soft);
}
.step:first-child { border-top: 0; padding-top: 0; }
.step::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-size: var(--step-2); font-weight: 400; color: var(--line); line-height: 1;
  font-family: Archivo, sans-serif;
}
.step h3 { font-size: var(--step-1); }
.step p { color: var(--slate); max-width: var(--measure); }
@media (max-width: 34rem) { .step { grid-template-columns: 2.25rem 1fr; } }

/* ---------- work ---------- */

.works { display: grid; gap: 0; }
@media (min-width: 58rem) { .works { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 3.5rem); } }
.work {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 1.5rem; align-items: start;
  padding-block: 1.6rem; border-top: 1px solid var(--line-soft);
}
@media (min-width: 58rem) { .work:nth-child(-n + 2) { border-top: 0; padding-top: 0; } }
@media (max-width: 57.99rem) { .work:first-child { border-top: 0; padding-top: 0; } }
.work-mark {
  display: flex; align-items: center; justify-content: center;
  width: 5.5rem; height: 5.5rem; background: var(--white); border: 1px solid var(--line-soft);
}
.work-mark img { width: 4rem; height: 4rem; object-fit: contain; }
.work h3 { font-size: var(--step-1); }
.work p { margin-top: 0.45rem; color: var(--slate); font-size: var(--step-0); }
@media (max-width: 26rem) { .work { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- quote form ---------- */

.form-intro { max-width: var(--measure); color: var(--slate); margin-bottom: 2rem; }

.quote { display: grid; gap: 1.25rem 2rem; max-width: 56rem; }
@media (min-width: 46rem) { .quote { grid-template-columns: 1fr 1fr; } }
.quote .field-wide { grid-column: 1 / -1; }
.quote p { margin: 0; }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); color: var(--slate-mid); }
.hint { font-size: var(--step--1); color: var(--slate-mid); }

.quote input[type="text"],
.quote input[type="email"],
.quote select,
.quote textarea {
  font: inherit; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.quote textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.quote select { appearance: none; background-image: none; }
.quote input:focus-visible,
.quote select:focus-visible,
.quote textarea:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 1px; border-color: var(--teal-ink); }

.quote input[type="file"] { font: inherit; font-size: var(--step--1); padding: 0.55rem 0; width: 100%; }
.quote input[type="file"]::file-selector-button {
  font: inherit; font-size: var(--step--1);
  background: var(--paper-hi); color: var(--ink);
  border: 1px solid var(--line); padding: 0.5rem 1rem;
  margin-inline-end: 0.85rem; cursor: pointer;
}
.quote input[type="file"]::file-selector-button:hover { border-color: var(--teal-ink); color: var(--teal-ink); }

.quote button { cursor: pointer; font: inherit; font-weight: 600; }

/* Spam trap: a field people never see and never fill. */
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- prose pages ---------- */

.prose { max-width: var(--measure); display: grid; gap: 1.1rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--slate); }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 52ch; }
body[dir="rtl"] .lede { line-height: 1.8; }
.stamp { font-size: var(--step--1); color: var(--slate-mid); }

.page-title { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2rem); }
.page-title h1 { font-size: var(--step-3); }

/* ---------- dark block ---------- */

.dark { background: var(--ink); color: var(--paper); }
.dark .head h2 { color: var(--white); }
.dark .head p, .dark p { color: #b9c5cb; }
.dark a { color: var(--white); text-decoration-color: rgb(255 255 255 / 35%); }
.dark a:hover { text-decoration-color: var(--teal); }
.dark .railed::before { border-color: rgb(255 255 255 / 18%); }
.dark .btn-light { color: var(--ink); text-decoration: none; }

.reach { margin-top: 2.25rem; display: grid; gap: 1.6rem; }
@media (min-width: 48rem) { .reach { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); } }
.reach .k { display: block; font-size: var(--step--1); color: #8da0a9; margin-bottom: 0.35rem; }
.reach .v { font-size: var(--step-1); overflow-wrap: anywhere; }
.reach address { font-style: normal; line-height: 1.6; color: #d4dde1; }

/* ---------- legal identity block ---------- */

.identity { background: var(--white); border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2rem); }
.identity h2 { font-size: var(--step-1); }
.identity p { margin-top: 0.5rem; color: var(--slate-mid); font-size: var(--step--1); max-width: var(--measure); }
.identity .spec { margin-top: 1.25rem; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 2.25rem 2.75rem; font-size: var(--step--1); }
.foot-grid { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 2fr 1fr; column-gap: 2rem; } }
.foot h3 { font-size: var(--step--1); font-weight: 500; color: var(--slate-mid); margin-bottom: 0.6rem; }
.foot li { margin-bottom: 0.35rem; }
.foot .entity { font-weight: 600; font-size: var(--step-0); }
.foot .copy { margin-top: 0.5rem; color: var(--slate-mid); }

@media print {
  .masthead .menu, .skip { display: none; }
  body { background: #fff; }
}
