/* Handraw website styles. Colours, fonts and sizes come from tokens.css.
   Logical properties (inline-start/end) are used everywhere so Arabic (RTL) mirrors by itself. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}
img, video, svg { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { line-height: var(--lh-head); font-weight: 700; }
h1 { font-size: var(--fs-h1); margin: 0 0 16px; }
h2 { font-size: var(--fs-h2); margin: 0 0 12px; }
h3 { font-size: var(--fs-h3); margin: 0 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--violet-strong); color: #fff; }
ul.cards, ul.stats, ul.chips, ul.idea-cloud, ul.checklist, ol.steps, ul.contact-links,
.main-nav ul, .lang-switch ul, .site-footer ul { list-style: none; margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 8px; top: -100px; z-index: 100;
  background: var(--amber); color: var(--night-950); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--amber); color: var(--night-950); box-shadow: 0 6px 24px var(--amber-glow); }
.btn-primary:hover { background: var(--amber-hover); color: var(--night-950); }
.btn-outline { border-color: var(--violet); color: var(--violet); background: transparent; }
.btn-outline:hover { background: var(--violet-soft); color: var(--text); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 24px; }
.actions.center { justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 12, 23, 0.88); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.header-bar {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'brand actions' 'nav nav';
  align-items: center; column-gap: 12px; padding-block: 10px 0;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand-name {
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.01em;
  text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 7px;
}
.header-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.main-nav { grid-area: nav; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav ul { display: flex; gap: 20px; white-space: nowrap; padding-block: 8px 10px; }
.main-nav a { color: var(--text-muted); text-decoration: none; font-weight: 700; font-size: 0.9375rem; }
.main-nav a:hover, .main-nav a[aria-current='page'] { color: var(--text); }
.main-nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.lang-switch ul { display: flex; gap: 2px; }
.lang-switch a {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding-inline: 6px;
  border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-weight: 700; font-size: 0.875rem;
}
.lang-switch a:hover { color: var(--text); background: var(--violet-soft); }
.lang-switch a[aria-current='true'] { color: var(--text); background: var(--violet-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.header-actions .btn { white-space: nowrap; }
@media (max-width: 400px) {
  .brand img { width: 30px; height: 30px; }
  .lang-switch a { min-width: 30px; padding-inline: 4px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding-inline: 10px; }
}
@media (max-width: 349px) { .brand-name { display: none; } }
@media (min-width: 900px) {
  .header-bar { grid-template-columns: auto 1fr auto; grid-template-areas: 'brand nav actions'; padding-block: 12px; column-gap: 28px; }
  .main-nav { margin: 0; padding: 0; overflow: visible; }
  .main-nav ul { padding: 0; justify-content: center; gap: 26px; }
}

/* ---------- night scenes (hero, page heads, final call) ---------- */
.night {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    url('../img/stars.svg') center top / 420px repeat,
    linear-gradient(180deg, var(--night-950) 0%, var(--night-900) 50%, var(--horizon) 100%);
}
.treeline {
  position: absolute; inset-inline: 0; bottom: -1px; z-index: -1; height: clamp(56px, 11vw, 130px);
  background: url('../img/treeline.svg') center bottom / auto 100% repeat-x; pointer-events: none;
}
.moon {
  position: absolute; z-index: -1; top: clamp(24px, 6vw, 64px); inset-inline-end: 7%;
  width: clamp(44px, 7vw, 86px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffbea 0 30%, var(--moon) 55%, #d8cb9e 100%);
  box-shadow: 0 0 40px rgba(244, 236, 208, 0.35), 0 0 120px rgba(244, 236, 208, 0.15);
}
.moon::before, .moon::after { content: ''; position: absolute; border-radius: 50%; background: rgba(170, 152, 104, 0.35); }
.moon::before { width: 22%; height: 22%; top: 28%; left: 54%; }
.moon::after { width: 14%; height: 14%; top: 60%; left: 30%; }

.hero { padding-block: clamp(32px, 6vw, 72px) clamp(96px, 14vw, 170px); }
@media (max-width: 639px) {
  /* On phones the moon sits above the text instead of behind it. */
  .hero { padding-top: 76px; }
  .moon { top: 16px; width: 44px; }
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { color: var(--amber); font-weight: 700; font-size: 0.9375rem; margin-bottom: 10px; }
.lead { color: var(--text-muted); font-size: var(--fs-lead); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .footer-badges span {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-muted); font-size: var(--fs-small);
}
.chips li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.hero-board { margin: 0; position: relative; }
.hero-board::before {
  content: ''; position: absolute; inset: 20% -10% -25%; z-index: -1;
  background: radial-gradient(ellipse at 50% 70%, var(--amber-glow), transparent 65%);
}
.board {
  position: relative; padding: clamp(6px, 1.2vw, 12px); border-radius: 14px;
  background: linear-gradient(160deg, #e3e5ec, #aeb3c2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.board video { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--board); }
.board::after {
  content: ''; position: absolute; inset-inline: 18%; bottom: -12px; height: 12px;
  border-radius: 0 0 8px 8px; background: linear-gradient(#a4a9b8, #7d8293);
}
.hero-board figcaption { margin-top: 26px; text-align: center; color: var(--text-faint); font-size: var(--fs-small); }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1.15fr; gap: 56px; }
}

.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(84px, 12vw, 150px); }
.page-hero .updated { color: var(--text-faint); }
.cta-band { padding-block: var(--space-section) calc(var(--space-section) + 20px); }
.cta-band .campfire { margin: 0 auto 12px; width: 120px; }
.cta-band p { color: var(--text-muted); font-size: var(--fs-lead); }

/* ---------- sections and cards ---------- */
.section { padding-block: var(--space-section); }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lead); margin: 0; }

.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
}
.card h3 { margin-top: 14px; }
.card p { color: var(--text-muted); margin: 0; }
.icon { width: 24px; height: 24px; flex: none; }
.card .icon, .contact-card .icon {
  width: 48px; height: 48px; padding: 11px; border-radius: 14px;
  color: var(--violet); background: var(--violet-soft);
}
.cards-row .card { display: flex; gap: 16px; align-items: flex-start; }
.cards-row .card h3 { margin-top: 2px; }
@media (min-width: 640px) { .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 32px; text-align: center; }
.stats li { padding: 16px 6px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), transparent); }
.stats strong { display: block; color: var(--amber); font-size: clamp(1.2rem, 0.9rem + 2vw, 2.2rem); line-height: 1.3; }
.stats span { color: var(--text-muted); font-size: var(--fs-small); }

/* ---------- pricing and steps ---------- */
.pricing-split { display: grid; gap: 32px; align-items: start; }
.pricing-grid { display: grid; gap: 20px; max-width: 900px; align-items: stretch; }
@media (min-width: 800px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .pricing-split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.price-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 28px;
}
.price-card.featured { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 20px 60px rgba(106, 88, 238, 0.25); }
.price-plan { color: var(--violet); font-weight: 700; margin-bottom: 4px; }
.price { margin-bottom: 4px; }
.price-amount { font-size: clamp(2.1rem, 1.6rem + 2vw, 2.8rem); font-weight: 700; line-height: 1.2; }
.price-per, .price-month { color: var(--text-muted); }
.checklist { margin: 18px 0 20px; flex: 1; }
.checklist li { position: relative; padding-inline-start: 30px; margin-block: 8px; }
.checklist li::before {
  content: ''; position: absolute; inset-inline-start: 4px; top: 0.55em;
  width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg);
}
.price-note { color: var(--text-faint); font-size: var(--fs-small); }
.how-title { font-size: 1.3rem; margin-bottom: 16px; }

.steps { display: grid; gap: 14px; }
.step {
  position: relative; padding: 20px; padding-inline-start: 74px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.step-num {
  position: absolute; inset-inline-start: 20px; top: 20px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--amber); color: var(--night-950); font-weight: 700;
  box-shadow: 0 0 18px var(--amber-glow);
}
.step h3 { margin: 4px 0; }
.step p { margin: 0; color: var(--text-muted); }
@media (min-width: 800px) { .section > .container > .steps { grid-template-columns: repeat(3, 1fr); } }
.section > .container > h2.center { margin-bottom: 28px; }

/* ---------- ideas, FAQ ---------- */
.idea-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0 32px; }
.idea-cloud li { padding: 6px 16px; border: 1.5px dashed var(--line-strong); border-radius: 999px; background: var(--surface); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 18px; cursor: pointer; font-weight: 700; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; color: var(--violet); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq-a p { color: var(--text-muted); margin: 0 0 18px; }
.more-link { font-weight: 700; }

/* ---------- forms and the order page ---------- */
.order-grid { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .order-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .order-summary { position: sticky; top: 96px; }
}
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { color: var(--text-faint); font-size: var(--fs-small); margin: -2px 0 8px; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--night-600); border-radius: var(--radius-sm);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
[aria-invalid='true'] { border-color: var(--danger); }
select {
  appearance: none; padding-inline-end: 42px;
  background: var(--input-bg) url('../img/chevron.svg') no-repeat right 14px center / 14px;
}
[dir='rtl'] select { background-position: left 14px center; }
input[type='tel'] { text-align: left; }
[dir='rtl'] input[type='tel'] { text-align: right; }
.field-error { color: var(--danger); font-size: var(--fs-small); font-weight: 700; margin: 6px 0 0; }
.error-summary, .notice {
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; background: var(--surface);
}
.error-summary, .notice-error { border-color: var(--danger); background: var(--danger-soft); }
.error-summary h2 { font-size: 1.05rem; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-inline-start: 20px; }
.error-summary a { color: var(--text); }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.order-summary {
  background: var(--surface); border: 1px solid var(--violet); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 20px 60px rgba(106, 88, 238, 0.18);
}
.order-summary h2 { font-size: 1.3rem; }
.order-summary dl { margin: 0 0 16px; }
.order-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.order-summary dt { color: var(--text-muted); }
.order-summary dd { margin: 0; font-weight: 700; text-align: end; }
.order-summary .total dt { color: var(--text); font-weight: 700; }
.order-summary .total dd { color: var(--amber); font-size: 1.3rem; }
.cash-note { color: var(--ok); font-weight: 700; font-size: var(--fs-small); }
.small { color: var(--text-faint); font-size: var(--fs-small); margin: 12px 0 0; }

/* ---------- contact, thanks, legal ---------- */
.contact-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.contact-card h2 { font-size: 1.35rem; margin-top: 12px; }
.contact-value { font-size: 1.2rem; font-weight: 700; }
.card p.contact-value { color: var(--text); }
.contact-notes { margin-top: 32px; text-align: center; color: var(--text-muted); }
.placeholder { display: inline-block; color: var(--amber); border: 1px dashed var(--amber); border-radius: var(--radius-sm); padding: 6px 12px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.order-ref { display: inline-block; margin-top: 12px; padding: 14px 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(23, 29, 58, 0.8); }
.order-ref p { margin: 4px 0; }
#ref-value { color: var(--amber); font-size: 1.35rem; letter-spacing: 0.06em; }
.icon-big { width: 64px; height: 64px; color: var(--ok); margin: 0 auto 8px; display: block; }
.steps-vertical { margin-bottom: 8px; }
.cta-card { margin-block: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.card.cta-card p { color: var(--text); }
.review-banner {
  border: 1px dashed var(--amber); color: var(--amber); background: rgba(255, 181, 71, 0.08);
  border-radius: var(--radius); padding: 12px 16px; font-weight: 700;
}
.prose h2 { font-size: 1.3rem; margin-top: 36px; }
.prose h3 { font-size: 1.05rem; margin-top: 20px; }
.prose p, .prose li { color: var(--text-muted); }
.prose li { margin-block: 6px; }
mark { background: rgba(255, 181, 71, 0.18); color: var(--amber); padding: 0 4px; border-radius: 4px; }

/* ---------- footer ---------- */
.site-footer .treeline {
  position: relative; z-index: 0; height: 80px;
  background: url('../img/treeline.svg') center bottom / auto 100% repeat-x, linear-gradient(180deg, var(--bg), var(--horizon));
}
.footer-inner { background: var(--forest); padding-block: 40px 8px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--text-muted); margin-top: 14px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer h2 { font-size: 1rem; color: var(--text-faint); margin-bottom: 10px; }
.site-footer li { margin-block: 8px; }
.site-footer nav a, .footer-langs a { color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover, .footer-langs a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center;
  margin-top: 32px; padding-block: 18px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: var(--fs-small);
}
.footer-bottom p { margin: 0; }
.footer-langs { display: flex; gap: 16px; }
.footer-langs a[aria-current='true'] { color: var(--text); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
