/* ============================================================
   YÜBÜTeCh — styles.css
   Dark petrol premium theme · FR/AR/EN · RTL-ready (logical props)
   ============================================================ */

:root {
  --ink: #04120F;
  --ink-2: #061915;
  --surface: #0A2420;
  --surface-2: #0D2C27;
  --surface-3: #113832;
  --teal: #00544B;
  --teal-soft: #0F7A6C;
  --teal-glow: rgba(15, 122, 108, 0.16);
  --orange: #F58220;
  --orange-deep: #D96C10;
  --text: #F3F1EA;
  --muted: #A9B8B2;
  --faint: #7E928C;
  --line: rgba(243, 241, 234, 0.09);
  --line-strong: rgba(243, 241, 234, 0.16);
  --light-bg: #FAF8F3;
  --light-text: #14251F;
  --light-muted: #4C5D57;
  --light-line: rgba(20, 37, 31, 0.12);
  --danger: #E8705F;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font-display: "Bricolage Grotesque", "Noto Sans Arabic", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Noto Sans Arabic", system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --wrap: 1180px;
}

html[lang="ar"] {
  --font-display: "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

a { color: inherit; }

.container {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); position: relative; }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-sub { color: var(--muted); margin: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.9rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  inset-inline-start: 1rem;
  z-index: 200;
  background: var(--orange);
  color: #1A0D02;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }

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

::selection { background: var(--orange); color: #1A0D02; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(160deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #1A0D02;
  box-shadow: 0 8px 24px rgba(245, 130, 32, 0.22);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(245, 130, 32, 0.34); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--teal-soft); background: var(--teal-glow); }

.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; min-height: 40px; }
.btn-lg { padding: 1rem 2rem; font-size: 1.08rem; }

/* ============ Header ============ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(4, 18, 15, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-inline-end: auto;
}
.brand-emblem { display: block; width: 34px; height: 32px; object-fit: contain; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}
.brand-tech { color: var(--orange); }

.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.main-nav a:hover { color: var(--text); border-color: var(--orange); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--orange); color: #1A0D02; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.menu-toggle-box { display: block; width: 20px; }
.menu-toggle-box span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  margin-block: 4px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-box span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ Dot nav ============ */
.dot-nav {
  position: fixed;
  inset-inline-end: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dot-nav a {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}
.dot-nav a::after {
  content: attr(data-label);
  position: absolute;
  inset-inline-end: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.dot-nav a:hover::after,
.dot-nav a:focus-visible::after { opacity: 1; }
.dot-nav a.active { background: var(--orange); transform: scale(1.25); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding-block: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(0.85);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 18% 30%, rgba(0, 84, 75, 0.42) 0%, transparent 70%),
    radial-gradient(45% 45% at 85% 15%, rgba(245, 130, 32, 0.07) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(4, 18, 15, 0.55) 0%, var(--ink) 92%);
}

.hero-inner { max-width: 860px; margin-inline: 0; }

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 4.6rem);
  font-weight: 750;
  margin-block: 0.35rem 1.1rem;
}
.hero-title span { display: block; }
.hero-title-accent {
  background: linear-gradient(100deg, var(--teal-soft) 0%, #4FB3A2 55%, var(--orange) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 1.4rem;
}

.hero-rotator {
  color: var(--faint);
  min-height: 1.7em;
  margin-bottom: 1.8rem;
  font-size: 1rem;
}
.rotator { display: inline-block; }
.rotator-item {
  display: inline-block;
  color: #C9D8D2;
  border-bottom: 1px dashed rgba(245, 130, 32, 0.45);
}
.rotator-item.is-swapping { animation: rotator-in 0.45s ease; }
@keyframes rotator-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 3.2rem; }

.hero-visual {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(13, 44, 39, 0.85), rgba(6, 25, 21, 0.9));
  box-shadow: var(--shadow);
  padding: 1.4rem 1.4rem 1.6rem;
  max-width: 980px;
}
.visual-badge {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1.1rem;
}

.hero-flow {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
}
.flow-card {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(4, 18, 15, 0.55);
  padding: 1rem 1.1rem;
  min-width: 0;
}
.flow-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-soft);
  margin-bottom: 0.7rem;
}
.flow-card-ready { border-color: rgba(245, 130, 32, 0.35); }
.flow-msg { font-style: italic; color: #D8E2DD; }
.flow-field { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.3rem; }
.flow-field-missing em { color: var(--orange); font-style: normal; border-bottom: 1px dashed var(--orange); }
.flow-list { list-style: none; }
.flow-list li {
  font-size: 0.92rem;
  color: var(--muted);
  padding-inline-start: 1.2rem;
  position: relative;
  margin-bottom: 0.35rem;
}
.flow-list li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--teal-soft);
  font-weight: 700;
}
.flow-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--orange);
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line-strong);
}
.flow-arrow {
  align-self: center;
  color: var(--faint);
  font-size: 1.3rem;
  flex-shrink: 0;
}
[dir="rtl"] .flow-arrow,
[dir="rtl"] .tf-arrow { transform: scaleX(-1); }

/* ============ Markers band ============ */
.markers {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  padding-block: 2.2rem;
}
.markers-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-bottom: 1.6rem;
}
.markers-list li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.markers-list strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--orange);
  font-weight: 750;
}
.tools-strip { border-top: 1px dashed var(--line); padding-top: 1.2rem; }
.tools-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
}
.tools-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.tools-list li {
  font-size: 0.86rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  background: rgba(13, 44, 39, 0.4);
}
.tools-note { font-size: 0.82rem; color: var(--faint); margin: 0; }

/* ============ Solutions ============ */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.sol-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface) 0%, var(--ink-2) 100%);
  padding: 1.9rem 1.8rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.sol-card:hover { border-color: rgba(15, 122, 108, 0.5); transform: translateY(-3px); }
.sol-icon {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--teal-soft);
  border: 1px solid rgba(15, 122, 108, 0.4);
  background: var(--teal-glow);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 1.1rem;
}
.sol-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.sol-problem, .sol-journey, .sol-human {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.sol-problem strong, .sol-journey strong, .sol-human strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.sol-human strong { color: var(--teal-soft); }
.sol-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}
.sol-link:hover { border-color: var(--orange); }

/* ============ Projects / tabs ============ */
.projects { background: var(--ink-2); border-block: 1px solid var(--line); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tabs [role="tab"] {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
  min-height: 44px;
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--orange);
}

.tab-panel { outline: none; }

.project-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.2rem;
  align-items: start;
}

.project-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid rgba(245, 130, 32, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.9rem;
}
.project-info h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.project-problem, .project-journey {
  font-size: 0.97rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.project-problem strong, .project-journey strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.project-workflow {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(4, 18, 15, 0.5);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1.3rem;
}
.wf-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
}
.wf-steps { list-style: none; counter-reset: wf; }
.wf-steps li {
  counter-increment: wf;
  position: relative;
  padding-inline-start: 2.3rem;
  margin-bottom: 0.7rem;
  font-size: 0.94rem;
  color: var(--muted);
}
.wf-steps li::before {
  content: counter(wf, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0.1em;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-soft);
}
.tech-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-chips li {
  font-size: 0.84rem;
  font-weight: 600;
  color: #C9D8D2;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  background: rgba(13, 44, 39, 0.45);
}
.project-ethic {
  font-size: 0.9rem;
  color: var(--muted);
  border-inline-start: 3px solid var(--teal-soft);
  padding-inline-start: 1rem;
}

.project-sim {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--surface) 0%, #051713 100%);
  padding: 1.5rem 1.5rem 1.7rem;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.sim-head { margin-bottom: 1.1rem; }
.sim-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 0.3rem; }
.sim-note { font-size: 0.85rem; color: var(--faint); margin: 0; }
.sim-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.sim-console {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #020B09;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  padding: 1rem 1.1rem;
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.sim-console:empty::before {
  content: attr(data-placeholder);
  color: var(--faint);
  font-style: italic;
}
.sim-line {
  display: block;
  padding-inline-start: 1.1rem;
  position: relative;
  margin-bottom: 0.45rem;
  color: #BFD0CA;
  animation: sim-line-in 0.3s ease both;
}
.sim-line::before {
  content: "›";
  position: absolute;
  inset-inline-start: 0;
  color: var(--teal-soft);
}
.sim-line.is-warn { color: var(--orange); }
.sim-line.is-warn::before { content: "⚠"; color: var(--orange); }
.sim-line.is-ok { color: #8FD4C6; }
.sim-line.is-ok::before { content: "✓"; color: #5FC0AE; }
.sim-line.is-final {
  color: var(--text);
  border-top: 1px dashed var(--line-strong);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
  font-weight: 600;
}
@keyframes sim-line-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.sim-actions { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.sim-safety {
  font-size: 0.84rem;
  color: var(--orange);
  border: 1px dashed rgba(245, 130, 32, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
}

/* ============ Method (light section) ============ */
.section-light { background: var(--light-bg); color: var(--light-text); }
.section-light .eyebrow { color: var(--orange-deep); }
.section-light .section-sub { color: var(--light-muted); }

.method-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
  counter-reset: mth;
}
.method-step {
  border: 1px solid var(--light-line);
  border-radius: var(--radius);
  background: #FFFFFF;
  padding: 1.7rem 1.5rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.method-step:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 37, 31, 0.08); }
.method-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--orange);
  display: block;
  margin-bottom: 0.8rem;
}
.method-step h3 { font-size: 1.2rem; color: var(--light-text); }
.method-step p { color: var(--light-muted); font-size: 0.95rem; margin: 0; }

/* ============ Tools flow ============ */
.toolsflow { background: var(--ink-2); border-bottom: 1px solid var(--line); }
.tf-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}
.tf-node {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  min-height: 48px;
}
.tf-node:hover { border-color: var(--teal-soft); transform: translateY(-1px); }
.tf-node[aria-expanded="true"] {
  border-color: var(--orange);
  background: rgba(245, 130, 32, 0.1);
}
.tf-node-icon {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--teal-soft);
  border: 1px solid rgba(15, 122, 108, 0.45);
  background: var(--teal-glow);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.tf-node-icon-human { color: var(--orange); border-color: rgba(245, 130, 32, 0.45); background: rgba(245, 130, 32, 0.12); }
.tf-arrow { color: var(--faint); font-size: 1.2rem; }

.tf-detail {
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  background: rgba(13, 44, 39, 0.35);
  padding: 1.3rem 1.5rem;
  max-width: 760px;
}
.tf-detail h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.tf-detail p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ============ Estimator ============ */
.est-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem;
  align-items: start;
}
.est-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.8rem 1.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.2rem;
}
.est-form .field { min-width: 0; }
.est-form .field:first-child,
.est-form .field:nth-child(3) { grid-column: span 1; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #D4DED9;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 46px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.18);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.84rem; margin: 0.35rem 0 0; }

.est-actions { grid-column: 1 / -1; }

.est-results {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--surface-2), #051713);
  padding: 1.8rem 1.7rem;
}
.est-result {
  border-bottom: 1px dashed var(--line);
  padding-block: 0.9rem;
}
.est-result:first-child { padding-top: 0; }
.est-result-label { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.25rem; }
.est-result-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
  margin: 0;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
.est-result-accent { color: var(--orange); }
.est-disclaimer {
  font-size: 0.82rem;
  color: var(--faint);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.about-text h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.about-lead { font-size: 1.12rem; color: #D4DED9; }
.about-points { list-style: none; margin-top: 1.4rem; }
.about-points li {
  padding-inline-start: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
  color: var(--muted);
}
.about-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--orange);
  transform: rotate(45deg);
}
.about-logo-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.about-logo-card img { width: min(300px, 80%); }
.about-caption p { font-size: 0.92rem; color: var(--muted); }
.about-note { font-size: 0.84rem; color: var(--faint); font-style: italic; margin: 0; }

/* ============ FAQ ============ */
.faq-container { max-width: 820px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 650;
  text-align: start;
  padding: 1.25rem 0;
  padding-inline-end: 2.6rem;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  transition: color 0.18s ease;
}
.faq-q:hover { color: var(--orange); }
.faq-q::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--orange);
  transition: transform 0.25s ease;
  line-height: 1;
}
.faq-q[aria-expanded="true"]::after { transform: translateY(-50%) rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--muted); font-size: 0.97rem; padding-bottom: 1.3rem; margin: 0; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }

/* ============ Contact ============ */
.contact { background: var(--ink-2); border-top: 1px solid var(--line); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-info h3 { font-size: 1.25rem; }
.contact-list { list-style: none; margin-bottom: 1.4rem; }
.contact-list li {
  border-bottom: 1px dashed var(--line);
  padding-block: 0.9rem;
}
.contact-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.2rem;
}
.contact-value {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  font-size: 1.02rem;
}
.contact-value:hover { color: var(--orange); }
.contact-availability { font-size: 0.9rem; color: var(--faint); margin: 0; }

.brief-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.8rem 1.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.2rem;
}
.brief-form .field:nth-child(3),
.brief-form .field:nth-child(4) { grid-column: span 2; }
.brief-form .field:nth-child(5),
.brief-form .field:nth-child(6) { grid-column: span 1; }
.brief-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.brief-feedback {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: #8FD4C6;
  min-height: 1.4em;
}
.brief-feedback.is-error { color: var(--danger); }
.copy-fallback {
  grid-column: 1 / -1;
  min-height: 140px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

/* ============ Final CTA ============ */
.final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 60% at 50% 110%, rgba(0, 84, 75, 0.55) 0%, transparent 70%),
    radial-gradient(30% 40% at 50% 115%, rgba(245, 130, 32, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.final-inner { position: relative; max-width: 680px; }
.final-cta h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.final-cta p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: #020B09;
  padding-block: 3rem 1.6rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.2rem;
  margin-bottom: 2.4rem;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.footer-tag { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.footer-disclaimer { font-size: 0.82rem; color: var(--faint); margin: 0; max-width: 320px; }
.footer-nav { display: grid; gap: 0.55rem; align-content: start; }
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
}
.footer-nav a:hover { color: var(--orange); }
.footer-contact { display: grid; gap: 0.55rem; align-content: start; justify-items: start; }
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-contact a:hover { color: var(--orange); }
.footer-top {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  margin-top: 0.6rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.footer-top:hover { border-color: var(--orange); color: var(--orange); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--faint);
}
.footer-bottom p { margin: 0; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 1.4rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid rgba(245, 130, 32, 0.5);
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 150;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease;
}
[dir="rtl"] .toast { transform: translateX(50%); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
[dir="rtl"] .toast { animation-name: toast-in-rtl; }
@keyframes toast-in-rtl {
  from { opacity: 0; transform: translateX(50%) translateY(10px); }
  to { opacity: 1; transform: translateX(50%) translateY(0); }
}

/* ============ Reveal animations ============ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js .reveal-d1 { transition-delay: 0.08s; }
html.js .reveal-d2 { transition-delay: 0.16s; }
html.js .reveal-d3 { transition-delay: 0.24s; }
html.js .reveal-d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .rotator-item.is-swapping,
  .sim-line { animation: none !important; }
  .btn, .sol-card, .method-step, .tf-node, .faq-a { transition: none !important; }
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .dot-nav { display: none; }
}

@media (max-width: 980px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-sim { position: static; }
  .est-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(4, 18, 15, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1.5rem 1.4rem;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 0.95rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}

@media (max-width: 680px) {
  .solutions-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .est-form { grid-template-columns: 1fr; }
  .brief-form { grid-template-columns: 1fr; }
  .brief-form .field { grid-column: 1 / -1; }
  .hero-flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); align-self: flex-start; padding-inline-start: 1.5rem; }
  [dir="rtl"] .flow-arrow { transform: rotate(90deg); }
  .markers-list { flex-direction: column; gap: 0.8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .header-actions { gap: 0.5rem; }
  .lang-btn { padding: 0.3rem 0.5rem; }
  .brief-actions .btn { flex: 1 1 100%; }
}
