/* GRIDORA — redesigned Arabic document-workspace UI */
:root {
  --paper: #f6f7f8;
  --ink: #17233c;
  --muted: #68748a;
  --line: #e5e8ed;
  --navy: #172440;
  --navy-deep: #111d37;
  --lime: #c8f36b;
  --lime-soft: #eff9d8;
  --panel-shadow: 0 14px 34px rgba(22, 35, 60, .07);
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 88% 0%, rgba(223, 231, 244, .7) 0, transparent 32rem),
    var(--paper);
}

header {
  max-width: 1240px;
  min-height: 72px;
  padding: 13px 24px;
  gap: 20px;
}

.brand { gap: 11px; }
.brand strong { font-size: 19px; font-weight: 900; letter-spacing: .25px; }
.brand small { font-size: 11px; color: #758098; }
.logo { width: 42px; height: 42px; border-radius: 13px; }
.header-actions { gap: 12px; }
.top-nav { display: flex; align-items: center; gap: 23px; }
.top-nav a {
  color: #69748a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.top-nav a:hover { color: var(--navy); }
.top-nav .nav-cta {
  padding: 10px 15px;
  border: 1px solid #e4e7ec;
  border-radius: 13px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 3px 10px rgba(20, 31, 52, .04);
}
.top-nav .nav-cta:hover { transform: translateY(-1px); border-color: #cbd4e0; }
.header-badge {
  border: 1px solid #e5e8ed;
  background: #fff;
  color: #667188;
  font-size: 10px;
  padding: 7px 10px;
  white-space: nowrap;
}
.lang-toggle { min-width: 42px; height: 36px; border-radius: 11px; }

.wrap { max-width: 1240px; padding: 10px 24px 52px; }
.intro.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(320px, 1.18fr) minmax(240px, .82fr);
  align-items: center;
  gap: 36px;
  min-height: 398px;
  margin: 9px 0 27px;
  padding: 50px 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(ellipse at 10% 5%, rgba(68, 94, 153, .29), transparent 44%),
    linear-gradient(118deg, var(--navy-deep), var(--navy) 68%, #1a2a49);
  box-shadow: 0 22px 48px rgba(22, 35, 60, .15);
}
.intro.hero::after {
  position: absolute;
  z-index: -1;
  top: -110px;
  left: -135px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.018), 0 0 0 78px rgba(255,255,255,.014);
  content: "";
}
.hero-copy { max-width: 670px; }
.intro .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  padding: 8px 12px;
  border: 1px solid rgba(223, 237, 174, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #d5f581;
  font-size: 12px;
  letter-spacing: 0;
}
.intro .eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 243, 107, .12);
  content: "";
}
.intro h1 {
  max-width: 660px;
  margin: 5px 0 13px;
  color: #fff;
  font-size: clamp(34px, 3.8vw, 50px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.9px;
}
.intro p {
  max-width: 650px;
  margin: 0;
  color: #d0d8e8;
  font-size: 15px;
  line-height: 1.95;
}
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.hero-actions a { text-decoration: none; font-size: 13px; font-weight: 800; }
.hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 49px;
  padding: 0 18px;
  border: 1px solid var(--lime);
  border-radius: 14px;
  background: var(--lime);
  color: #19243a;
  box-shadow: 0 8px 20px rgba(200, 243, 107, .14);
  transition: transform .16s ease, box-shadow .16s ease;
}
.hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(200, 243, 107, .23); }
.hero-primary span { font-size: 18px; line-height: 1; }
.hero-secondary { color: #e5eaf3; }
.hero-secondary:hover { color: var(--lime); }
.hero-art {
  position: relative;
  display: grid;
  min-height: 275px;
  place-items: center;
  direction: ltr;
}
.hero-aura {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 160, 240, .27), rgba(142, 158, 218, .08) 48%, transparent 72%);
}
.hero-doc {
  position: relative;
  display: flex;
  width: 154px;
  height: 194px;
  flex-direction: column;
  gap: 14px;
  padding: 25px 20px;
  border: 7px solid rgba(255, 255, 255, .38);
  border-radius: 23px 29px 25px 31px;
  background: linear-gradient(160deg, #fff 0%, #f4f6fb 100%);
  box-shadow: 0 24px 42px rgba(2, 12, 31, .28);
  transform: rotate(-8deg);
}
.hero-doc::before {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 60px;
  height: 33px;
  border-radius: 14px 0 15px 0;
  background: #aeb5ff;
  content: "";
}
.hero-doc-line { height: 8px; border-radius: 9px; background: #e3e6f4; }
.hero-doc-line:nth-of-type(2) { width: 94%; margin-top: 17px; }
.hero-doc-line:nth-of-type(3) { width: 80%; }
.hero-doc-line:nth-of-type(4) { width: 89%; }
.hero-doc-line:nth-of-type(5) { width: 60%; }
.hero-pdf {
  position: absolute;
  right: -18px;
  bottom: 19px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--lime);
  color: #213047;
  font-size: 12px;
  font-weight: 900;
  transform: rotate(8deg);
}
.hero-ready {
  position: absolute;
  bottom: 26px;
  left: calc(50% - 115px);
  padding: 10px 14px;
  border: 1px solid rgba(231, 236, 246, .75);
  border-radius: 13px;
  background: #fff;
  color: #27334a;
  box-shadow: 0 10px 24px rgba(3, 12, 30, .2);
  font-size: 11px;
  font-weight: 800;
  transform: translateX(-45px);
}
.hero-ready::before { margin-inline-end: 7px; color: #64a77b; content: "✓"; }
.hero-spark { position: absolute; color: var(--lime); font-size: 21px; }
.hero-spark.one { top: 34px; left: calc(50% - 108px); }
.hero-spark.two { right: calc(50% - 112px); bottom: 38px; font-size: 15px; }

.tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 13px;
}
.tool-heading h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.35px; }
.tool-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.tool-count { color: #728098; font-size: 11px; font-weight: 700; white-space: nowrap; }
.gridora-quick.tool-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 17px;
}
.quick-card {
  position: relative;
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 12px;
  padding: 15px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 17px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(22, 35, 60, .035);
  text-decoration: none;
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease;
}
.quick-card:hover {
  border-color: #d0d9b7;
  box-shadow: 0 12px 24px rgba(22, 35, 60, .08);
  transform: translateY(-3px);
}
.quick-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--lime-soft);
  color: #37452b;
  font-size: 20px;
  font-weight: 900;
}
.quick-card b { display: block; padding-inline-end: 12px; color: #202c43; font-size: 13px; font-weight: 850; }
.quick-card small { display: block; margin-top: 4px; color: #7b8597; font-size: 10px; line-height: 1.5; }
.tool-arrow { position: absolute; left: 12px; top: 12px; color: #a3acbb; font-size: 15px; }

.quick-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 0 0 20px;
}
.quick-step {
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 4px 10px;
  padding: 12px 13px;
  border: 1px solid #e7e9ed;
  border-radius: 15px;
  background: rgba(255, 255, 255, .8);
}
.quick-num {
  display: grid;
  width: 30px;
  height: 30px;
  grid-row: span 2;
  place-items: center;
  border: 1px solid #e1e5ea;
  border-radius: 50%;
  background: #fff;
  color: #55627a;
  font-size: 13px;
  font-weight: 900;
}
.quick-btn {
  min-height: 35px;
  border: 0;
  border-radius: 10px;
  background: transparent !important;
  color: var(--ink) !important;
  box-shadow: none;
  text-align: right;
  font-size: 12px;
  font-weight: 850;
}
.quick-step:first-child .quick-btn { color: #3d4b2c !important; background: var(--lime) !important; text-align: center; }
.quick-btn:hover:not(:disabled) { border-color: transparent; transform: none; }
.quick-btn:disabled { opacity: .48; }
.quick-step small { color: #7d8799; font-size: 10px; }

.privacy {
  align-items: flex-start;
  margin: 16px 0;
  padding: 13px 16px;
  border: 1px solid #dfe6e2;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(22, 35, 60, .025);
  color: #536e63;
  font-size: 12px;
  line-height: 1.8;
}
.privacy .lock { color: #698f69; }
.steps { gap: 9px; margin: 15px 0 18px; }
.step { color: #768195; }
.step .num { border-color: #e2e7eb; background: #fff; }
.step.active { color: #36442c; }
.step.active .num { border-color: var(--lime); background: var(--lime); color: #263348; }
.step-line { background: #e0e5e9; }

.mode-picker {
  margin: 0 0 17px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 35, 60, .035);
}
.mode-picker h2 { margin: 0; color: #1d2940; font-size: 16px; font-weight: 900; }
.mode-picker p { color: #778298; line-height: 1.7; }
.mode-option { border-color: #e4e7ec; border-radius: 13px; background: #fafbfc; }
.mode-option[aria-pressed="true"] { border-color: #b6d56f; background: #f4fae9; box-shadow: 0 0 0 2px rgba(200,243,107,.15); }
.mode-option[aria-pressed="true"] .mode-icon { background: var(--lime); color: #253149; }
.mode-current { color: #737f93; }
.workspace { gap: 16px; }
.card {
  border: 1px solid #e4e7ec;
  border-radius: 19px;
  box-shadow: var(--panel-shadow);
}
.card-head { padding: 17px 19px 13px; border-bottom-color: #eef0f3; }
.card-head h2 { color: #1f2b42; font-size: 15px; font-weight: 900; }
.card-head p { color: #788397; }
.card-body { padding: 17px 19px 19px; }
.upload-btn { border-color: #e4e8ec; border-radius: 12px; background: #fbfcfd; }
.upload-btn:hover { border-color: #c8d69c; background: #f8fbf1; }
.upload-btn .ico { color: #586548; }
.btn { border-color: #e2e6eb; border-radius: 10px; }
.btn:hover:not(:disabled) { border-color: #ced9b7; background: #f6f9ee; }
.btn.primary { border-color: var(--lime); background: var(--lime); color: #263149; }
.btn.primary:hover:not(:disabled) { border-color: #b5df4d; background: #bce958; }
.btn.soft { border-color: #e4ead9; background: #f3f8e9; color: #445438; }
.canvas-wrap { border-color: #e5e9ed; }
.review-table td.selected { outline-color: #92b743; background: #f5fae9; }
.review-table textarea:focus { background: #fbfdf6; }
.table-scroll { border-color: #e5e8ec; }
.footnote { border-top-color: #e1e5e9; color: #727d91; }
.install-cta { border-radius: 14px; }
#tools, #privacyNote, #sourceTitle, #modeTitle { scroll-margin-top: 18px; }

@media (max-width: 980px) {
  .intro.hero { grid-template-columns: minmax(250px, 1.14fr) minmax(210px, .86fr); gap: 18px; padding: 39px 35px; }
  .gridora-quick.tool-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  header { min-height: 62px; padding: 10px 15px; gap: 8px; }
  .header-actions { gap: 8px; }
  .top-nav { gap: 12px; }
  .top-nav a { font-size: 11px; }
  .top-nav .nav-cta { padding: 8px 10px; }
  .header-badge { display: none; }
  .brand small { display: none; }
  .logo { width: 37px; height: 37px; }
  .lang-toggle { min-width: 38px; height: 34px; }
  .wrap { padding: 7px 14px 42px; }
  .intro.hero { grid-template-columns: minmax(0, 1fr) minmax(95px, .48fr); gap: 5px; min-height: 320px; margin: 7px 0 21px; padding: 29px 21px; border-radius: 22px; }
  .intro h1 { font-size: clamp(28px, 7.1vw, 39px); line-height: 1.3; letter-spacing: -.5px; }
  .intro p { font-size: 12px; line-height: 1.8; }
  .intro .eyebrow { padding: 7px 9px; font-size: 10px; }
  .hero-actions { gap: 13px; margin-top: 18px; }
  .hero-actions a { font-size: 11px; }
  .hero-primary { min-height: 42px; padding: 0 12px; border-radius: 11px; }
  .hero-art { min-height: 200px; transform: scale(.78); }
  .hero-doc { width: 132px; height: 169px; }
  .hero-ready { bottom: 11px; left: 48%; font-size: 9px; }
  .hero-aura { width: 170px; height: 170px; }
  .tool-heading h2 { font-size: 21px; }
  .tool-heading p { font-size: 11px; }
  .tool-count { font-size: 9px; }
  .gridora-quick.tool-catalog { gap: 8px; }
  .quick-card { min-height: 83px; gap: 9px; padding: 11px 9px; border-radius: 14px; }
  .quick-icon { width: 37px; height: 37px; border-radius: 11px; font-size: 17px; }
  .quick-card b { padding-inline-end: 9px; font-size: 10px; }
  .quick-card small { font-size: 9px; }
  .tool-arrow { left: 8px; top: 7px; font-size: 12px; }
  .quick-flow { gap: 7px; }
  .quick-step { grid-template-columns: 26px 1fr; gap: 3px 7px; padding: 9px 7px; border-radius: 12px; }
  .quick-num { width: 25px; height: 25px; font-size: 11px; }
  .quick-btn { min-height: 33px; padding: 4px 2px; font-size: 10px; }
  .quick-step small { font-size: 8px; }
  .privacy { font-size: 11px; }
  .mode-picker { padding: 15px; }
  .card-head, .card-body { padding-inline: 14px; }
  .wa-float { right: 12px; bottom: 14px; }
}
@media (max-width: 390px) {
  .top-nav { gap: 8px; }
  .top-nav a { font-size: 10px; }
  .intro.hero { grid-template-columns: minmax(0, 1fr) 84px; padding-inline: 16px; }
  .hero-art { transform: scale(.62); transform-origin: center; }
  .hero-actions { gap: 9px; }
  .tool-count { display: none; }
  .quick-card b { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
