/* ============================================================
   Dr. Linda Tarabay — site styles
   Theme is driven entirely by the CSS variables in :root below.
   To re-theme once Dr. Tarabay confirms colors/tone, edit ONLY
   the variables in :root. Nothing else needs to change.
   ============================================================ */

:root {
  /* --- Palette (neutral, credible, non-generic) --- */
  --ink:        #1c2b2d;   /* near-black slate, body text          */
  --deep:       #14403f;   /* deep slate-teal, primary brand       */
  --deep-soft:  #2c5a58;   /* hover / secondary                    */
  --paper:      #faf8f3;   /* warm off-white background            */
  --paper-2:    #f1ede3;   /* alt section background               */
  --line:       #ddd6c8;   /* hairline borders                     */
  --muted:      #5c6361;   /* secondary text                       */
  --accent:     #b4843c;   /* restrained warm brass accent         */
  --accent-soft:#e8d9bd;

  /* --- Type --- */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Scale / rhythm --- */
  --maxw: 1080px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--deep); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 .5em; }
h3 { font-size: 1.3rem; margin: 0 0 .4em; }

p { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Skip link & focus ---------- */
.skip {
  position: absolute; left: -999px; top: 0; background: var(--deep); color: #fff;
  padding: .6rem 1rem; z-index: 200;
}
.skip:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,243,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: .85rem var(--gap);
}
.brand {
  font-family: var(--serif); font-size: 1.18rem; font-weight: 600;
  color: var(--deep); text-decoration: none; letter-spacing: -.01em;
  display: flex; align-items: baseline; gap: .5rem;
}
.brand .mark {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-family: var(--sans); font-weight: 600;
}
.nav-links { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .96rem; text-decoration: none; color: var(--ink);
  padding: .2rem 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--deep); border-bottom-color: var(--accent);
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--deep); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: .5rem var(--gap) 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .7rem 1.3rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1.5px solid var(--deep);
  transition: background .18s, color .18s, transform .05s;
}
.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { background: var(--deep-soft); color: #fff; }
.btn-ghost { background: transparent; color: var(--deep); }
.btn-ghost:hover { background: var(--deep); color: #fff; }
.btn-wa { background: #25613b; border-color: #25613b; color: #fff; }
.btn-wa:hover { background: #1d4d2f; color: #fff; }
.btn:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 1rem;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.portrait {
  aspect-ratio: 4/5; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); display: grid; place-items: center;
  color: var(--muted); font-size: .9rem; text-align: center; padding: 1rem;
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head .eyebrow { margin-bottom: .6rem; }

/* ---------- Credential strip ---------- */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  border-top: 1px solid var(--line); padding-top: 1.8rem; margin-top: 2.2rem;
}
.fact .n { font-family: var(--serif); font-size: 2.1rem; color: var(--deep); line-height: 1; }
.fact .l { font-size: .92rem; color: var(--muted); margin-top: .35rem; }
@media (max-width: 620px) { .facts { grid-template-columns: 1fr; gap: 1.1rem; } }

/* ---------- Book cards ---------- */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 720px) { .book-grid { grid-template-columns: 1fr; } }
.book-card {
  display: grid; grid-template-columns: 130px 1fr; gap: 1.3rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem;
}
.book-cover {
  aspect-ratio: 2/3; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 2px; display: grid; place-items: center; text-align: center;
  font-size: .72rem; color: var(--muted); padding: .5rem; overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { margin-bottom: .3rem; }
.book-meta { font-size: .85rem; color: var(--muted); margin-bottom: .7rem; }
.book-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.book-actions .btn { padding: .5rem 1rem; font-size: .9rem; }
@media (max-width: 460px) { .book-card { grid-template-columns: 1fr; } .book-cover { max-width: 150px; } }

/* ---------- Timeline (About) ---------- */
.timeline { border-left: 2px solid var(--line); margin: 1.5rem 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .45rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  border: 2px solid var(--paper);
}
.timeline .role { font-weight: 600; color: var(--ink); }
.timeline .org { color: var(--muted); }
.timeline .yr { font-size: .82rem; letter-spacing: .04em; color: var(--accent); font-weight: 600; }

/* ---------- Prose blocks ---------- */
.prose { max-width: 66ch; }
.prose p { margin-bottom: 1.2em; }

/* ---------- Two-col ---------- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.callout {
  background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; font-size: .96rem;
}
.callout h3 { font-size: 1.05rem; margin-bottom: .4rem; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
input, textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
input:focus, textarea:focus { border-color: var(--deep); outline: 2px solid var(--accent-soft); }
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }

/* ---------- Disclaimer ---------- */
.disclaimer {
  font-size: .85rem; color: var(--muted); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem;
}

/* ---------- Footer ---------- */
.site-foot {
  background: var(--deep); color: #d9e3e1; margin-top: 3rem;
  padding: 2.5rem 0 2rem; font-size: .92rem;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--accent-soft); }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; color: #fff; }
.foot-links { display: flex; gap: 1.3rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.8rem; padding-top: 1.2rem; color: #aebebb; font-size: .82rem; }

/* ---------- Utilities ---------- */
.tag {
  display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; background: var(--accent-soft);
  padding: .2rem .55rem; border-radius: 100px; margin-bottom: .8rem;
}
.placeholder-note {
  font-size: .78rem; color: #9a5b00; background: #fff6e6; border: 1px dashed #d9a441;
  padding: .15rem .5rem; border-radius: 3px; display: inline-block; margin-top: .4rem;
}

/* ============================================================
   Bilingual Books page additions
   ============================================================ */

/* Arabic font when RTL */
:root { --arabic: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] body { font-family: var(--arabic); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--arabic); letter-spacing: 0; }
[dir="rtl"] .lede, [dir="rtl"] .eyebrow { letter-spacing: 0; }

/* Language toggle button in nav */
.lang-btn {
  font-family: var(--sans); font-size: .9rem; font-weight: 600;
  color: var(--deep); background: transparent;
  border: 1.5px solid var(--line); border-radius: 100px;
  padding: .3rem .9rem; cursor: pointer; line-height: 1;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
[dir="rtl"] .lang-btn { font-family: var(--arabic); }

/* RTL nav mirroring */
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
@media (max-width: 720px){ [dir="rtl"] .nav-links { flex-direction: column; } }

/* Book detail layout */
.book-detail {
  display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start; margin-top: 1rem;
}
.book-detail-cover img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(20,64,63,.5);
}
.cover-note { font-size:.8rem; color:var(--muted); margin-top:.6rem; text-align:center; }
.book-detail-body h2 { margin-top: .3rem; }
.book-detail-body .tag { margin-bottom: 1rem; }
.epigraph {
  font-family: var(--serif); font-style: italic; color: var(--deep);
  font-size: 1.15rem; line-height: 1.5; margin: 1.5rem 0 0;
  padding-left: 1rem; border-left: 3px solid var(--accent);
}
[dir="rtl"] .epigraph {
  font-family: var(--arabic); font-style: normal;
  padding-left: 0; padding-right: 1rem;
  border-left: 0; border-right: 3px solid var(--accent);
}

/* Book facts grid */
.book-facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 2rem;
  margin: 1.8rem 0; padding: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.book-facts > div { display: flex; flex-direction: column; }
.book-facts .k { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.book-facts .v { font-weight: 600; color: var(--ink); }
[dir="rtl"] .book-facts .k { letter-spacing: 0; }

/* Order box */
.order-box {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem;
}
.order-box h3 { margin-bottom: .5rem; }
.order-box .price { font-size: 1.05rem; margin: .8rem 0 1rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.order-alt { font-size: .9rem; color: var(--muted); margin: 1rem 0 0; }

.book2-teaser {
  text-align: center; color: var(--muted); font-style: italic;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
[dir="rtl"] .book2-teaser { font-style: normal; }

@media (max-width: 680px){
  .book-detail { grid-template-columns: 1fr; }
  .book-detail-cover { max-width: 260px; margin: 0 auto; }
  .book-facts { grid-template-columns: 1fr; }
}

/* ---------- Contact form: honeypot + status ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: .9rem; font-size: .95rem; min-height: 1.2em; }
.form-status.is-ok { color: #1d6b3a; font-weight: 600; }
.form-status.is-error { color: #a12a1e; font-weight: 600; }
.cf-turnstile { margin-top: 1rem; }
button[disabled] { opacity: .6; cursor: default; }

/* ---------- RTL: About floated headshot flips side ---------- */
[dir="rtl"] .prose img[style*="float:right"] {
  float: left !important;
  margin: 0 1.5rem 1rem 0 !important;
}
