/*
Theme Name: Smart Circular
Theme URI: https://example.org/smart-circular
Author: Built for the AI-Powered Digital Transformation for the Smart Circular Economy program
Description: A bright, readable block theme for university research programs. White canvas, colour-coded sections, and a homepage structured as About / Objective / Research questions / Aims / Deliverables / Video / Collaboration / Timeline / News / Activity / Team.
Version: 2.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smart-circular
Tags: block-theme, full-site-editing, education, research, one-column, custom-colors, custom-menu
*/

/* ---------------------------------------------------------------
   1. Base
   --------------------------------------------------------------- */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body { -webkit-font-smoothing: antialiased; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link:focus {
  position: fixed; top: .5rem; left: .5rem; z-index: 999;
  padding: .75rem 1.25rem; background: var(--wp--preset--color--ink);
  color: #fff; text-decoration: none; border-radius: 6px;
}

/* Keep body copy at a readable measure. */
.entry-content > p,
.entry-content > ul,
.entry-content > ol { max-width: 68ch; }

/* ---------------------------------------------------------------
   2. Section eyebrow
   Small coloured label above each section heading. Colour is set
   per section so the page reads as a set of distinct areas.
   --------------------------------------------------------------- */

.sc-eyebrow {
  display: inline-block;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--emerald);
  background: var(--wp--preset--color--mint);
  padding: 0.45em 0.95em;
  border-radius: 999px;
  margin: 0 0 1.1rem;
}

.sc-eyebrow--sky   { color: var(--wp--preset--color--sky);   background: var(--wp--preset--color--skytint); }
.sc-eyebrow--sun   { color: #8A5B00;                          background: var(--wp--preset--color--suntint); }
.sc-eyebrow--grape { color: var(--wp--preset--color--grape); background: #EFEBFE; }

/* The statement headline that follows an eyebrow. */
.sc-statement {
  max-width: 20ch;
  text-wrap: balance;
  margin-bottom: 1rem;
}

.sc-lede {
  font-size: var(--wp--preset--font-size--large);
  color: var(--wp--preset--color--slate);
  max-width: 62ch;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   3. Header
   --------------------------------------------------------------- */

.sc-header {
  border-bottom: 1px solid var(--wp--preset--color--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sc-header .wp-block-site-title a {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--ink);
  text-decoration: none;
  max-width: 26ch;
  display: inline-block;
}

.sc-header .wp-block-navigation {
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.9375rem;
  font-weight: 500;
}

.sc-header .wp-block-navigation a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}

.sc-header .wp-block-navigation a:hover,
.sc-header .wp-block-navigation .current-menu-item a {
  color: var(--wp--preset--color--emerald);
  border-bottom-color: var(--wp--preset--color--emerald);
}

/* ---------------------------------------------------------------
   4. Hero
   --------------------------------------------------------------- */

.sc-hero {
  background:
    radial-gradient(60rem 32rem at 88% -12%, var(--wp--preset--color--mint) 0%, transparent 62%),
    radial-gradient(46rem 28rem at 4% 8%, var(--wp--preset--color--skytint) 0%, transparent 58%),
    var(--wp--preset--color--white);
  border-bottom: 1px solid var(--wp--preset--color--line);
}

/* WordPress's constrained layout auto-centres every child, which puts the
   eyebrow, headline, paragraph and buttons on four different left edges.
   Two classes beats core's :where() rule without needing !important. */
.sc-hero.wp-block-group > * {
  margin-left: 0;
  margin-right: auto;
}

.sc-hero h1 {
  font-size: var(--wp--preset--font-size--hero);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 17ch;
  text-wrap: balance;
  margin: 0 0 1.25rem;
}

.sc-hero h1 em {
  font-style: normal;
  color: var(--wp--preset--color--emerald);
}

.sc-hero > p {
  font-size: var(--wp--preset--font-size--large);
  color: var(--wp--preset--color--slate);
  max-width: 54ch;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   5. Cards
   --------------------------------------------------------------- */

.sc-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 16px;
  padding: var(--wp--preset--spacing--30);
  height: 100%;
  transition: box-shadow .18s ease, transform .18s ease;
}

.sc-card:hover {
  box-shadow: 0 10px 30px rgba(17, 28, 25, 0.07);
  transform: translateY(-2px);
}

.sc-card h3 { margin-top: 0; margin-bottom: .5rem; }
.sc-card p:last-child { margin-bottom: 0; }

.sc-card--mint { background: var(--wp--preset--color--mint); border-color: transparent; }
.sc-card--sky  { background: var(--wp--preset--color--skytint); border-color: transparent; }
.sc-card--sun  { background: var(--wp--preset--color--suntint); border-color: transparent; }

.sc-tag {
  display: inline-block;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--slate);
  margin-bottom: .75rem;
}

/* ---------------------------------------------------------------
   6. Numbered themes (01 / 02) — used only where order is real
   --------------------------------------------------------------- */

.sc-num {
  font-family: var(--wp--preset--font-family--display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--wp--preset--color--emerald);
  display: block;
  margin-bottom: .75rem;
}

.sc-num--sky { color: var(--wp--preset--color--sky); }

/* ---------------------------------------------------------------
   7. Ordered content: research questions, aims, deliverables
   --------------------------------------------------------------- */

.sc-numlist { counter-reset: scq; list-style: none; padding-left: 0; margin: 0; }

.sc-numlist li {
  counter-increment: scq;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1rem;
  max-width: 68ch;
}

.sc-numlist li::before {
  content: counter(scq, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--wp--preset--color--emerald);
  background: var(--wp--preset--color--mint);
  border-radius: 999px;
  width: 2.1rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
}

.sc-ticklist { list-style: none; padding-left: 0; margin: 0; }

.sc-ticklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .8rem;
  max-width: 68ch;
}

.sc-ticklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: .65rem;
  height: .65rem;
  border-radius: 3px;
  background: var(--wp--preset--color--sun);
}

/* ---------------------------------------------------------------
   8. Timeline
   --------------------------------------------------------------- */

.sc-timeline { border-left: 2px solid var(--wp--preset--color--line); padding-left: 2rem; margin: 0; }

.sc-phase { position: relative; padding-bottom: 2.25rem; }
.sc-phase:last-child { padding-bottom: 0; }

.sc-phase::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 7px);
  top: .45rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--wp--preset--color--emerald);
  box-shadow: 0 0 0 4px var(--wp--preset--color--mint);
}

.sc-phase .sc-phase-meta {
  font-family: var(--wp--preset--font-family--display);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--wp--preset--color--slate);
  display: block;
  margin-bottom: .3rem;
}

.sc-phase h3 { font-size: var(--wp--preset--font-size--large); margin: 0 0 .4rem; }
.sc-phase p { margin: 0; color: var(--wp--preset--color--slate); max-width: 62ch; }

/* Current phase gets the accent. */
.sc-phase--now::before { background: var(--wp--preset--color--sun); box-shadow: 0 0 0 4px var(--wp--preset--color--suntint); }

/* ---------------------------------------------------------------
   9. Figures
   --------------------------------------------------------------- */

.sc-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: var(--wp--preset--spacing--30) 0;
  padding: 0;
}

.sc-figure {
  background: var(--wp--preset--color--mist);
  border-radius: 14px;
  padding: 1.4rem;
}

.sc-figure dt {
  font-family: var(--wp--preset--font-family--display);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--wp--preset--color--slate);
  margin-bottom: .35rem;
}

.sc-figure dd {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  color: var(--wp--preset--color--ink);
}

/* ---------------------------------------------------------------
   10. Partner logo strip
   --------------------------------------------------------------- */

.sc-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: var(--wp--preset--spacing--30) 0 0;
}

.sc-logos li {
  background: var(--wp--preset--color--mist);
  border-radius: 12px;
  min-height: 5.5rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--wp--preset--font-family--display);
  font-size: .875rem;
  font-weight: 600;
  color: var(--wp--preset--color--slate);
  line-height: 1.3;
}

.sc-logos img { max-height: 3rem; width: auto; }

/* ---------------------------------------------------------------
   11. Post and activity lists
   --------------------------------------------------------------- */

.sc-postlist .wp-block-post-title { font-size: var(--wp--preset--font-size--large); margin: .35rem 0 .4rem; }
.sc-postlist .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.sc-postlist .wp-block-post-title a:hover { color: var(--wp--preset--color--emerald); }

.sc-postlist .wp-block-post-date {
  font-family: var(--wp--preset--font-family--display);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--wp--preset--color--slate);
}

.sc-postlist .wp-block-post-excerpt { color: var(--wp--preset--color--slate); font-size: .9375rem; }
.sc-postlist .wp-block-post-featured-image img { border-radius: 14px; }

/* ---------------------------------------------------------------
   12. Video
   --------------------------------------------------------------- */

.sc-video { border-radius: 18px; overflow: hidden; background: var(--wp--preset--color--mist); }
.sc-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

/* ---------------------------------------------------------------
   13. Team
   --------------------------------------------------------------- */

.sc-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: var(--wp--preset--spacing--30) 0 0; }

.sc-person { text-align: left; }

.sc-person .sc-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: var(--wp--preset--color--mint);
  display: grid;
  place-items: center;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--wp--preset--color--emerald);
  margin-bottom: .75rem;
  overflow: hidden;
}

.sc-person .sc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sc-person strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 1rem; letter-spacing: -0.01em; }
.sc-person span { display: block; font-size: .875rem; color: var(--wp--preset--color--slate); line-height: 1.45; }

/* ---------------------------------------------------------------
   14. Footer
   --------------------------------------------------------------- */

.sc-footer {
  background: var(--wp--preset--color--ink);
  color: rgba(255, 255, 255, .74);
  font-size: var(--wp--preset--font-size--small);
}

.sc-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.28); }
.sc-footer a:hover { border-bottom-color: var(--wp--preset--color--sun); }
.sc-footer h2, .sc-footer h3 {
  color: #fff;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: .9rem;
}

/* ---------------------------------------------------------------
   15. Print
   --------------------------------------------------------------- */

@media print {
  .sc-header, .sc-footer, .wp-block-navigation { display: none; }
  body { background: #fff; color: #000; }
}
