/* ============================================================
   Research Ethics Committee — rec-pck.org
   Design system: ATU navy + gold, official / institutional
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Brand — sampled from the ATU seal */
  --navy-900: #0e1531;
  --navy-800: #16204a;
  --navy-700: #1d2c63;   /* primary navy */
  --navy-600: #283a7d;
  --navy-500: #3a4d96;
  --gold-600: #b8860f;
  --gold-500: #d4a017;   /* primary gold */
  --gold-400: #e2b948;
  --gold-200: #f0dca0;

  /* Neutrals — warm paper */
  --paper:    #f6f4ed;
  --paper-2:  #efece1;
  --surface:  #ffffff;
  --ink-900:  #161821;
  --ink-700:  #353844;
  --ink-500:  #5d616f;
  --ink-300:  #9aa0ad;
  --line:     #e0ddd1;
  --line-2:   #cfcbbb;

  /* Semantic */
  --ok:    #2f7d4f;
  --warn:  #b6791b;
  --danger:#9d2f2f;
  --info:  #2b5a9e;

  /* Type */
  --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', system-ui, sans-serif;
  --arabic:'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(14,21,49,.06), 0 1px 3px rgba(14,21,49,.08);
  --shadow-md: 0 4px 14px rgba(14,21,49,.08), 0 2px 4px rgba(14,21,49,.05);
  --shadow-lg: 0 18px 48px rgba(14,21,49,.16);
}

/* Arabic / RTL switches the whole UI font */
html[lang="ar"] body { font-family: var(--arabic); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .display, html[lang="ar"] .eyebrow { font-family: var(--arabic); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-900);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--navy-800); margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--gold-600); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--gold-600);
}
html[lang="ar"] .eyebrow { letter-spacing: .04em; }

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }
.muted { color: var(--ink-500); }
.center { text-align: center; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

section { padding: 84px 0; }
section.tight { padding: 56px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: 13px 24px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: all .16s ease; text-decoration: none; white-space: nowrap;
}
.btn-gold { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-600); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-900); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-navy { background: var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-600); color:#fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy-700); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--navy-600); color: var(--navy-700); background: rgba(29,44,99,.04); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { border-color: var(--gold-400); color: var(--gold-200); }
.btn-sm { padding: 8px 15px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy-800);
  border-bottom: 3px solid var(--gold-500);
}
.topbar {
  background: var(--navy-900);
  color: var(--ink-300);
  font-size: .78rem;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 18px; }
.topbar a { color: var(--gold-200); }
.topbar .topbar-left { display:flex; gap: 18px; align-items:center; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-family: var(--sans); font-size: .76rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.lang-toggle:hover { border-color: var(--gold-400); color: var(--gold-200); }

.nav { display: flex; align-items: center; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 50%; background:#fff; box-shadow: 0 0 0 2px var(--gold-500); flex:none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .b1 { color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.06rem; white-space: nowrap; }
.brand-text .b2 { color: var(--gold-200); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.nav-links a {
  color: #e8eaf2; font-size: .92rem; font-weight: 500; padding: 9px 13px; border-radius: var(--radius);
  transition: all .15s;
}
.nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-links a.active { color: var(--gold-400); }
.nav-cta { margin-inline-start: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color:#fff; border-radius: var(--radius); padding: 8px 10px; cursor: pointer; }

@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; top: 116px; inset-inline: 0; flex-direction: column; background: var(--navy-800); padding: 14px 32px 22px; gap: 2px; border-bottom: 3px solid var(--gold-500); align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-cta { margin: 8px 0 0; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--ink-300); padding: 64px 0 30px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer a { color: var(--ink-300); display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-200); }
.footer-brand { display:flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; background:#fff; flex:none; box-shadow: 0 0 0 2px var(--gold-500); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-300); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2,1fr); }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.cols-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* Badges & pills */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; }
.badge-human { background: #e7eefb; color: var(--info); }
.badge-animal { background: #eaf3ec; color: var(--ok); }
.badge-both { background: var(--paper-2); color: var(--ink-700); border: 1px solid var(--line-2); }
.badge-gold { background: var(--gold-200); color: var(--gold-600); }

.status { display:inline-flex; align-items:center; gap:7px; font-size:.8rem; font-weight:600; padding: 4px 11px; border-radius: 999px; }
.status::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; }
.status-approved { background:#eaf3ec; color: var(--ok); }
.status-review   { background:#fdf3e0; color: var(--warn); }
.status-revision { background:#fbeeee; color: var(--danger); }
.status-draft    { background: var(--paper-2); color: var(--ink-500); }
.status-submitted{ background:#e7eefb; color: var(--info); }

/* Section heading helper */
.sec-head { max-width: 720px; margin-bottom: 44px; }
.sec-head.center { margin-inline: auto; }
.rule-gold { width: 56px; height: 3px; background: var(--gold-500); margin: 18px 0 0; border: 0; }
.center .rule-gold { margin-inline: auto; }

/* Decorative seal watermark */
.seal-wm { position: absolute; opacity: .04; pointer-events: none; }

/* utility */
.flex { display:flex; }
.between { justify-content: space-between; }
.items-center { align-items:center; }
.gap-sm { gap: 10px; }
.gap { gap: 20px; }
.wrap-flex { flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.hide { display: none !important; }

/* Forms */
label.field { display:block; margin-bottom: 18px; }
label.field > span { display:block; font-size:.85rem; font-weight:600; color: var(--ink-700); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; font-family: var(--sans); font-size: .96rem; color: var(--ink-900);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(40,58,125,.12); }
.textarea { min-height: 110px; resize: vertical; }
.help { font-size: .8rem; color: var(--ink-500); margin-top: 5px; }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(157,47,47,.1); }

/* Tables */
table.data { width:100%; border-collapse: collapse; background: var(--surface); font-size: .92rem; }
table.data thead th { background: var(--navy-700); color:#fff; text-align: start; font-family: var(--sans); font-weight:600; font-size:.82rem; letter-spacing:.03em; text-transform: uppercase; padding: 13px 16px; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:nth-child(even) { background: #faf9f4; }
table.data tbody tr:hover { background: #f3f0e6; }

/* ---------- Inner page banner ---------- */
.page-hero { position: relative; background: linear-gradient(155deg, var(--navy-800), var(--navy-900)); color:#fff; overflow:hidden; }
.page-hero::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 88% 20%, rgba(212,160,23,.10), transparent 45%); }
.page-hero .wrap { position:relative; z-index:2; padding: 64px 32px 60px; }
.page-hero .eyebrow { color: var(--gold-400); }
.page-hero h1 { color:#fff; margin: 14px 0 0; }
.page-hero p { color:#cfd4e6; max-width: 60ch; margin: 16px 0 0; font-size: 1.08rem; }
.page-hero-seal { position:absolute; inset-inline-end:-90px; top:50%; transform: translateY(-50%); width: 320px; height:320px; border-radius:50%; opacity:.10; filter: saturate(.2) brightness(2); z-index:1; }
.breadcrumb { font-size:.82rem; color: var(--gold-200); display:flex; gap:8px; align-items:center; }
.breadcrumb a { color: var(--gold-200); }
.breadcrumb a:hover { color:#fff; }

/* ---------- Prose ---------- */
.prose p { color: var(--ink-700); }
.prose h2 { margin-top: 8px; }
.prose h3 { color: var(--navy-700); margin-top: 28px; }
.callout { background: var(--surface); border:1px solid var(--line); border-inline-start: 4px solid var(--gold-500); border-radius: var(--radius); padding: 20px 24px; margin: 22px 0; }
.callout h4 { font-family: var(--sans); color: var(--navy-800); margin:0 0 6px; font-size: 1rem; }
.callout p { margin:0; font-size:.92rem; color: var(--ink-700); }

/* ---------- Timeline (workflow) ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before { content:""; position:absolute; inset-inline-start: 23px; top: 8px; bottom: 8px; width:2px; background: var(--line-2); }
.tl-item { position: relative; padding-inline-start: 66px; padding-bottom: 30px; }
.tl-item .dot { position:absolute; inset-inline-start: 8px; top: 0; width: 32px; height:32px; border-radius:50%; background: var(--navy-700); color:#fff; display:grid; place-items:center; font-family: var(--serif); font-weight:600; font-size:.9rem; z-index:1; }
.tl-item .role { font-size:.74rem; text-transform:uppercase; letter-spacing:.1em; color: var(--gold-600); font-weight:600; }
.tl-item h3 { font-family: var(--sans); font-size:1.1rem; margin: 2px 0 6px; color: var(--navy-800); }
.tl-item p { margin:0; color: var(--ink-700); font-size:.95rem; }

@media print { .site-header, .site-footer, .nav-toggle { display:none; } }
