/* =========================================================================
   Tera Software — landing page
   ========================================================================= */

:root {
  /* Brand */
  --primary: #1abc9c;
  --primary-dark: #148f77;
  --primary-ink: #0f7a65;        /* teal for text on light bg (AA contrast) */
  --primary-soft: #e3f6f1;
  --primary-tint: #f0faf7;

  /* Neutrals */
  --navy-900: #0b1b2b;
  --navy-800: #10243a;
  --navy-700: #1a3149;
  --navy-600: #284460;
  --ink: #0f1e2e;
  --text: #2c3a48;
  --muted: #566573;
  --muted-light: #a9b8c6;
  --line: #e2e8e6;
  --line-strong: #cfd9d6;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --white: #ffffff;

  /* Status (mockups) */
  --warn: #f2a93b;
  --warn-soft: #fff4e2;
  --danger: #e2675a;

  /* Type */
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(11, 27, 43, .06), 0 1px 3px rgba(11, 27, 43, .05);
  --shadow: 0 10px 30px -12px rgba(11, 27, 43, .18);
  --shadow-lg: 0 30px 60px -24px rgba(11, 27, 43, .35);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

@supports (overflow: clip) {
  body { overflow-x: clip; }
}

h1, h2, h3 { color: var(--ink); line-height: 1.35; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

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

section[id], main [id] { scroll-margin-top: calc(var(--header-h) + 12px); }

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

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  background: var(--navy-900);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .6rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn-sm { min-height: 40px; padding: .45rem 1.1rem; font-size: .95rem; }
.btn-lg { min-height: 52px; padding: .75rem 1.6rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--primary);
  color: var(--navy-900);
  box-shadow: 0 8px 20px -10px rgba(26, 188, 156, .8);
}
.btn-primary:hover { background: #22cdaa; transform: translateY(-1px); }
.btn-primary:active { transform: none; }

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

.btn .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(-3px); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-ink);
  margin-bottom: .75rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary);
}
.eyebrow--light { color: var(--primary); }

.section { padding-block: 72px; }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-title {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.01em;
}
.section-lead {
  margin-top: .85rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 247, .9);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(11, 27, 43, .35);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
}
/* The logo artwork sits on white; multiply blends that white into the light header */
.brand-logo { display: block; width: auto; height: 50px; mix-blend-mode: multiply; }
@media (min-width: 960px) { .brand-logo { height: 58px; } }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-cta { display: none; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* Mobile nav panel */
.nav {
  position: fixed;
  inset-inline: 0;
  top: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 12px var(--gutter) 20px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.menu-open .nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .2s, transform .2s var(--ease), visibility 0s;
}
.nav-list { display: grid; gap: 2px; }
.nav-link {
  display: block;
  padding: .7rem .75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.nav-link:hover { background: var(--primary-tint); }
.nav-link.is-active { color: var(--primary-ink); background: var(--primary-tint); }
.nav-cta-mobile { width: 100%; margin-top: 12px; }

@media (min-width: 480px) {
  .header-cta { display: inline-flex; }
  .nav-cta-mobile { display: none; }
}

@media (min-width: 960px) {
  :root { --header-h: 76px; }
  .menu-toggle { display: none; }
  .nav {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    max-height: none;
    overflow: visible;
    transition: none;
  }
  .nav-list { display: flex; gap: .25rem; }
  .nav-link {
    position: relative;
    padding: .45rem .85rem;
    font-size: 1rem;
    color: var(--text);
    background: none;
  }
  .nav-link:hover { color: var(--ink); background: none; }
  .nav-link::after {
    content: "";
    position: absolute;
    inset-inline: .85rem;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .25s var(--ease);
  }
  .nav-link:hover::after,
  .nav-link.is-active::after { transform: scaleX(1); }
  .nav-link.is-active { color: var(--ink); background: none; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding-block: 40px 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(15, 30, 46, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 75%);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.015em;
}
.hero-title .accent {
  color: var(--primary-ink);
  background-image: linear-gradient(transparent 68%, var(--primary-soft) 68%);
}

.hero-lead {
  margin-top: 1.1rem;
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: 1.75rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-points li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-points .icon { color: var(--primary-ink); width: 1.1em; height: 1.1em; stroke-width: 2.4; }

/* Hero visual composition */
.hero-visual {
  position: relative;
  padding-block: 8px 40px;
  padding-inline-end: 14%;
}

.hv-window {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hv-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}
.hv-dots { display: flex; gap: 6px; }
.hv-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.hv-url { flex: 1; max-width: 220px; height: 10px; border-radius: 6px; background: #eef2f1; }

.hv-body { display: flex; min-height: 240px; }
.hv-side {
  width: 22%;
  min-width: 64px;
  padding: 14px 10px;
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hv-logo { width: 26px; height: 26px; border-radius: 8px; background: var(--primary); margin-bottom: 8px; }
.hv-nav { height: 9px; border-radius: 6px; background: var(--navy-600); }
.hv-nav.is-active { background: var(--primary); width: 80%; }

.hv-main { flex: 1; padding: 14px; display: grid; gap: 12px; align-content: start; }
.hv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hv-tile {
  display: grid;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.hv-tile b { height: 8px; width: 55%; border-radius: 5px; background: #e6ecea; }
.hv-tile em { height: 14px; width: 80%; border-radius: 5px; background: var(--ink); opacity: .85; }
.hv-tile:first-child em { background: var(--primary-dark); }

.hv-chart {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px 0;
  height: 110px;
}
.hv-chart svg { width: 100%; height: 100%; }

.hv-rows { display: grid; gap: 7px; }
.hv-rows span { height: 9px; border-radius: 6px; background: #eef2f1; }
.hv-rows span:nth-child(2) { width: 82%; }
.hv-rows span:nth-child(3) { width: 64%; }

.hv-phone {
  position: absolute;
  inset-inline-end: 0;
  bottom: 0;
  width: 30%;
  min-width: 110px;
  max-width: 170px;
  aspect-ratio: 9 / 18;
  background: var(--white);
  border: 6px solid var(--navy-900);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  padding: 22px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hv-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 34%;
  height: 7px;
  border-radius: 6px;
  background: var(--navy-900);
  transform: translateX(-50%);
}
.hv-ph-head { width: 70%; height: 9px; border-radius: 6px; background: #e6ecea; }
.hv-ring { width: 64%; margin-block: 4px; }
.hv-ring svg { width: 100%; height: auto; }
.hv-ph-line { width: 80%; height: 8px; border-radius: 6px; background: #eef2f1; }
.hv-ph-line.short { width: 56%; }
.hv-ph-btn { margin-top: auto; width: 100%; height: 22px; border-radius: 999px; background: var(--primary); }

.hv-chip {
  position: absolute;
  top: -6px;
  inset-inline-start: -4px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  background: var(--navy-900);
  color: var(--white);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.hv-chip .icon { color: var(--primary); width: 1em; height: 1em; stroke-width: 2.2; }

@media (min-width: 960px) {
  .hero { padding-block: 72px 104px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .hero-visual { padding-block: 24px 56px; }
}

/* =========================================================================
   Services
   ========================================================================= */
.services { background: var(--white); border-block: 1px solid var(--line); }

.services-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.service-card {
  position: relative;
  padding: 26px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease), background-color .25s;
}
.service-card:hover {
  background: var(--white);
  border-color: rgba(26, 188, 156, .45);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.service-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.service-icon .icon { width: 25px; height: 25px; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; }
.service-card p { color: var(--muted); font-size: .97rem; line-height: 1.75; }

.service-card--cta {
  background: var(--navy-900);
  border-color: var(--navy-900);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service-card--cta:hover { background: var(--navy-800); border-color: var(--navy-800); }
.service-card--cta h3 { color: var(--white); }
.service-card--cta p { color: var(--muted-light); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(-4px); }
.link-arrow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* =========================================================================
   Portfolio
   ========================================================================= */
.project {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.project + .project { margin-top: 28px; }

@media (min-width: 960px) {
  .project { grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 28px; }
  .project + .project { margin-top: 36px; }
  .project--alt .project-media { order: 2; }
  .project--wide { grid-template-columns: 1.45fr 1fr; gap: 40px; }
}

.project-media {
  position: relative;
  min-width: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 15%, rgba(26, 188, 156, .16), transparent 55%),
    var(--navy-900);
  padding: 28px 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 300px;
}
/* Real screenshots; the CSS mockup is only a fallback when the image fails */
.project-media:not(.is-fallback) { min-height: 0; }
.project-media .mockup { display: none; }
.project-media.is-fallback .mockup { display: block; }
.project-media.is-fallback .shot { display: none; }

.shot { margin: 0; }
.shot picture { display: block; }
.shot-img { display: block; width: 100%; height: auto; }

.shot-desktop {
  width: 100%;
  max-width: 640px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
}
.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 30px;
  padding-inline: 14px 10px;
  background: #eef2f1;
  border-bottom: 1px solid var(--line);
}
.shot-title { font-size: .75rem; font-weight: 700; color: var(--muted); }
.shot-desktop .shot-img { aspect-ratio: 1600 / 825; background: var(--bg); }

.shot-phone {
  position: relative;
  width: min(270px, 78%);
  padding: 9px;
  border-radius: 38px;
  background: #050d16;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), inset 0 0 0 1.5px #2a3a4c;
}
.shot-phone .shot-img { border-radius: 30px; aspect-ratio: 540 / 928; background: var(--navy-700); }
.shot-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 16px;
  border-radius: 999px;
  background: #050d16;
  z-index: 1;
}

/* Three overlapping phone screenshots (Tera Menu): each phone overlaps the previous one
   and steps down, so the last (order summary) sits in front. Widths: 3 × 42% − 2 × 13% = 100%. */
.shot-group {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
}
.shot-group .shot-phone { flex: none; width: 42%; padding: 7px; padding-top: 22px; border-radius: 30px; }
.shot-group .shot-phone + .shot-phone { margin-inline-start: -13%; }
.shot-group .shot-phone:nth-child(2) { z-index: 1; margin-top: 28px; }
.shot-group .shot-phone:nth-child(3) { z-index: 2; margin-top: 56px; }
.shot-group .shot-img { border-radius: 23px; aspect-ratio: 540 / 1117; object-fit: cover; object-position: top; }
/* Screenshots start at the browser address bar, so the notch sits in a thicker top bezel instead of over the screen */
.shot-group .shot-notch { top: 7px; width: 30%; height: 9px; }
.project-media.is-fallback .shot-group { display: none; }

@media (max-width: 479.98px) {
  /* Narrow screens: larger phones with more overlap (3 × 46% − 2 × 19% = 100%) */
  .shot-group .shot-phone { width: 46%; padding: 6px; padding-top: 18px; border-radius: 24px; }
  .shot-group .shot-phone + .shot-phone { margin-inline-start: -19%; }
  .shot-group .shot-phone:nth-child(2) { margin-top: 20px; }
  .shot-group .shot-phone:nth-child(3) { margin-top: 40px; }
  .shot-group .shot-img { border-radius: 18px; }
  .shot-group .shot-notch { top: 6px; height: 7px; }
}

/* Small captioned photo inside a project's text column (Tera Menu QR stand) */
.project-figure {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 1.25rem 0 0;
  padding: 10px;
  padding-inline-end: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project-figure img {
  flex: none;
  width: 112px;
  height: auto;
  aspect-ratio: 600 / 640;
  border-radius: var(--radius-sm);
  background: var(--line);
}
.project-figure figcaption { min-width: 0; font-size: .92rem; line-height: 1.6; color: var(--muted); }
.project-figure figcaption b { display: block; color: var(--ink); font-weight: 700; }

.project-body { min-width: 0; padding-inline: 4px; padding-bottom: 8px; }
.project-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .6rem;
  padding: .25rem .8rem;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary-ink);
  font-size: .88rem;
  font-weight: 700;
}
.project-kicker .icon { width: 1.05em; height: 1.05em; }
.project-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 900; }
.project-title [lang="en"] { color: var(--primary-ink); unicode-bidi: isolate; }
.project-desc { margin-top: .85rem; color: var(--muted); font-size: 1.02rem; }
.project-desc strong { color: var(--ink); font-weight: 700; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}
.tags li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .8rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tags li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---- Desktop app mockup (pharmacy) ---- */
.mockup-desktop {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .55);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}
.md-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f1f4f3;
  border-bottom: 1px solid var(--line);
}
.md-title { font-weight: 700; direction: ltr; color: var(--muted); }
.md-controls { display: flex; gap: 10px; }
.md-controls i { width: 10px; height: 2px; background: var(--muted-light); }
.md-controls i:last-child { height: 10px; width: 10px; background: none; border: 2px solid var(--muted-light); border-radius: 2px; }

.md-body { display: flex; min-height: 230px; }
.md-side {
  width: 28%;
  min-width: 82px;
  padding: 12px 8px;
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.md-item {
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted-light);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md-item.is-active { background: rgba(26, 188, 156, .16); color: var(--primary); }

.md-main { flex: 1; min-width: 0; padding: 12px; display: grid; gap: 10px; align-content: start; }
.md-toolbar { display: flex; gap: 8px; align-items: center; }
.md-search { flex: 1; height: 26px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; }
.md-btn {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--navy-900);
  font-weight: 700;
  white-space: nowrap;
}
.md-alert {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: #8a5a10;
  font-weight: 600;
}
.md-alert .icon { width: 14px; height: 14px; }
.md-table { display: grid; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.md-row {
  display: grid;
  grid-template-columns: 2fr 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-top: 1px solid var(--line);
}
.md-row:first-child { border-top: 0; }
.md-row b { height: 7px; border-radius: 4px; background: #e3e9e7; }
.md-row b:nth-child(2) { width: 70%; }
.md-head { background: #f6f8f7; }
.md-head b { background: #cdd7d4; }
.md-row i { width: 10px; height: 10px; border-radius: 50%; justify-self: center; }
.md-row i.ok { background: var(--primary); }
.md-row i.low { background: var(--warn); }

/* ---- Phone mockups (Axon) ---- */
.mockup-phones {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 330px;
}
.phone {
  position: absolute;
  bottom: 0;
  width: 54%;
  height: 100%;
  background: var(--white);
  border: 7px solid #071321;
  border-radius: 30px;
  padding: 28px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .6);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}
.phone-back { inset-inline-end: 0; transform: translateY(-18px) scale(.94); transform-origin: bottom; opacity: .97; }
.phone-front { inset-inline-start: 6%; }
.ph-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 8px;
  border-radius: 6px;
  background: #071321;
  transform: translateX(-50%);
}
.ph-label { font-weight: 700; font-size: 12.5px; align-self: stretch; text-align: start; }

.ph-bars {
  align-self: stretch;
  flex: 1;
  max-height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 4px 0;
  border-bottom: 1px solid var(--line);
}
.ph-bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.ph-bars i, .ph-bars b { width: 7px; height: var(--h); border-radius: 4px 4px 0 0; }
.ph-bars i { background: var(--primary); }
.ph-bars b { background: var(--danger); opacity: .8; }
.ph-legend { display: flex; align-items: center; gap: 5px; align-self: stretch; font-size: 10.5px; color: var(--muted); }
.ph-legend i, .ph-legend b { width: 8px; height: 8px; border-radius: 2px; }
.ph-legend i { background: var(--primary); }
.ph-legend b { background: var(--danger); margin-inline-start: 6px; }
.ph-line { align-self: stretch; height: 8px; border-radius: 6px; background: #eef2f1; }
.ph-line.short { width: 60%; align-self: flex-start; }

.ph-timer { position: relative; width: 78%; margin-top: 6px; }
.ph-timer svg { width: 100%; height: auto; }
.ph-timer b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.ph-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 11px;
}
.ph-btn {
  margin-top: auto;
  align-self: stretch;
  padding: 7px;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--white);
  font-weight: 700;
  text-align: center;
}

/* =========================================================================
   Why Tera
   ========================================================================= */
.why {
  background: var(--navy-900);
  color: var(--muted-light);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.why::before {
  content: "";
  position: absolute;
  inset-inline-end: -180px;
  top: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(26, 188, 156, .18), transparent);
  z-index: -1;
}
.why .section-title { color: var(--white); }
.why .section-lead { color: var(--muted-light); }
.why .eyebrow { color: var(--primary); }

.why-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 680px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.why-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .25s, background-color .25s;
}
.why-item:hover { border-color: rgba(26, 188, 156, .4); background: rgba(255, 255, 255, .05); }
.why-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(26, 188, 156, .14);
  color: var(--primary);
}
.why-icon .icon { width: 23px; height: 23px; }
.why-item h3 { color: var(--white); font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.why-item p { font-size: .97rem; line-height: 1.75; }

/* =========================================================================
   Process
   ========================================================================= */
.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 18px;
  padding-bottom: 32px;
}
.step:last-child { padding-bottom: 0; }
/* vertical connector (mobile) */
.step::before {
  content: "";
  position: absolute;
  inset-inline-start: 27px;
  top: 60px;
  bottom: 4px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 6px, transparent 6px 12px);
}
.step:last-child::before { display: none; }

.step-icon {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary-ink);
  position: relative;
  z-index: 1;
}
.step-icon .icon { width: 24px; height: 24px; }
.step-num {
  font-size: .85rem;
  font-weight: 900;
  color: var(--primary-ink);
  letter-spacing: .08em;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .25rem; }
.step p { color: var(--muted); font-size: .97rem; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .step {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }
  .step-icon { grid-row: auto; margin-bottom: 18px; }
  /* horizontal connector (desktop, RTL: runs toward the next step on the left) */
  .step::before {
    inset-inline-start: 72px;
    inset-inline-end: -12px;
    top: 27px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(to left, var(--line-strong) 0 6px, transparent 6px 12px);
  }
}

/* =========================================================================
   Contact / CTA
   ========================================================================= */
.contact { padding-top: 0; }
.process + .contact { padding-top: 8px; }

.cta-panel {
  position: relative;
  display: grid;
  gap: 28px;
  padding: 32px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 100%, rgba(26, 188, 156, .28), transparent 50%),
    var(--navy-900);
  color: var(--muted-light);
  overflow: hidden;
  isolation: isolate;
}
.cta-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}
.cta-panel .section-title { color: var(--white); }
.cta-lead { margin-top: .85rem; font-size: 1.05rem; max-width: 520px; }

.cta-points { display: grid; gap: .55rem; margin-top: 1.4rem; }
.cta-points li { display: flex; align-items: center; gap: .55rem; color: rgba(255, 255, 255, .86); font-weight: 600; }
.cta-points .icon { color: var(--primary); width: 1.1em; height: 1.1em; }

.cta-actions { display: grid; gap: 12px; }

/* Primary channel: WhatsApp */
.wa-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #22cdaa, var(--primary) 55%, #16a487);
  color: var(--navy-900);
  box-shadow: 0 22px 44px -20px rgba(26, 188, 156, .75);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.wa-card:hover { transform: translateY(-3px); box-shadow: 0 28px 52px -20px rgba(26, 188, 156, .9); }
.wa-card-head { display: flex; align-items: center; gap: 14px; }
.wa-card-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--navy-900);
  color: var(--primary);
}
.wa-card-ico .icon { width: 30px; height: 30px; }
.wa-card-txt { display: grid; line-height: 1.35; }
.wa-card-txt small { font-size: .88rem; font-weight: 600; color: rgba(11, 27, 43, .72); }
.wa-card-txt b { font-size: clamp(1.1rem, .95rem + .8vw, 1.3rem); font-weight: 900; }
.wa-card-num {
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-align: start;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}
.wa-card-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 50px;
  border-radius: 14px;
  background: var(--navy-900);
  color: var(--white);
  font-weight: 700;
}
.wa-card-go .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.wa-card:hover .wa-card-go .icon { transform: translateX(-3px); }

/* Secondary channel: Instagram */
.ig-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--white);
  transition: background-color .2s, border-color .2s;
}
.ig-card:hover { background: rgba(255, 255, 255, .1); border-color: rgba(26, 188, 156, .6); }
.ig-card-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26, 188, 156, .16);
  color: var(--primary);
}
.ig-card-ico .icon { width: 22px; height: 22px; }
.ig-card-txt { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.ig-card-txt b { font-weight: 700; }
.ig-card-txt small { color: var(--muted-light); text-align: start; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.ig-card-arrow { color: var(--muted-light); width: 1.1em; height: 1.1em; transition: transform .2s var(--ease), color .2s; }
.ig-card:hover .ig-card-arrow { color: var(--primary); transform: translateX(-3px); }


@media (min-width: 900px) {
  .cta-panel { grid-template-columns: 1fr minmax(0, 420px); align-items: center; gap: 56px; padding: 56px; }
  .wa-card { padding: 28px; }
}

/* =========================================================================
   Founder (English section, LTR inside the RTL page)
   ========================================================================= */
/* contact above already supplies the top gap and the footer margin the bottom one */
.section.founder { padding-block: 0; }

.founder-card {
  display: grid;
  justify-items: center;
  gap: 24px;
  max-width: 920px;
  margin-inline: auto;
  padding: 32px 22px;
  text-align: center;
  background:
    radial-gradient(circle at 0% 0%, var(--primary-tint), transparent 45%),
    var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Luxury medallion: navy disc, thin gold ring, soft teal halo */
.founder-avatar {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  padding: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #1f3a56, var(--navy-900) 70%) padding-box,
    linear-gradient(145deg, #f6e3a1, #c9a04a 45%, #8e6522) border-box;
  border: 3px solid transparent;
  box-shadow: 0 0 0 8px var(--primary-soft), 0 22px 40px -18px rgba(11, 27, 43, .75);
}
.founder-icon { display: block; width: 100%; height: 100%; border-radius: 50%; }

.founder-body { min-width: 0; }
.founder .eyebrow { margin-bottom: .5rem; }
.founder-name {
  font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.95rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.founder-role { margin-top: .2rem; font-weight: 700; color: var(--primary-ink); }
.founder-bio { margin-top: .9rem; max-width: 560px; color: var(--muted); font-size: 1.02rem; }
.founder-tags { justify-content: center; }

@media (min-width: 720px) {
  .founder-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    gap: 40px;
    padding: 44px 48px;
    text-align: start;
  }
  .founder-avatar { width: 172px; height: 172px; }
  .founder-tags { justify-content: flex-start; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  margin-top: 72px;
  background: var(--navy-900);
  color: var(--muted-light);
  padding-top: 56px;
  font-size: .97rem;
}
.footer-grid { display: grid; gap: 36px; padding-bottom: 40px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 48px; } }

/* The logo has an opaque white background, so it sits on a light card in the dark footer */
.footer-logo {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6);
}
.footer-logo img { display: block; width: auto; height: 84px; }
.footer-brand p { margin-top: 1.1rem; max-width: 360px; }

.footer-title { color: var(--white); font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--primary); }

.footer-col .footer-contact { gap: .8rem; }
.footer-contact-link { display: flex; align-items: center; gap: .75rem; }
.footer-contact-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--primary);
  transition: border-color .2s;
}
.footer-contact-ico .icon { width: 20px; height: 20px; }
.footer-contact-link:hover .footer-contact-ico { border-color: var(--primary); }
.footer-contact-txt { display: grid; min-width: 0; line-height: 1.35; }
.footer-contact-txt small { font-size: .8rem; color: var(--muted-light); }
.footer-contact-txt [dir="ltr"] { color: var(--white); text-align: start; unicode-bidi: plaintext; overflow-wrap: anywhere; transition: color .2s; }
.footer-contact-link:hover [dir="ltr"] { color: var(--primary); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .9rem;
}
.to-top { color: var(--muted-light); font-weight: 600; }
.to-top:hover { color: var(--primary); }

/* =========================================================================
   Responsive tweaks
   ========================================================================= */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .section { padding-block: 88px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .section { padding-block: 104px; }
  .section-head { margin-bottom: 52px; }
  .project-media { min-height: 380px; padding: 40px 32px; }
  .project-media:not(.is-fallback) { padding: 32px 24px; }
}

@media (max-width: 479.98px) {
  .mockup-desktop { font-size: 11px; }
  .md-side { min-width: 92px; padding-inline: 6px; }
  .md-item { padding-inline: 6px; }
  .project-media { padding-inline: 12px; }
  .project-media:not(.is-fallback) { padding-block: 20px; }
  .wa-card { padding: 18px; }
  .ig-card-txt b { font-size: .95rem; }
}

@media (max-width: 379.98px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hv-tiles { gap: 6px; }
  .hv-tile { padding: 10px 6px; }
  .mockup-phones { height: 300px; }
  .phone { padding-inline: 10px; }
}

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.services-grid .reveal:nth-child(4n + 2),
.why-grid .reveal:nth-child(3n + 2),
.steps .reveal:nth-child(2) { transition-delay: .07s; }
.services-grid .reveal:nth-child(4n + 3),
.why-grid .reveal:nth-child(3n + 3),
.steps .reveal:nth-child(3) { transition-delay: .14s; }
.services-grid .reveal:nth-child(4n + 4),
.steps .reveal:nth-child(4) { transition-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
