/* theseason.au
 * A phenology project for the Merri Creek
 *
 * Typography over illustration. Restraint. Seasonality.
 */

/* Fonts:
 * Fraunces - Display serif for season names (optical size, soft wonk)
 * Source Serif 4 - Text serif for body copy
 */

:root {
  --bg: #fefdfb;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-light: #a8a29e;
  --accent: #2d5a27;
  --border: #e7e5e4;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

/* Seasonal palettes - subtle, earthy */
[data-season="biderap"] {
  --bg: #fefcf8;
  --accent: #92400e;
}

[data-season="iuk"] {
  --bg: #fafcfa;
  --accent: #365314;
}

[data-season="waring"] {
  --bg: #fafaf8;
  --accent: #44403c;
}

[data-season="guling"] {
  --bg: #fefce8;
  --accent: #a16207;
}

[data-season="poorneet"] {
  --bg: #f0fdf4;
  --accent: #166534;
}

[data-season="buath-gurru"] {
  --bg: #fefdf5;
  --accent: #78716c;
}

[data-season="gunyang"] {
  --bg: #fff7ed;
  --accent: #c2410c;
}

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

/* Base */
html {
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Acknowledgment of Country */
.acknowledgment {
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) 0;
}

.acknowledgment p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

/* Layout */
main {
  flex: 1;
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

footer {
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

footer p {
  margin: 0;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.sources {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.sources h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin: 0 0 var(--space-sm);
}

.sources p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: var(--space-xs) 0;
}

.sources a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources a:hover {
  color: var(--accent);
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 4.5rem;
  margin: 0;
  color: var(--text);
}

h2 {
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin: var(--space-xl) 0 var(--space-md);
}

p {
  margin: var(--space-md) 0;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

em {
  font-style: italic;
}

/* Current season (homepage) */
.current-season {
  padding-top: var(--space-lg);
}

.season-intro {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

.season-meaning {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin: var(--space-sm) 0 0;
}

.season-description {
  margin: var(--space-xl) 0;
}

.season-description p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.season-indicators {
  margin: var(--space-xl) 0;
}

.season-indicators ul {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.season-indicators li {
  padding: var(--space-sm) 0;
  font-size: 1rem;
}

.season-indicators li a {
  font-weight: 500;
}

.season-nav {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.season-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Season page */
.season-page {
  padding-top: var(--space-lg);
}

.note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.season-signs ul {
  list-style: none;
  padding: 0;
}

.season-signs li {
  padding: var(--space-xs) 0;
  padding-left: 1.5em;
  position: relative;
}

.season-signs li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-light);
}

.species-list {
  list-style: none;
  padding: 0;
}

.species-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.species-list li:last-child {
  border-bottom: none;
}

.species-list a {
  display: block;
  color: var(--text);
}

.species-list a:hover {
  text-decoration: none;
}

.species-list a:hover strong {
  color: var(--accent);
}

.species-list strong {
  display: block;
  font-weight: 500;
  transition: color 0.15s ease;
}

.species-list em {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.species-list .event {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: var(--space-xs);
}

/* Species page */
.species-page {
  padding-top: var(--space-lg);
}

.species-header {
  margin-bottom: var(--space-lg);
}

.species-image {
  margin: var(--space-lg) calc(-1 * var(--space-lg)) var(--space-xl);
  position: relative;
}

.species-image img {
  width: 100%;
  height: auto;
  display: block;
  /* Subtle warmth and reduced saturation for editorial feel */
  filter: saturate(0.85) sepia(0.08) contrast(0.95);
}

/* Subtle seasonal tint overlay */
.species-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  opacity: 0.04;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.species-image figcaption {
  position: relative;
  font-size: 0.7rem;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: var(--space-sm) var(--space-lg);
  text-align: right;
}

.species-header h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
}

.scientific-name {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0;
}

.indigenous-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--accent);
  margin: var(--space-sm) 0 0;
}

.placeholder {
  font-style: italic;
  color: var(--text-muted);
}

/* Phenology chart */
.species-phenology {
  margin: var(--space-xl) 0;
}

.phenology-chart-container {
  margin: var(--space-md) 0;
}

.phenology-chart {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.phenology-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: var(--space-sm);
}

/* Timing shift analysis */
.timing-shift {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.timing-shift h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

.timing-shift p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.timing-shift strong {
  color: var(--accent);
}

.timing-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-light);
}

/* Historical context */
.species-history {
  margin: var(--space-xl) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.specimen-record {
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.specimen-record strong {
  color: var(--accent);
}

.historical-context {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
}

.context-period {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0 0 var(--space-xs);
}

.context-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

.history-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-light);
  margin-top: var(--space-md);
}

/* Astronomy section */
.season-astronomy {
  margin: var(--space-xl) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.astronomy-content {
  background: linear-gradient(to bottom, #0c1222, #1a1a2e);
  border-radius: 4px;
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  color: #e8e6e3;
}

.astronomy-marker {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: #f5f5f0;
  margin: 0 0 var(--space-xs);
  letter-spacing: 0.02em;
}

.astronomy-figure {
  font-size: 0.85rem;
  font-style: italic;
  color: #a8a29e;
  margin: 0 0 var(--space-md);
}

.astronomy-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #d4d4d4;
  margin: 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--text-muted);
}

/* Error page */
.error-page {
  padding-top: var(--space-2xl);
  text-align: center;
}

.error-page h1 {
  font-size: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  main {
    padding: var(--space-lg) var(--space-md);
  }

  .acknowledgment {
    padding: var(--space-md) var(--space-md) 0;
  }

  footer {
    padding: var(--space-lg) var(--space-md);
  }

  h1 {
    font-size: 3rem;
  }

  .season-meaning {
    font-size: 1.3rem;
  }

  /* Species page mobile */
  .species-header h1 {
    font-size: 2rem;
  }

  .species-image {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
  }

  .species-image figcaption {
    padding: var(--space-sm) var(--space-md);
  }

  /* Phenology chart - allow horizontal scroll on small screens */
  .phenology-chart-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: 0 var(--space-md);
  }

  .phenology-chart {
    min-width: 300px;
  }

  /* Reduce excessive whitespace on mobile */
  h2 {
    margin-top: var(--space-lg);
  }

  .species-phenology,
  .species-history {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  .timing-shift {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
  }

  .season-description,
  .season-indicators {
    margin: var(--space-lg) 0;
  }
}

/* Print */
@media print {
  .acknowledgment {
    border-bottom: none;
  }

  a {
    color: var(--text);
  }
}
