/* Mr Sutherland — static site styles (ported from mrsutherland-editorial theme) */

:root {
  --color-bg: #0f172a;
  --color-bg-elevated: #1e293b;
  --color-surface: #334155;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #f59e0b;
  --color-border: #475569;
  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --space-section: 5rem;
  --space-block: 1.5rem;
  --content-max: 48rem;
  --content-wide: 56rem;
  --hub-max: 75rem;
  --hub-rainbow: linear-gradient(90deg, #0284c7 0%, #0d9488 25%, #c2410c 50%, #b45309 75%, #0284c7 100%);
  --hub-card-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Site header */
.site-header {
  background: var(--color-bg-elevated);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-branding a {
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.site-branding a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.main-navigation a {
  color: var(--color-text-muted);
  font-weight: 600;
}
.main-navigation a:hover {
  color: var(--color-text);
}

/* Layout */
.site-main {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-section) 1.5rem;
}

body.mrs-home-hub .site-main,
body.page-full-width .site-main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.page-immersive .site-header,
body.page-immersive .site-footer {
  display: none;
}

body.page-immersive .site-main {
  max-width: none;
  padding: 0;
}

/* Article / page content */
.page-header {
  margin-bottom: 2rem;
}
.page-header h1 {
  margin-bottom: 0.5rem;
}

.article-content {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}
.article-content p {
  margin-bottom: 1.25rem;
}
.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}
.article-content th,
.article-content td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.article-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}
.article-content .lead {
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.about-section {
  text-align: center;
  padding: 3rem 1.5rem;
}
.about-section img {
  border-radius: 1rem;
  margin-top: 2rem;
}

/* Blog index */
.blog-index-header {
  margin-bottom: 2.5rem;
}
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
  transition: box-shadow 0.2s ease;
}
.post-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}
.post-card h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}
.post-card h2 a {
  color: var(--color-text);
}
.post-card h2 a:hover {
  color: var(--color-accent);
}
.post-card .post-excerpt {
  color: var(--color-text-muted);
  margin: 0;
}

/* App embed full-width */
.app-embed {
  width: 100%;
  padding: 2rem 1rem;
}
.app-embed #root {
  width: 100%;
  min-height: 600px;
}

/* Site footer */
.site-footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  margin-top: var(--space-section);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.site-footer a {
  color: var(--color-text-muted);
}
.site-footer a:hover {
  color: var(--color-accent);
}

body.mrs-home-hub .site-footer,
body.page-full-width .site-footer {
  margin-top: 0;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Resource hub */
.resource-hub {
  width: 100%;
}

.hub-hero {
  position: relative;
  padding: 4.5rem 1.5rem 3.5rem;
  background:
    radial-gradient(ellipse 120% 80% at 20% 0%, rgba(2, 132, 199, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 30%, rgba(194, 65, 12, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, #020617 0%, #0f172a 40%, #0c4a6e 100%);
  text-align: center;
  border-bottom: 1px solid rgba(71, 85, 105, 0.5);
}

.hub-hero__inner {
  max-width: var(--hub-max);
  margin: 0 auto;
}

.hub-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
  margin: 0 0 1rem;
}

.hub-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 1.25rem;
  line-height: 1.1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hub-hero__lead {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.hub-section {
  padding: 3.5rem 1.5rem 4rem;
  background: var(--color-bg);
}

.hub-section--featured {
  background: #0c1222;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.hub-section__inner {
  max-width: var(--hub-max);
  margin: 0 auto;
}

.hub-section__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.hub-section__subhead {
  margin: 0 0 2.25rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 40rem;
}

.hub-section--featured .hub-section__heading {
  margin-bottom: 1.5rem;
}

.hub-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.hub-featured-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, 0.8);
  background: var(--color-bg-elevated);
  box-shadow: var(--hub-card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hub-featured-card--time {
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(56, 189, 248, 0.16), transparent 34%),
    var(--color-bg-elevated);
}

.hub-featured-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.55);
  border-color: rgba(56, 189, 248, 0.45);
}

.hub-featured-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.hub-featured-card__strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--hub-rainbow);
  background-size: 200% 100%;
  animation: hub-strip-shift 14s ease-in-out infinite;
}

.hub-featured-card--time .hub-featured-card__strip {
  background: linear-gradient(90deg, #713f12 0%, #f59e0b 34%, #0c4a6e 67%, #1e3a8a 100%);
  background-size: 200% 100%;
}

.hub-featured-card--area {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.14), transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(16, 185, 129, 0.12), transparent 34%),
    var(--color-bg-elevated);
}

.hub-featured-card--area .hub-featured-card__strip {
  background: linear-gradient(90deg, #004ac6 0%, #2563eb 35%, #006c49 67%, #10b981 100%);
  background-size: 200% 100%;
}

.hub-featured-card--area .hub-featured-card__label { color: #60a5fa; }
.hub-featured-card--area .hub-featured-card__cta { color: #6ee7b7; }

.hub-featured-card--command {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 62, 199, 0.16), transparent 38%),
    radial-gradient(circle at 100% 10%, rgba(0, 84, 113, 0.14), transparent 34%),
    var(--color-bg-elevated);
}

.hub-featured-card--command .hub-featured-card__strip {
  background: linear-gradient(90deg, #001452 0%, #003ec7 34%, #005471 67%, #006e92 100%);
  background-size: 200% 100%;
}

.hub-featured-card--command .hub-featured-card__label { color: #93c5fd; }
.hub-featured-card--command .hub-featured-card__cta { color: #7dd3fc; }

.hub-featured-card--cyclone .hub-featured-card__strip {
  background: linear-gradient(90deg, #0c4a6e 0%, #0284c7 50%, #0369a1 100%);
  background-size: 200% 100%;
}
.hub-featured-card--cyclone .hub-featured-card__label { color: #7dd3fc; }

.hub-featured-card--bushfire .hub-featured-card__strip {
  background: linear-gradient(90deg, #7c2d12 0%, #ea580c 50%, #c2410c 100%);
  background-size: 200% 100%;
}
.hub-featured-card--bushfire .hub-featured-card__label { color: #fdba74; }
.hub-featured-card--bushfire .hub-featured-card__cta { color: #fed7aa; }

.hub-featured-card--earthquake .hub-featured-card__strip {
  background: linear-gradient(90deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
  background-size: 200% 100%;
}
.hub-featured-card--earthquake .hub-featured-card__label { color: #a5b4fc; }
.hub-featured-card--earthquake .hub-featured-card__cta { color: #c7d2fe; }

.hub-featured-card--soon {
  cursor: default;
  opacity: 0.92;
}
.hub-featured-card--soon:hover {
  transform: none;
  box-shadow: var(--hub-card-shadow);
  border-color: rgba(71, 85, 105, 0.8);
}
.hub-featured-card__cta--muted {
  color: var(--color-text-muted) !important;
  font-weight: 600;
  font-size: 0.875rem;
}

.hub-featured-card:hover .hub-featured-card__strip {
  animation-duration: 8s;
}

@keyframes hub-strip-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-featured-card__strip { animation: none; }
}

.hub-featured-card__icon {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.hub-featured-card__body {
  padding: 1.75rem 1.75rem 1.5rem;
  text-align: left;
}

.hub-featured-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #38bdf8;
  margin: 0 0 0.5rem;
}

.hub-featured-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.hub-featured-card__text {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 42rem;
}

.hub-featured-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fde68a;
}

.hub-featured-card:hover .hub-featured-card__cta { color: #fef08a; }

.hub-featured-card__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hub-featured-card:hover .hub-featured-card__arrow {
  transform: translateX(6px);
}

.hub-subject-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.hub-subject-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-height: 9.5rem;
  padding: 1.5rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg-elevated);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.35);
}

.hub-subject-card--humanities {
  background: linear-gradient(145deg, #1e1b4b 0%, var(--color-bg-elevated) 100%);
  border-color: #4c1d95;
}
.hub-subject-card--science {
  background: linear-gradient(145deg, #0c4a6e 0%, var(--color-bg-elevated) 100%);
  border-color: #0369a1;
}
.hub-subject-card--maths {
  background: linear-gradient(145deg, #713f12 0%, var(--color-bg-elevated) 100%);
  border-color: #b45309;
}

.hub-subject-card--placeholder {
  cursor: default;
  opacity: 0.9;
  box-shadow: none;
}

.hub-subject-card:not(.hub-subject-card--placeholder):hover {
  transform: translateY(-3px);
  text-decoration: none;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.45);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--color-text);
}

.hub-subject-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.hub-subject-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.hub-subject-card__hint {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: auto;
}

.hub-subject-card--placeholder .hub-subject-card__hint {
  color: #a8a29e;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
