/* =========================================================
   تيرازيل — الهوية البصرية
   ========================================================= */
:root {
  --stone: #ECE8E1;
  --silk: #F6F3EE;
  --ink: #17161B;
  --ink-2: #2A2730;
  --text-2: #3D3942;
  --muted: #5A5560;
  --line: #CFC8BD;
  --line-strong: #B9B2A8;
  --thread: #A88552;
  --accent: #6E1A28;
  --accent-hover: #561421;
  --on-dark: #E9E3D8;
  --on-dark-2: #B5AEA4;
  --ph: #DCD6CD;

  --display: 'Reem Kufi', 'Noto Kufi Arabic', 'Geeza Pro', 'Segoe UI', sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Segoe UI', 'Geeza Pro', Tahoma, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(64px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.8;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
strong { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--silk); padding: 10px 16px; z-index: 20; }
.skip:focus { top: 12px; color: var(--silk); }

/* ---------- Layout ---------- */
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(40px, 6vw, 80px) var(--section); }
.section--silk { background: var(--silk); }
.section--bordered { border-block: 1px solid var(--line); }
.section--line { border-top: 1px solid var(--line); }
.section--ink { background: var(--ink); color: var(--on-dark); }
.section--ink .h-display, .section--ink h3 { color: var(--silk); }
.stack-lg { display: flex; flex-direction: column; gap: 48px; }
.stack-xl { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 96px); }

.split { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.split--end { align-items: flex-end; }
.split__head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.split__body { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.split--end .split__body { flex: 1 1 360px; }
.split__body--wide { flex: 2 1 520px; }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }

/* ---------- Type ---------- */
.h-display { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.22; text-wrap: balance; }
.h-display--md { font-size: clamp(30px, 3.6vw, 46px); }
.h-section { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3vw, 38px); line-height: 1.3; text-wrap: balance; }
.lead { font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; color: var(--text-2); max-width: 32em; text-wrap: pretty; }
.lead--on-dark { color: var(--on-dark-2); }
.prose-lg { font-size: clamp(18px, 1.6vw, 21px); font-weight: 300; color: var(--ink-2); }
.prose-lg strong { color: var(--ink); }
.label { font-size: 14px; color: var(--muted); }
.label--on-dark { color: var(--on-dark-2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.thread { display: block; width: 64px; height: 1px; background: var(--thread); margin-top: 12px; }
.kicker { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.kicker__line { width: 40px; height: 1px; background: var(--thread); }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border: 1px solid transparent; border-radius: 0;
  font: inherit; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn--lg { min-height: 54px; padding: 15px 32px; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--silk); }
.btn--light { background: var(--silk); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--stone); position: relative; z-index: 10; padding-top: env(safe-area-inset-top, 0px); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__ar { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.2; }
.brand__ar--lg { font-size: 40px; }
.brand__en { font-family: var(--display); font-size: 12px; letter-spacing: .32em; color: var(--muted); }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 28px; }
.site-nav__link { text-decoration: none; font-size: 15px; padding: 10px 2px; border-bottom: 1px solid transparent; }
.site-nav__link:hover, .site-nav__link.is-active { border-bottom-color: var(--thread); color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
    background: transparent; border: 1px solid var(--ink); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s ease;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; inset-inline-start: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .site-nav__link:hover, .site-nav__link.is-active { border-bottom-color: var(--line); color: var(--accent); }
  .site-nav .btn { margin-top: 16px; min-height: 52px; }
  .no-js .site-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 104px); }
.hero__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__title { font-family: var(--display); font-weight: 500; font-size: clamp(44px, 6.4vw, 88px); line-height: 1.15; text-wrap: balance; }
.hero__lead { font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; color: var(--text-2); max-width: 30em; text-wrap: pretty; }
.hero .btn-row { padding-top: 8px; }
.hero__media { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; gap: 20px; }
.hero__vertical { writing-mode: vertical-rl; font-family: var(--display); font-size: 12px; letter-spacing: .5em; color: #8A8390; align-self: flex-end; }
.framed { position: relative; width: 100%; max-width: 480px; padding: 0 0 22px 22px; }
.framed__line { position: absolute; inset: 22px 22px 0 0; border: 1px solid var(--thread); }
.framed__img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 560px) { .hero__vertical { display: none; } }

/* ---------- Placeholder pattern ---------- */
.ph { background-color: var(--ph); background-image: repeating-linear-gradient(135deg, rgba(23,22,27,.05) 0 1px, transparent 1px 14px); }
.ph--fill { width: 100%; height: 100%; }

/* ---------- Tiraz band ---------- */
.band { background: var(--ink); border-block: 1px solid var(--thread); padding-block: 4px; overflow: hidden; }
.band__inner { border-block: 1px solid rgba(168,133,82,.45); padding-block: 14px; overflow: hidden; }
.band__track { display: flex; width: max-content; animation: tzband 38s linear infinite; }
.band__group { display: flex; align-items: center; gap: 36px; padding-inline-end: 36px; font-family: var(--display); font-size: 20px; color: var(--on-dark); white-space: nowrap; }
.band__latin { letter-spacing: .3em; font-size: 15px; }
.band__dot { width: 7px; height: 7px; background: var(--thread); transform: rotate(45deg); flex: none; }
@keyframes tzband { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- Pillars & designer ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px 48px; }
.pillar { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--ink); padding-top: 22px; }
.pillar h3 { font-family: var(--display); font-size: 30px; font-weight: 500; }
.pillar p { color: var(--text-2); font-weight: 300; text-wrap: pretty; }

.designer { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: center; border: 1px solid var(--thread); padding: clamp(24px, 4vw, 56px); }
.designer--plain { border: 0; padding: 0; align-items: flex-start; }
.designer__img { flex: 0 1 320px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; min-width: 0; }
.designer__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.signature { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.signature__name { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1.3; }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 40px 32px; }
.step { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--thread); padding-top: 24px; }
.step__n { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--thread); }
.step h3 { font-size: 21px; font-weight: 500; }
.step p { color: var(--on-dark-2); font-weight: 300; font-size: 16px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px 28px; }
.card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); }
.card__media { overflow: hidden; aspect-ratio: 3 / 4; background: var(--ph); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.card__meta--stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.card__title { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.4; }
.card:hover .card__title { color: var(--accent); }

/* ---------- Posts ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; }
.post { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--ink); padding-top: 18px; }
.post__title { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.45; }
.post__ex { color: var(--text-2); font-weight: 300; font-size: 16px; }
.post:hover .post__title { color: var(--accent); }

.article-list { display: flex; flex-direction: column; }
.article-row { display: flex; flex-wrap: wrap; gap: 24px 40px; padding-block: 32px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: center; }
.article-row:first-child { padding-top: 0; }
.article-row__media { flex: 0 1 320px; min-width: 0; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.article-row__media img { width: 100%; height: 100%; object-fit: cover; }
.article-row__text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.article-row__title { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; line-height: 1.4; }
.article-row p { color: var(--text-2); font-weight: 300; max-width: 36em; }
.article-row:hover .article-row__title { color: var(--accent); }

.pager { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 40px; }
.pager a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); text-decoration: none; }
.pager a.is-active { background: var(--ink); color: var(--silk); border-color: var(--ink); }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(48px, 7vw, 88px) 0; display: flex; flex-direction: column; gap: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.crumbs a + a::before { content: '/'; margin-inline-end: 10px; color: var(--line-strong); }
.crumbs a:hover { color: var(--accent); }

.prose { color: var(--ink-2); font-weight: 300; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); color: var(--ink); line-height: 1.35; margin-top: 1.8em; }
.prose h3 { font-weight: 600; font-size: 19px; color: var(--ink); margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.2em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--thread); }
.prose a { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose--article { font-size: 18px; line-height: 1.95; }
.prose--faq h3 { border-top: 1px solid var(--line); padding-top: 1.2em; }
.prose--faq h3 + p { margin-top: .5em; }

.article-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 32px; }
.article-cover { margin: 0 auto 48px; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-cta { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--thread); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.article-cta p { font-family: var(--display); font-size: 22px; }
.more-list { display: flex; flex-direction: column; }
.more-list a { display: flex; justify-content: space-between; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); text-decoration: none; flex-wrap: wrap; }

/* ---------- Design detail ---------- */
.design { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.design__gallery { flex: 1 1 420px; min-width: 0; }
.design__info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 900px) { .design__info { position: sticky; top: 24px; } }
.gallery__main { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gallery__thumb { width: 76px; padding: 0; border: 1px solid transparent; background: none; cursor: pointer; opacity: .7; }
.gallery__thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery__thumb.is-active, .gallery__thumb:hover { opacity: 1; border-color: var(--ink); }
.design__cta { border-top: 1px solid var(--thread); padding-top: 24px; margin-top: 8px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.design__cta p { color: var(--text-2); font-weight: 300; }

/* ---------- Empty ---------- */
.empty { border: 1px solid var(--thread); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.empty p { color: var(--text-2); font-weight: 300; max-width: 34em; }
.empty--page { border: 0; padding-inline: var(--gutter); }

/* ---------- Order form ---------- */
.order-form { display: flex; flex-direction: column; gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 500; padding: 0; }
.field legend { margin-bottom: 12px; }
.field input:not([type="radio"]), .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 2px;
  background: var(--silk); color: var(--ink); font: inherit; font-size: 16px;
}
.section--silk .field input:not([type="radio"]), .section--silk .field textarea { background: #fff; }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[type="tel"] { text-align: right; }
.field input[type="file"] { padding: 10px 12px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 400 !important; transition: background-color .15s ease; user-select: none; }
.chip:hover { border-color: var(--ink); }
.chip__input:checked + .chip { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip__input:focus-visible + .chip { outline: 2px solid var(--accent); outline-offset: 2px; }

.order-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 16px 20px; border: 1px solid; font-size: 15px; }
.alert ul { margin: 6px 0 0; padding-inline-start: 1.2em; }
.alert--error { border-color: #9B2C2C; background: #FBEDED; color: #6B1C1C; }

.sent { border: 1px solid var(--thread); padding: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sent p { color: var(--text-2); font-weight: 300; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 56px 32px; }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 8px; max-width: 280px; }
.site-footer__brand p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.site-footer__col { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.site-footer__col a { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.site-footer__h { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: 13px; color: var(--muted); }
