/* Urdu Science Board, Lahore — styles.
   Built with logical properties (inline-start / inline-end) so one stylesheet
   serves both right-to-left Urdu and left-to-right English. */

:root {
  --green-900: #0a3d24;
  --green-700: #12683b;
  --leaf:      #3e9b55;
  --mist:      #eaf1ea;
  --paper:     #f8faf7;
  --white:     #ffffff;
  --clay:      #b4553e;   /* taken from the building's terracotta walls */
  --clay-dark: #8f3f2b;
  --ink:       #16241b;
  --muted:     #4d5f53;
  --line:      #d3dfd5;
  --maxw:      1120px;
  --radius:    10px;
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='30'%3E%3Cpath d='M7 30V15a15 15 0 0 1 30 0v15' fill='none' stroke='%23b4553e' stroke-width='2.5'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---- Typography ---------------------------------------------------------- */
.lang-ur {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif;
  line-height: 2.25;
}
.lang-en {
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
}
.lang-en h1, .lang-en h2, .lang-en .brand strong, .lang-en .fact-num {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
}
h1, h2 { margin: 0 0 .5em; color: var(--green-900); font-weight: 700; }
.lang-ur h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.7; }
.lang-ur h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.9; }
.lang-en h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.01em; }
.lang-en h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15em; color: var(--muted); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 46rem; margin-inline: 0; }
.section { padding-block: 3.5rem; }
.section-alt { background: var(--mist); }
.section > .container > h2 { margin-block-end: .6em; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--green-900); color: var(--white); padding: .6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

/* ---- Header -------------------------------------------------------------- */
.site-header { background: var(--white); border-block-end: 1px solid var(--line); position: relative; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; }
.brand img { width: 84px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.4; }
.brand strong { font-size: 1.35rem; color: var(--green-900); }
.lang-ur .brand strong { line-height: 1.8; }
.brand small { color: var(--muted); font-size: .9rem; line-height: 1.4; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav li a {
  display: block; padding: .15rem .8rem; text-decoration: none; color: var(--ink);
  border-block-end: 3px solid transparent; font-weight: 600;
}
.lang-ur .site-nav li a { padding-block: .1rem; line-height: 2.1; }
.site-nav li a:hover { color: var(--green-700); }
.site-nav li a[aria-current="page"] { color: var(--green-700); border-block-end-color: var(--clay); }
.lang-toggle {
  text-decoration: none; font-weight: 600; color: var(--green-900);
  border: 2px solid var(--green-700); border-radius: 999px; padding: .1rem 1rem; line-height: 1.9; white-space: nowrap;
}
.lang-toggle:hover { background: var(--green-700); color: var(--white); }
.lang-toggle[lang="en"] { font-family: "Public Sans", system-ui, sans-serif; line-height: 1.7; padding-block: .25rem; }
.lang-toggle[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; }

.menu-btn { display: none; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { background: var(--green-900); color: var(--white); position: relative; padding-block: 3.5rem 0; }
.hero h1 { color: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding-block-end: 4.5rem; }
.hero-lead { font-size: 1.2rem; max-width: 34rem; color: #e4efe6; }
.hero-est { color: #bcd8c3; font-size: .98rem; margin-block-end: 1.5rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.arch-photo { margin: 0; position: relative; max-width: 22rem; justify-self: center; width: 100%; }
.arch-photo img {
  aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
  border-radius: 999px 999px 6px 6px; position: relative; z-index: 1;
  border: 4px solid var(--green-900);
}
.arch-photo::before {
  content: ""; position: absolute; inset: 0; transform: translate(14px, 14px);
  border: 3px solid var(--clay); border-radius: 999px 999px 6px 6px;
}
[dir="rtl"] .arch-photo::before { transform: translate(-14px, 14px); }

.arcade { height: 30px; background-repeat: repeat-x; background-image: var(--arch); background-position: center bottom; }
.arcade--hero { position: absolute; inset-inline: 0; bottom: 0; background-color: var(--paper); height: 30px; }
.arcade--hero { background-color: transparent; }
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 30px; background: var(--paper); z-index: 0; }
.arcade--hero { z-index: 1; }

/* ---- Buttons & links ----------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; border-radius: 999px;
  padding: .35rem 1.5rem; border: 2px solid transparent; line-height: 2; transition: background-color .15s, color .15s;
}
.lang-en .btn { line-height: 1.6; padding-block: .6rem; }
.btn-light   { background: var(--white); color: var(--green-900); }
.btn-light:hover { background: var(--mist); }
.btn-outline { border-color: #9cc4a6; color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-solid   { background: var(--green-700); color: var(--white); cursor: pointer; font: inherit; font-weight: 600; }
.btn-solid:hover { background: var(--green-900); }
.text-link { color: var(--clay-dark); font-weight: 600; text-underline-offset: .25em; }
.text-link::after { content: " ‹"; }
[dir="ltr"] .text-link::after { content: " ›"; }

/* ---- Facts --------------------------------------------------------------- */
.facts { background: var(--paper); padding-block: 2.2rem 1rem; }
.facts--flat { padding-block: 0 1rem; }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.fact { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.fact-num { display: block; font-size: 2.4rem; font-weight: 700; color: var(--green-700); line-height: 1.3; }
.lang-ur .fact-num { font-family: "Public Sans", system-ui, sans-serif; line-height: 1.4; }
.fact-txt { display: block; color: var(--muted); font-size: .98rem; line-height: 1.8; }

/* ---- Objectives ---------------------------------------------------------- */
.objectives { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.objectives li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; gap: 1rem; align-items: flex-start; }
.objectives p { margin: 0; }
.obj-mark {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 999px 999px 4px 4px;
  background: var(--green-700); color: var(--white); display: grid; place-items: center; font-weight: 700; line-height: 1;
}
.lang-ur .obj-mark { padding-block-start: .5rem; }
.objectives--stack { grid-template-columns: 1fr; }
.objectives--stack li { padding: 1.5rem; }

/* ---- Lists ---------------------------------------------------------------- */
.check-list { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.check-list li { position: relative; padding-inline-start: 2rem; padding-block: .55rem; border-block-end: 1px solid var(--line); }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: .2rem; top: 1.3em; width: .7rem; height: .7rem;
  border-radius: 999px 999px 0 0; background: var(--leaf);
}
.lang-ur .check-list li::before { top: 1.9em; }

.people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.people li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: .1rem 1rem; line-height: 2.1; }
.lang-en .people li { padding-block: .3rem; line-height: 1.5; }

/* ---- About --------------------------------------------------------------- */
.page-head { background: var(--mist); padding-block: 2.5rem 1.8rem; border-block-end: 1px solid var(--line); }
.page-head h1 { margin-block-end: .2em; }
.page-head .lead { margin: 0; }
.about-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 3rem; align-items: start; }
.prose p { max-width: 42rem; }
.side-photo { margin: 0; }
.side-photo img { border-radius: 999px 999px 8px 8px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.dg-card { margin-block-start: 1.5rem; border-inline-start: 4px solid var(--clay); background: var(--white); padding: .9rem 1.3rem; display: flex; flex-direction: column; max-width: 28rem; }
.dg-label { color: var(--muted); font-size: .95rem; }
.dg-card strong { color: var(--green-900); font-size: 1.15rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 1.8rem; border-inline-start: 2px solid var(--leaf); padding-block-end: 1.1rem; }
.timeline li:last-child { border-inline-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -.55rem; top: .9rem; width: 1rem; height: 1rem;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--clay);
}
.section-alt .timeline li::before { background: var(--mist); }
.tl-when { font-weight: 700; color: var(--green-700); display: block; }
.timeline p { margin: 0; }

/* ---- Officers table ------------------------------------------------------ */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.officers { width: 100%; border-collapse: collapse; min-width: 40rem; }
.officers th, .officers td { padding: .35rem 1rem; text-align: start; border-block-end: 1px solid var(--line); line-height: 2; }
.lang-en .officers th, .lang-en .officers td { padding-block: .7rem; line-height: 1.5; }
.officers thead th { background: var(--green-900); color: var(--white); font-weight: 600; }
.officers tbody th { font-weight: 600; color: var(--green-900); }
.officers tbody tr:nth-child(even) { background: #f3f7f3; }
.officers tbody tr:last-child > * { border-block-end: 0; }

/* ---- Contact ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; }
.contact-info h2 { font-size: 1.2rem; margin-block-end: .1em; }
.contact-form form { display: grid; gap: .3rem; }
.contact-form label { font-weight: 600; margin-block-start: .6rem; }
.contact-form input, .contact-form textarea {
  font: inherit; line-height: 1.8; padding: .5rem .8rem; border: 1.5px solid #9fb3a4; border-radius: 8px; background: var(--white); color: var(--ink); width: 100%;
}
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; margin-block-start: 1rem; }
.hp { position: absolute; inset-inline-start: -9999px; }
.notice { padding: .6rem 1rem; border-radius: 8px; margin-block-end: 1rem; }
.notice-ok  { background: #e1f2e5; border: 1px solid var(--leaf); }
.notice-bad { background: #fbe9e4; border: 1px solid var(--clay); }

/* ---- Call-to-action band ------------------------------------------------- */
.cta-band { background: var(--green-700); color: var(--white); padding-block: 2.5rem; }
.cta-band h2 { color: var(--white); margin-block-end: .1em; }
.cta-band p { margin: 0; color: #e4efe6; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--green-900); color: #dbe9de; margin-block-start: 0; }
.arcade--footer { background-color: var(--green-700); height: 30px; transform: scaleY(-1); opacity: .9; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; padding-block: 2.5rem 1.5rem; }
.footer-brand { display: flex; gap: 1.2rem; align-items: flex-start; }
.footer-brand p { margin: .3rem 0 0; font-size: .98rem; max-width: 28rem; }
.footer-brand strong { color: var(--white); font-size: 1.1rem; }
.logo-chip { background: var(--white); border-radius: var(--radius); padding: .4rem; flex: none; }
.logo-chip img { width: 84px; }
.footer-h { font-size: 1.05rem; color: var(--white); margin: 0 0 .4em; }
.lang-en .footer-h { font-family: "Public Sans", system-ui, sans-serif; }
.site-footer ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.site-footer li a { text-decoration: none; padding-block: .1rem; display: inline-block; }
.site-footer li a:hover { text-decoration: underline; }
.footer-base { border-block-start: 1px solid rgba(255,255,255,.18); padding-block: 1rem; font-size: .92rem; color: #a9c5b0; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid, .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .objectives { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .arch-photo { max-width: 16rem; }
  .side-photo { max-width: 16rem; }

  .js .menu-btn {
    display: inline-block; font: inherit; font-weight: 600; background: none; color: var(--green-900);
    border: 2px solid var(--green-700); border-radius: 999px; padding: .1rem 1.1rem; cursor: pointer; line-height: 2;
  }
  .js .site-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; padding-block: .5rem 1rem; }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .lang-toggle { align-self: flex-start; }
}

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