/* HACHI website. Brand: purple #5B35D5, pink #F66D8B, tile #F2EDFF. */
:root {
  --brand: #5b35d5;
  --brand-deep: #4e28c4;
  --brand-soft: #f2edff;
  --accent: #f66d8b;
  --ink: #17131f;
  --muted: #5d566b;
  --line: #e7e2f2;
  --bg: #ffffff;
  --bg-alt: #faf8ff;
  --radius: 18px;
  --shadow: 0 18px 48px -20px rgb(78 40 196 / 0.35);
  --font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body {
  line-height: 1.6;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand small {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}
.nav a {
  color: var(--muted);
}
.nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.lang {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
@media (max-width: 720px) {
  .nav .hide-sm {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 17px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(180deg, #7350e8, var(--brand-deep));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  box-shadow: 0 22px 52px -18px rgb(78 40 196 / 0.5);
}
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, #e9e0ff 0%, transparent 60%),
    radial-gradient(700px 380px at 0% 0%, #ffe7ee 0%, transparent 55%), var(--bg);
  padding: 88px 0 72px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 56px 0;
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.2;
  margin: 18px 0 16px;
  letter-spacing: -0.01em;
}
html[lang="en"] h1 {
  letter-spacing: -0.025em;
  line-height: 1.1;
}
h1 span {
  color: var(--brand);
}
.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.fine {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Hero visual: a mock dictation */
.mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.mock .bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.mock .bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e6e1f1;
}
.mock .doc {
  font-size: 18px;
  min-height: 120px;
  color: var(--ink);
}
.mock .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--brand);
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
  margin-inline-start: 2px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.pill {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #17131f;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px 10px 12px;
  font-size: 14px;
}
html[dir="rtl"] .pill {
  padding: 10px 12px 10px 16px;
}
.pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgb(246 109 139 / 0.25);
}
.wave {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 18px;
}
.wave b {
  width: 3px;
  border-radius: 3px;
  background: #fff;
  animation: wave 1.1s ease-in-out infinite;
}
.wave b:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}
.wave b:nth-child(2) {
  height: 14px;
  animation-delay: 0.1s;
}
.wave b:nth-child(3) {
  height: 9px;
  animation-delay: 0.2s;
}
.wave b:nth-child(4) {
  height: 16px;
  animation-delay: 0.3s;
}
.wave b:nth-child(5) {
  height: 7px;
  animation-delay: 0.4s;
}
@keyframes wave {
  50% {
    transform: scaleY(0.45);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wave b,
  .mock .caret {
    animation: none;
  }
}

/* Sections */
section {
  padding: 80px 0;
}
section.alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.25;
  margin: 0 0 12px;
}
.sub {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 40px;
  max-width: 40em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.card:hover {
  border-color: #cfc3f5;
  transform: translateY(-2px);
}
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 14px;
}
.icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 19px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 800px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.step p {
  margin: 0;
  color: var(--muted);
}
kbd {
  font-family: inherit;
  font-size: 0.9em;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
}

.privacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 800px) {
  .privacy {
    grid-template-columns: 1fr;
  }
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
}
details + details {
  margin-top: 10px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
}
details p {
  color: var(--muted);
  margin: 10px 0 0;
}

.download {
  text-align: center;
  border-radius: 28px;
  padding: 56px 24px;
  background: linear-gradient(160deg, #6a45e6 0%, var(--brand-deep) 100%);
  color: #fff;
}
.download h2 {
  color: #fff;
}
.download p {
  color: rgb(255 255 255 / 0.85);
  font-size: 18px;
  margin: 0 0 26px;
}
.download .btn-primary {
  background: #fff;
  color: var(--brand-deep);
}
.download .fine {
  color: rgb(255 255 255 / 0.75);
}

footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
footer nav {
  display: flex;
  gap: 18px;
}

/* Legal pages */
.legal {
  padding: 56px 0 80px;
}
.legal .wrap {
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(30px, 4vw, 42px);
}
.legal h2 {
  font-size: 22px;
  margin-top: 36px;
}
.legal p,
.legal li {
  color: #3a3446;
}
.note {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
}
