/* D2Cust — design system.
   Daniel & David Custom User Systems & Technology.
   Hebrew-first (RTL), dark, technical. Built on logical properties so the whole thing
   mirrors correctly without a second stylesheet. */

:root {
  /* Surfaces — near-black with a cool cast, so the accent reads warm against it */
  --bg: #070c12;
  --bg-2: #0b131c;
  --surface: #0e1721;
  --surface-2: #131f2b;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);

  /* Text */
  --text: #f2f6f9;
  --text-2: #a3b4c2;
  --text-3: #6c7f8e;

  /* Accent: amber carries the brand, cyan is reserved for technical micro-labels */
  --accent: #f0b429;
  --accent-2: #ffd166;
  --accent-dim: rgba(240, 180, 41, 0.12);
  --cyan: #4cc9f0;
  --good: #5ed6a4;
  --bad: #ff8f8f;

  /* Rhythm — everything is a multiple of 4 */
  --r: 6px;
  --r-lg: 14px;
  --gut: clamp(20px, 5vw, 56px);
  --max: 1120px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* `hidden` is user-agent priority, so any class setting display silently beats it.
   The wizard relies on `hidden` for steps and buttons — this has to win. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

body {
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  /* Two soft washes only. No grid overlay — it read as busy at small sizes. */
  background-image:
    radial-gradient(760px 420px at 88% -8%, rgba(240, 180, 41, 0.07), transparent 64%),
    radial-gradient(820px 560px at 4% 104%, rgba(76, 201, 240, 0.07), transparent 60%);
  background-attachment: fixed;
}

/* Latin brand/technical strings inside RTL text need explicit isolation */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-feature-settings: "tnum";
}

.num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-feature-settings: "tnum";
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  white-space: nowrap;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(240, 180, 41, 0.28); color: #fff; }

img { max-width: 100%; display: block; }

/* ══════════════ NAV ══════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 12, 18, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  flex: none;
}
.logo b { color: var(--accent); font-weight: 800; }
.logo:hover { color: var(--text); }

/* Main tabs sit next to the logo; the client-area button is pushed to the far end. */
.nav-tabs { display: flex; gap: 2px; margin-inline-start: 18px; }

.nav-tabs a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--r);
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}
.nav-tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

/* Active tab gets a real indicator, not just a colour shift */
.nav-tabs a[aria-current="page"] { color: var(--text); }
.nav-tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-cta { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* The client area is a different kind of destination — bordered, keyed, set apart. */
.btn-client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid rgba(240, 180, 41, 0.42);
  border-radius: 100px;
  background: var(--accent-dim);
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn-client:hover {
  background: rgba(240, 180, 41, 0.2);
  border-color: var(--accent);
  color: var(--accent-2);
}
.btn-client svg { width: 15px; height: 15px; flex: none; }

@media (max-width: 720px) {
  :root { --nav-h: 56px; }
  .nav-in { flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; row-gap: 0; }
  .nav-cta { margin-inline-start: auto; }
  .nav-tabs {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 2px;
    gap: 0;
  }
  /* Equal-width tabs give predictable, comfortable tap targets on a phone */
  .nav-tabs a { flex: 1; text-align: center; padding: 12px 6px; font-size: 14.5px; border-radius: 0; }
  .nav-tabs a[aria-current="page"]::after { inset-inline: 20%; bottom: 0; }
  .btn-client { padding: 8px 13px; font-size: 13.5px; }
}

/* ══════════════ LAYOUT ══════════════ */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

section { scroll-margin-top: calc(var(--nav-h) + 20px); }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
  direction: ltr;
  unicode-bidi: isolate;
}
.eyebrow.he { direction: rtl; letter-spacing: 0.14em; font-family: inherit; font-weight: 600; }

h1 {
  font-size: clamp(34px, 6.4vw, 62px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.4; }

.lead {
  font-size: clamp(16.5px, 2.1vw, 20px);
  color: var(--text-2);
  max-width: 52ch;
  line-height: 1.65;
  font-weight: 300;
}

.muted { color: var(--text-3); font-size: 14px; }

.rule { border: 0; border-top: 1px solid var(--line); margin: clamp(52px, 8vw, 88px) 0; }

/* ══════════════ BUTTONS ══════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: #10161d;
  transition: background 0.16s ease, transform 0.1s ease, border-color 0.16s ease;
}
.btn:hover { background: var(--accent-2); color: #10161d; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-3); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--text-3); color: var(--text); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 480px) { .btn-row .btn { flex: 1 1 100%; } }

/* ══════════════ CARDS ══════════════ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 28px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.65; font-weight: 300; }

a.card { position: relative; }
a.card:hover { border-color: rgba(240, 180, 41, 0.4); background: var(--surface-2); transform: translateY(-3px); }
a.card::after {
  content: "";
  position: absolute;
  inset-block-start: 26px;
  inset-inline-end: 24px;
  width: 8px; height: 8px;
  border-top: 1.6px solid var(--text-3);
  border-inline-start: 1.6px solid var(--text-3);
  transform: rotate(-45deg);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
a.card:hover::after { border-color: var(--accent); transform: rotate(-45deg) translate(2px, -2px); }

.card .idx {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ══════════════ STEP LIST (how it works) ══════════════ */

.steps-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.steps-list > div { background: var(--bg-2); padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; }
.steps-list .n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  flex: none;
  padding-top: 3px;
  min-width: 26px;
  direction: ltr;
}
.steps-list h3 { margin-bottom: 3px; }
.steps-list p { color: var(--text-2); font-size: 14.5px; font-weight: 300; line-height: 1.6; }

/* ══════════════ TEAM ══════════════ */

.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }

.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
}
.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }

.avatar {
  position: relative;
  width: 68px; height: 68px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-2), #1b2a38);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
}
/* Initials sit underneath; the photo covers them when it loads. */
.avatar .initials {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.person .name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.person .role { font-size: 13.5px; color: var(--accent); font-weight: 500; margin-top: 2px; }
.person p { color: var(--text-2); font-size: 15px; font-weight: 300; line-height: 1.7; }
.person ul { list-style: none; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.person li {
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 11px;
}

/* ══════════════ FORM CONTROLS ══════════════ */

.field { margin-bottom: 22px; }

.field > label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.field .hint { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 9px; line-height: 1.55; font-weight: 300; }
.field .req { color: var(--accent); margin-inline-start: 4px; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="password"], input[type="date"],
textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS Safari zooming on focus */
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.65; }

input::placeholder, textarea::placeholder { color: var(--text-3); }

input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.13);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--bad);
}

/* Native select popups follow the OS scheme; force the options dark too */
select { appearance: none; cursor: pointer; padding-inline-end: 38px; }
select option { background: var(--bg-2); color: var(--text); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 15px;
  top: 50%;
  width: 7px; height: 7px;
  margin-top: -6px;
  border-bottom: 1.6px solid var(--text-3);
  border-inline-start: 1.6px solid var(--text-3);
  transform: rotate(-45deg);
  pointer-events: none;
}

input[type="number"] { direction: ltr; text-align: start; }

.err-msg { color: var(--bad); font-size: 13px; margin-top: 6px; min-height: 1.1em; line-height: 1.4; }

/* ══════════════ FOOTER ══════════════ */

.foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 10vw, 110px);
  padding: 30px 0 44px;
  display: flex;
  gap: 10px 26px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-3);
}
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .sep { margin-inline-start: auto; }

/* ══════════════ NOTICE PAGES (404 / 503) ══════════════ */

body.plain { display: flex; align-items: center; justify-content: center; padding: 24px; }

.notice {
  max-width: 460px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 48px 34px;
}
.notice h1 { font-size: 54px; margin-bottom: 12px; color: var(--accent); }
.notice p { color: var(--text-2); margin-bottom: 20px; font-weight: 300; }
.notice code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 3px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
