/* SAL7 app — light, editorial look: warm ivory, ink black, champagne accents. Tokens first. */
:root {
  color-scheme: light;
  --bg: #f7f4ee; --surface: #fffdf9; --surface2: #efeae1; --line: rgba(21, 19, 15, 0.08); --line2: rgba(21, 19, 15, 0.15);
  --ink: #15130f; --muted: #645e55; --dim: #958e83; --gold: #a9834a; --gold2: #7d5f2f; --ok: #2f8457; --bad: #b83a2a;
  --shadow: 0 1px 2px rgba(21,19,15,.04), 0 18px 40px -24px rgba(21,19,15,.18);
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif; --body: "Manrope", "Helvetica Neue", Arial, sans-serif; --ar: "Tajawal", sans-serif;
  --r: 16px; --gut: max(16px, env(safe-area-inset-left, 0px)); --gutR: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg) radial-gradient(1200px 600px at 85% -10%, rgba(214,186,137,.16), transparent 60%) no-repeat; color: var(--ink); font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
::selection { background: #e9dcc3; color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img, video { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gutR); }
.serif { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.kick { font: 600 11px/1 var(--body); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; margin: 0; line-height: 1.02; text-wrap: balance; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }

/* nav */
.top { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 17px; width: auto; display: block; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a.l { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.top nav a.l:hover { color: var(--ink); background: var(--surface); }
.credits { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line2); border-radius: 40px; font-weight: 600; font-size: 13px; text-decoration: none; }
.credits { background: var(--surface); }
.credits i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(169,131,74,.18); }

/* buttons & forms */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink);
  font: 600 14px/1 var(--body); padding: 14px 20px; border-radius: 12px; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); box-shadow: 0 14px 30px -16px rgba(21,19,15,.55); }
.btn.gold:hover { background: #2a2620; }
.btn.big { padding: 18px 28px; font-size: 15px; border-radius: 14px; }
.btn.sm { padding: 9px 13px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .c { font-weight: 700; opacity: .8; font-size: 12px; padding: 3px 8px; border-radius: 20px; background: rgba(21,19,15,.07); }
.btn.gold .c { background: rgba(247,244,238,.16); }
label.f { display: block; margin-bottom: 18px; }
label.f > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
label.f > small { display: block; color: var(--dim); font-size: 12px; margin-top: 6px; }
input, textarea, select { width: 100%; font: 15px/1.5 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 13px 14px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,19,15,.07); }
input[type=file] { padding: 11px; }
input[type=color] { padding: 4px; height: 48px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.err { color: var(--bad); min-height: 1.4em; margin: 10px 0 0; font-size: 14px; }
.okmsg { color: var(--ok); }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); gap: 4px; flex-wrap: wrap; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.seg span { display: block; padding: 9px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page { padding-block: 40px 90px; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-h h1 { font-size: clamp(36px, 5vw, 56px); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--r); }

/* dashboard */
.create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 36px; }
.ctile { position: relative; overflow: hidden; border-radius: 20px; min-height: 240px; padding: 26px; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid var(--line); background: var(--surface); isolation: isolate; transition: border-color .3s, transform .3s; }
.ctile { color: #fbf8f2; box-shadow: var(--shadow); }
.ctile:hover { border-color: var(--line2); transform: translateY(-3px); }
.ctile img, .ctile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s; }
.ctile:hover img, .ctile:hover video { transform: scale(1.04); }
.ctile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,12,10,.05) 25%, rgba(14,12,10,.78)); }
.ctile h2 { font-size: 40px; } .ctile p { margin: 6px 0 0; color: rgba(251,248,242,.78); } .ctile .kick { color: #e6cf9f; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.jcard { text-decoration: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); transition: border-color .2s, transform .2s; display: block; box-shadow: var(--shadow); }
.jcard:hover { border-color: var(--line2); }
.jcard .th { aspect-ratio: 4 / 3; background: var(--surface2) center / cover no-repeat; position: relative; }
.jcard .b { padding: 12px 14px 14px; }
.jcard .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; background: var(--surface2); color: var(--muted); }
.pill.done { color: var(--ok); } .pill.failed { color: var(--bad); } .pill.running, .pill.queued { color: var(--gold); }
.pill.running::before, .pill.queued::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .2; } }

/* job page */
.prog { height: 6px; border-radius: 6px; background: var(--surface2); overflow: hidden; margin: 18px 0 10px; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold2), var(--gold)); transition: width .8s ease; }
.result { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
.phone { aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; border: 6px solid #15130f; background: #000; box-shadow: 0 50px 90px -40px rgba(21,19,15,.55); }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.frames img { aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.script { list-style: none; padding: 0; margin: 0; } .script li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.script b { color: var(--gold); font-weight: 600; margin-inline-end: 8px; }
.sitebox { border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: #000; height: min(78vh, 760px); box-shadow: var(--shadow); }
.sitebox iframe { width: 100%; height: 100%; border: 0; display: block; }

/* landing */
.hero-l { position: relative; padding-block: clamp(50px, 9vw, 110px) 60px; overflow: hidden; }
.hero-l h1 { font-size: clamp(48px, 8.4vw, 116px); line-height: .95; max-width: 11ch; }
.hero-l .lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 34rem; margin: 24px 0 32px; }
.hero-l .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.phones { position: relative; height: clamp(440px, 46vw, 600px); }
.phones .phone { position: absolute; width: 48%; }
.phones .p1 { left: 4%; top: 6%; transform: rotate(-5deg); } .phones .p2 { right: 4%; top: 0; transform: rotate(4deg); z-index: 2; }
.glowbg { position: absolute; width: 70vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(214,186,137,.32), transparent 62%); right: -22vw; top: -26vw; pointer-events: none; }
.section { padding-block: clamp(60px, 9vw, 110px); border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(38px, 5.4vw, 72px); margin-bottom: 18px; }
.steps { counter-reset: s; } .steps .card { position: relative; padding-top: 56px; }
.steps .card::before { counter-increment: s; content: "0" counter(s); position: absolute; top: 20px; left: 22px; font-family: var(--display); font-style: italic; color: var(--gold); font-size: 22px; }
.steps h3 { font-size: 28px; margin-bottom: 8px; }
.sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.site-tile { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); text-decoration: none; isolation: isolate; color: #fbf8f2; box-shadow: var(--shadow); }
.site-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s; }
.site-tile:hover img { transform: scale(1.05); }
.site-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(14,12,10,.8)); }
.site-tile .kick { color: #e6cf9f; }
.site-tile .b { position: absolute; left: 20px; right: 20px; bottom: 18px; }
.site-tile h3 { font-size: 32px; }
.ar-demo { font-family: var(--ar); font-size: clamp(34px, 5vw, 64px); font-weight: 800; direction: rtl; color: var(--gold); line-height: 1.3; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.hot { border-color: var(--ink); box-shadow: 0 30px 60px -36px rgba(21,19,15,.35); }
.plan .price { font-family: var(--display); font-size: 56px; line-height: 1; }
.plan .price small { font: 500 14px var(--body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--gold); margin-inline-end: 8px; }
.plan .pp { margin-top: auto; min-height: 50px; }
.costs { width: 100%; border-collapse: collapse; } .costs td, .costs th { text-align: start; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; } .tbl th, .tbl td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; } .tblwrap { overflow-x: auto; }
.auth { max-width: 440px; margin: 0 auto; }
.foot { border-top: 1px solid var(--line); padding-block: 30px 40px; color: var(--dim); font-size: 13px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.items-ed { display: grid; gap: 8px; } .items-ed .it { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, .8fr); gap: 8px; }
.styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.styles label { cursor: pointer; } .styles input { position: absolute; opacity: 0; width: auto; pointer-events: none; }
.styles .sw { display: block; border: 1px solid var(--line2); border-radius: 14px; padding: 14px; height: 100%; transition: border-color .2s; }
.styles .sw b { display: block; font-size: 15px; } .styles .sw small { color: var(--muted); font-size: 12px; }
.styles .dots { display: flex; gap: 5px; margin-bottom: 10px; } .styles .dots i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line2); }
.styles input:checked + .sw { border-color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.styles input:focus-visible + .sw { outline: 2px solid var(--gold); }
.note { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 99; max-width: calc(100vw - 32px); }

@media (max-width: 860px) {
  .hero-grid, .result, .create, .g3, .g2, .plans, .sites { grid-template-columns: minmax(0, 1fr); }
  .phones { height: 440px; max-width: 420px; }
  .top nav a.l.hide-m { display: none; }
  .brand { flex-shrink: 0; } .brand img { height: 14px; }
  .top nav { gap: 2px; } .top nav a.l { padding: 8px 8px; font-size: 14px; } .top nav .btn.sm { padding: 9px 11px; font-size: 12.5px; }
  .credits { padding: 6px 10px; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .items-ed .it { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .items-ed .it input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .styles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Arabic / right-to-left */
.langsw { font-family: "Tajawal", var(--body); font-weight: 700; }
:root[lang="ar"] { --display: "Tajawal", "Manrope", sans-serif; --body: "Tajawal", "Manrope", sans-serif; }
[lang="ar"] body { font-size: 16px; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { font-weight: 800; letter-spacing: 0; line-height: 1.22; }
[lang="ar"] h1 em, [lang="ar"] h2 em, [lang="ar"] h3 em { font-style: normal; }
[lang="ar"] .hero-l h1 { font-size: clamp(40px, 6.4vw, 88px); line-height: 1.18; max-width: 13ch; }
[lang="ar"] .section h2 { font-size: clamp(32px, 4.6vw, 60px); }
[lang="ar"] .kick, [lang="ar"] .pill { letter-spacing: 0; text-transform: none; font-size: 13px; }
[lang="ar"] .serif, [lang="ar"] .plan .price { font-weight: 800; letter-spacing: 0; }
[lang="ar"] .steps .card::before { font-style: normal; }
[dir="rtl"] .phones .p1 { left: auto; right: 4%; transform: rotate(5deg); }
[dir="rtl"] .phones .p2 { right: auto; left: 4%; transform: rotate(-4deg); }
[dir="rtl"] .steps .card::before { left: auto; right: 22px; }
[dir="rtl"] .glowbg { right: auto; left: -22vw; }
[dir="rtl"] body { background-position: 15% 0; }

/* brand memory */
.brandpick { padding-bottom: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.saved[hidden] { display: none; }
.saved { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.saved img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--surface2); border: 1px solid var(--line); }
.linkbtn { appearance: none; border: 0; background: none; color: var(--ink); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* editing */
.eh { font-size: 26px; margin: 26px 0 12px; }
.eshot { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; padding: 16px; }
.eshot > img { width: 92px; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; flex: none; background: var(--line); }
.ebody { flex: 1; min-width: 0; } .ebody .f { margin-bottom: 12px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; } .chk input { width: auto; margin: 0; }
.esave { position: sticky; bottom: 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 30%); margin-top: 18px; }
.esave .btn { width: 100%; }
.egroup { margin-bottom: 12px; padding: 0 20px; } .egroup summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.egroup summary::after { content: "+"; color: var(--muted); font-weight: 500; } .egroup[open] summary::after { content: "–"; } .egroup[open] { padding-bottom: 8px; }
.egroup summary::-webkit-details-marker { display: none; }
.ltag { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; margin-inline-start: 6px; }
.eimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.eimg { display: flex; flex-direction: column; gap: 6px; font-size: 13px; cursor: pointer; } .eimg img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: var(--line); }
.eimg input { font-size: 12px; padding: 6px; }
@media (max-width: 520px) { .eshot > img { width: 74px; } .eshot { padding: 14px; gap: 12px; } }
[data-note][hidden] { display: none !important; }
.foot-row { flex-basis: 100%; } .foot-row + .foot-row { margin-top: -4px; } .foot a { color: var(--ink); }
