/* Wedian Al-Rabie Solar Park — site styles
   Palette and type follow the Shams Al-Sham identity (Lora + Poppins; SE-blue palette). */

@font-face { font-family: "Lora"; src: url("../fonts/Lora-Variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --deep:   #0A3A85;   /* palm, headings, buttons        */
  --bright: #2E8BD6;   /* jasmine, links, panel glass    */
  --sun:    #F2B134;   /* sun, key figures               */
  --gold:   #A47A1E;   /* subtitle gold, small accents   */
  --night:  #06285E;   /* hero + footer                  */
  --ink:    #0B2F5E;   /* body text                      */
  --ink-2:  #3E5478;   /* secondary text                 */
  --line:   #CFDCEC;   /* rules                          */
  --tint:   #EEF3F9;   /* alternating section background */
  --paper:  #FFFFFF;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--deep); margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--night); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand img { height: 3.2rem; width: auto; }
@media (max-width: 760px) { .brand img { height: 2.7rem; } }
.nav { display: flex; gap: clamp(.75rem, 2vw, 1.6rem); align-items: center; }
.nav a { color: var(--deep); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--sun); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .7rem; font: inherit; color: var(--deep); cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
}

/* ---------- hero ---------- */
.hero { background: var(--night); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 7vw, 6rem); }
.hero h1 { color: #fff; max-width: 12ch; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.55; max-width: 40ch; color: #DCE7F5; }
.hero .meta { color: var(--sun); font-weight: 500; margin: 1.25rem 0 0; font-size: .95rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
/* Hero photo: a 4:3 frame with the photo filling it. The "tight" class on the <figure>
   zooms into the bottom-centre of the photo (tighter crop); remove it for a photo
   that is already cropped the way you want. */
.hero-photo { margin: 0; }
.hero-photo .frame { position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.35); background: var(--deep); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo.tight img { transform: scale(1.17); transform-origin: 50% 100%; }
.hero-photo figcaption { color: #B9CBE6; font-size: .85rem; line-height: 1.4; }
.hero-photo figcaption::before { content: ""; display: block; height: 3px; margin: .9rem 1.25rem .6rem; background: var(--sun); border-radius: 2px; opacity: .9; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-photo { margin-top: .5rem; }
}
.btn { display: inline-block; font-weight: 500; text-decoration: none; padding: .8rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent; font-size: 1rem; line-height: 1.2; cursor: pointer; font-family: inherit; }
.btn-sun { background: var(--sun); color: var(--night); border-color: var(--sun); }
.btn-sun:hover { background: #F7C25A; border-color: #F7C25A; color: var(--night); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-deep { background: var(--deep); color: #fff; border-color: var(--deep); }
.btn-deep:hover { background: var(--night); border-color: var(--night); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .meta, .hero .actions { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero .lead { animation-delay: .12s; } .hero .meta { animation-delay: .2s; } .hero .actions { animation-delay: .28s; }
  .hero-photo { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: 4.5rem; }
.section-tint { background: var(--tint); }
.section-night { background: var(--night); color: #E3ECF8; }
.section-night h2, .section-night h3 { color: #fff; }
.section-night a { color: #9CC9F2; }
.section-night a:hover { color: #fff; }
.section > .wrap > h2, .section-head h2 { margin-bottom: .5em; }
.section-head { max-width: var(--measure); margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head .intro { font-size: 1.15rem; color: var(--ink-2); }
.section-night .section-head .intro { color: #C4D4EA; }
.rule { width: 3.5rem; height: 3px; background: var(--sun); border: 0; margin: 0 0 1.25rem; border-radius: 2px; }

/* The park: text + figures */
.park { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2rem; margin: 0; padding: 0; list-style: none; }
.figures li { border-top: 2px solid var(--line); padding-top: .9rem; }
.figures .num { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1; color: var(--deep); display: block; }
.figures .num small { font-size: .5em; font-weight: 500; font-family: var(--sans); color: var(--gold); margin-left: .25rem; }
.figures .what { display: block; margin-top: .45rem; font-size: .95rem; color: var(--ink-2); line-height: 1.45; }
.units { font-size: .9rem; color: var(--ink-2); border-left: 3px solid var(--sun); padding-left: .9rem; margin-top: 1.75rem; }
@media (max-width: 900px) { .park { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .figures { grid-template-columns: 1fr; gap: 1.25rem; } }

/* The plants: proportional bars */
.plants { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.plant { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 2.5vw, 1.75rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem 2.5rem; align-items: start; }
.plant h3 { margin: 0 0 .35rem; }
.plant .spec { color: var(--ink-2); font-size: .95rem; margin: 0 0 .75rem; }
.plant p { font-size: 1rem; }
.bars { display: grid; gap: .8rem; align-self: center; }
.bar { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; align-items: center; font-size: .9rem; }
.bar .lbl { color: var(--ink-2); }
.bar .track { height: 1.5rem; position: relative; background: transparent; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--w, 100%) * .7); border-radius: 3px; }
.bar .val { position: absolute; left: calc(var(--w, 100%) * .7 + .6rem); top: 0; bottom: 0; display: flex; align-items: center; font-weight: 500; font-size: .85rem; white-space: nowrap; color: var(--deep); }
.bar-solar .fill { background: var(--bright); }
.bar-store .fill { background: var(--sun); }
.bar .none { color: var(--ink-2); font-size: .85rem; padding-left: .55rem; display: flex; align-items: center; height: 100%; border-left: 2px dotted var(--line); }
.shared { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.25rem; align-items: start; margin-top: 1.75rem; padding: 1.25rem clamp(1.1rem, 2.5vw, 1.75rem); border-left: 4px solid var(--deep); background: var(--paper); }
.shared svg { width: 3rem; height: 3rem; flex: none; }
.shared p { max-width: none; font-size: 1rem; }
.why { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.why h3 { margin-bottom: .4rem; }
@media (max-width: 760px) { .plant, .why { grid-template-columns: 1fr; } .bar { grid-template-columns: 6rem minmax(0, 1fr); } }

/* Partners */
.partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
.partners li { border-top: 2px solid var(--line); padding-top: 1rem; }
.partners li.sponsor { border-top-color: var(--sun); }
.partners .role { font-size: .9rem; color: var(--gold); font-weight: 500; display: block; margin-bottom: .2rem; }
.partners h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.partners p { font-size: 1rem; color: var(--ink-2); }
.owner-note { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; max-width: var(--measure); }
.group-title { font-size: 1.1rem; color: var(--ink-2); font-family: var(--sans); font-weight: 500; margin: 2.5rem 0 1rem; letter-spacing: .01em; }
.partners-advisors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.partners-advisors h3 { font-size: 1.15rem; }
@media (max-width: 860px) { .partners-advisors { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .partners { grid-template-columns: 1fr; } }

/* Community & environment */
.pillars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.pillar h3 { color: #fff; font-size: 1.45rem; }
.pillar p { color: #D7E3F3; }
.pillar .big { font-family: var(--serif); font-weight: 600; font-size: 2.4rem; color: var(--sun); line-height: 1; margin: .25rem 0 .6rem; }
.pillar .big small { font-family: var(--sans); font-weight: 500; font-size: 1rem; color: #D7E3F3; margin-left: .4rem; }
.pillar ul { padding-left: 1.1rem; margin: .5rem 0 0; color: #D7E3F3; }
.pillar li { margin-bottom: .35rem; }
.pillar li::marker { color: var(--sun); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* Milestones */
.milestones { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: .55rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 2.4rem; padding-bottom: 1.9rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); }
.timeline li.done::before { background: var(--deep); border-color: var(--deep); }
.timeline li.next::before { background: var(--sun); border-color: var(--sun); box-shadow: 0 0 0 5px rgba(242,177,52,.25); }
.timeline .when { font-weight: 500; color: var(--gold); font-size: .95rem; display: block; }
.timeline li.next .when { color: var(--deep); }
.timeline h3 { font-size: 1.25rem; margin: .1rem 0 .35rem; }
.timeline p { font-size: 1rem; color: var(--ink-2); }
.photo { margin: 0; }
.photo img { border-radius: var(--radius); width: 100%; }
.photo figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .6rem; line-height: 1.45; }
.photo + .photo { margin-top: 1.5rem; }
@media (max-width: 900px) { .milestones { grid-template-columns: 1fr; } .photo-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; } .photo + .photo { margin-top: 0; } }
@media (max-width: 560px) { .photo-col { grid-template-columns: 1fr; } .photo + .photo { margin-top: 1.25rem; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); }
.contact-details .email { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; word-break: break-all; }
.offices { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.offices li { border-top: 1px solid var(--line); padding-top: .8rem; font-size: .95rem; }
.offices .kind { color: var(--gold); font-weight: 500; display: block; font-size: .85rem; }
.offices .who { font-weight: 500; display: block; }
.offices .where { color: var(--ink-2); }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input, .form textarea { font: inherit; padding: .7rem .85rem; border: 1px solid #B9C9DE; border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form textarea:focus { border-color: var(--bright); outline: 3px solid rgba(46,139,214,.25); outline-offset: 0; }
.form textarea { min-height: 9rem; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .fine { font-size: .85rem; color: var(--ink-2); max-width: none; }
.notice { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .95rem; border: 1px solid; }
.notice-ok { background: #EAF6EE; border-color: #9CD3AE; color: #184D2B; }
.notice-err { background: #FDEEEE; border-color: #F0B4B4; color: #7A1F1F; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } .form .row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--night); color: #C4D4EA; padding-block: 3rem 2rem; font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem 4rem; align-items: start; }
.site-footer img { height: 2.4rem; width: auto; margin-bottom: 1rem; }
.site-footer p { max-width: 52ch; }
.site-footer nav { display: grid; gap: .4rem; }
.site-footer nav a { color: #DCE7F5; text-decoration: none; }
.site-footer nav a:hover { color: var(--sun); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem; margin-top: .5rem; color: #8FA6C6; font-size: .85rem; }
.site-footer details { margin-top: .5rem; }
.site-footer summary { cursor: pointer; color: #DCE7F5; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- sub-pages (News, Media) ---------- */
.nav a.is-active { border-bottom-color: var(--sun); }
.page-head { background: var(--night); color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: .4em; }
.page-head .intro { color: #DCE7F5; font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 56ch; }
.section-note { color: var(--ink-2); font-size: .95rem; }
.section > .wrap > h2 + .section-note { margin-top: -.25rem; }

/* News list */
.news-item { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .5rem 2.5rem; padding: clamp(1.5rem, 3vw, 2.25rem) 0; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.news-item:first-of-type { border-top: 0; padding-top: 0; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; align-self: start; gap: .5rem .75rem; color: var(--gold); font-weight: 500; font-size: .95rem; padding-top: .35rem; }
.tag { display: inline-block; background: var(--sun); color: var(--night); font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; letter-spacing: .01em; }
.news-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .4em; }
.news-body .summary { font-size: 1.1rem; color: var(--ink); font-weight: 500; }
.news-body p { max-width: 68ch; }
.news-body .photo { margin-top: 1.25rem; max-width: 42rem; }
@media (max-width: 760px) { .news-item { grid-template-columns: 1fr; gap: .35rem; } }

/* Latest news strip on the home page */
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.news-head h2 { margin-bottom: 0; }
.news-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.news-strip li { border-top: 2px solid var(--line); padding-top: 1rem; }
.news-strip li.is-upcoming { border-top-color: var(--sun); }
.news-strip h3 { font-size: 1.2rem; margin: .4rem 0 .4rem; }
.news-strip h3 a { color: var(--deep); text-decoration: none; }
.news-strip h3 a:hover { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
.news-strip p { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 860px) { .news-strip { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Media page */
.gallery { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.gallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery p { font-size: .9rem; color: var(--ink-2); margin-top: .6rem; }
.downloads { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
.downloads li { border-top: 2px solid var(--line); padding-top: 1rem; }
.downloads h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.downloads p { font-size: .95rem; color: var(--ink-2); }
.press { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .9rem; }
.press li { display: grid; grid-template-columns: 9rem 11rem minmax(0, 1fr); gap: .25rem 1.25rem; align-items: baseline; border-top: 1px solid var(--line); padding-top: .9rem; font-size: .95rem; }
.press time { color: var(--ink-2); }
.press .outlet { font-weight: 500; color: var(--deep); }
.press a { color: var(--bright); }
.facts { margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.facts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .25rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.facts dt { color: var(--gold); font-weight: 500; }
.facts dd { margin: 0; }
@media (max-width: 760px) { .gallery, .downloads, .facts { grid-template-columns: 1fr; } .press li { grid-template-columns: 1fr; gap: .15rem; } .facts div { grid-template-columns: 1fr; gap: 0; } }
