/* ============================================================
   Photo book — shared look. Warm paper, black ink, the photos
   do the talking.
   ============================================================ */
:root {
  /* the studio's own palette — Ahlam Raffii Photography: white, editorial, quiet */
  --bg: #FFFFFF;
  --paper: #FFFFFF;
  --soft: #F4F1EB;          /* the warm band */
  --sand: #EDE8E0;          /* the deeper band */
  --line: rgba(38, 37, 31, .14);
  --ink: #26251F;
  --muted: #6C6960;
  --faint: #A7A298;
  --accent: #3D372F;        /* buttons: her brown */
  --gold: #B6A480;          /* accents, section numbers */
  --gold-deep: #8F7E5C;
  --heart: #B9463F;
  --ok: #5E7A5A;
  --warn: #9A6A1F;
  --danger: #A8322B;
  --display: 'Cormorant Garamond', 'Amiri', Georgia, serif;
  --ui: 'Jost', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --shadow: 0 10px 40px rgba(38, 37, 31, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html[lang="ar"] { --ui: 'IBM Plex Sans Arabic', 'Jost', system-ui, sans-serif; --display: 'Amiri', 'Cormorant Garamond', Georgia, serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 16px/1.7 var(--ui); -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
}
b, strong { font-weight: 500; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: .005em; color: var(--ink); }
/* spaced capitals, as the website sets its headings — never for Arabic, where spacing breaks the joined letters */
.caps { text-transform: uppercase; letter-spacing: .14em; }
html[lang="ar"] .caps { text-transform: none; letter-spacing: 0; }
/* a section's head: a short gold line, a number, the title in spaced capitals */
.sec-head { text-align: center; margin: 0 0 22px; }
.sec-head::before { content: ''; display: block; width: 46px; height: 1px; background: var(--gold); margin: 0 auto 16px; }
.sec-head .num { display: block; font-family: var(--display); color: var(--gold-deep); font-size: 15px; letter-spacing: .2em; margin-bottom: 4px; }
.sec-head h2 { font-size: clamp(26px, 6vw, 34px); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; }
html[lang="ar"] .sec-head h2 { text-transform: none; letter-spacing: 0; font-size: clamp(28px, 7vw, 38px); }
.band { background: var(--soft); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), opacity .15s, background .15s;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 11.5px; }
html[lang="ar"] .btn { letter-spacing: 0; text-transform: none; font-size: 15px; font-weight: 400; }
html[lang="ar"] .btn.small { font-size: 14px; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--danger); border-color: currentColor; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon-btn svg, .btn svg { width: 22px; height: 22px; flex: none; }
.btn.small svg { width: 18px; height: 18px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- forms ---- */
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field > span { font-size: 13px; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-size: 16px; outline: none; transition: border-color .15s;
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }

/* ---- segmented control ---- */
.seg { display: inline-flex; padding: 3px; background: var(--soft); border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---- sheets: full-screen panels that slide up over the page ---- */
.sheet {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .35s var(--ease); visibility: hidden;
}
.sheet.open { transform: none; visibility: visible; }
.sheet-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 60px;
  border-bottom: 1px solid var(--line); background: var(--bg); flex: none;
}
.sheet-head h2 { font-size: 22px; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot {
  flex: none; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg);
  display: flex; gap: 10px; align-items: center;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px; }

/* small dialogs */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20, 18, 16, .45); display: grid; place-items: end center; opacity: 0; transition: opacity .2s; }
.modal-back.open { opacity: 1; }
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow: auto; background: var(--bg); border-radius: 18px 18px 0 0;
  padding: 22px 18px calc(18px + var(--safe-b)); transform: translateY(24px); transition: transform .25s var(--ease);
}
.modal-back.open .modal { transform: none; }
.modal h3 { font-size: 24px; margin-bottom: 12px; }
@media (min-width: 700px) { .modal-back { place-items: center; } .modal { border-radius: 18px; } }

/* ---- toast ---- */
#pb-toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 100; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
#pb-toast.show { opacity: 1; transform: translate(-50%, 0); }
#pb-toast.bad { background: var(--danger); }

/* ---- loading ---- */
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; text-align: center; }

/* ---- a tidy list of money lines ---- */
.sum { width: 100%; border-collapse: collapse; font-size: 15px; }
.sum td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sum td:last-child { text-align: end; white-space: nowrap; padding-inline-start: 12px; }
.sum tr.total td { border-bottom: 0; font-weight: 600; font-size: 17px; padding-top: 12px; }
.seg svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---- the studio's name and foot, set exactly as on ahlamraffii.com ---- */
.wordmark { font-family: 'Cormorant Garamond', 'Times New Roman', serif; font-weight: 300; font-size: 19px; line-height: 1.2;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.site-foot { background: #F4F1EB; border-top: 1px solid rgba(38,37,31,.08); color: #6C6960; text-align: center;
  font: 300 15px/1.85 'Jost', 'Helvetica Neue', Arial, sans-serif; padding: clamp(38px, 4.4vw, 66px) 18px 0; }
.site-foot__mark { font-family: 'Cormorant Garamond', 'Times New Roman', serif; font-weight: 300; font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .18em; text-transform: uppercase; color: #26251F; margin: 0; line-height: 1.2; }
.site-foot__note { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; margin: 14px 0 0; color: #6C6960; line-height: 1.6; }
.site-foot__links { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 22px; font-size: 13px; }
.site-foot__links a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot__links a:hover { color: #26251F; border-color: rgba(38,37,31,.14); }
.site-foot__base { border-top: 1px solid rgba(38,37,31,.08); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 16px 0; margin: clamp(28px, 3.2vw, 44px) -18px 0; color: #6C6960; line-height: 1.6; }
html[lang="ar"] .site-foot__note { letter-spacing: 0; text-transform: none; font-size: 13px; font-family: 'IBM Plex Sans Arabic', 'Jost', sans-serif; }
