/* The World Happiness Project — shared stylesheet */

:root {
  --ink: #20242e;
  --ink-soft: #4d5462;
  --paper: #ffffff;
  --cream: #fff9ec;
  --cream-deep: #fdf2d8;
  --accent: #f5b301;
  --accent-ink: #8f5400;
  --accent-ink-hover: #6b3f00;
  --line: #e8e2d3;
  --dark: #1d212b;
  --radius: 14px;
  --measure: 65ch;
  --shadow: 0 10px 30px rgba(32, 36, 46, 0.08);
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

a {
  color: var(--accent-ink);
}

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

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(2.75rem, 7vw, 5rem);
}

.band-cream {
  background: var(--cream);
}

.band-dark {
  background: var(--dark);
  color: #f6f2e7;
}

.band-dark h2,
.band-dark h3 {
  color: #fff;
}

.band-dark a {
  color: var(--accent);
}

.band-dark a:hover {
  color: #fff;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.5rem;
  color: #fff;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  margin-right: auto;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.brand-name {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  max-width: 14ch;
  line-height: 1.2;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

.site-nav .cart a {
  color: var(--accent-ink);
  font-size: 0.9rem;
}

/* nav collapsed by default on small screens */
@media (max-width: 900px) {
  .site-nav {
    flex-basis: 100%;
    padding-bottom: 0.9rem;
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.5rem;
  }

  .site-nav li {
    border-bottom: 1px solid var(--line);
  }

  .site-nav a {
    padding: 0.7rem 0;
    width: 100%;
  }
}

@media (min-width: 901px) {
  .nav-toggle {
    display: none;
  }
}

/* Hero */
.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.social-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  padding: 0;
  margin: 1.25rem 0 0;
}

.social-list a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* Section heads */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-head h2 {
  margin: 0;
}

.see-all {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.see-all::after {
  content: " \2192";
}

/* Pillars */
.pillars {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pillar h3 {
  margin: 0;
}

.pillar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.pillar img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.pillar .learn-more {
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.pillar .learn-more::after {
  content: " \2192";
}

/* Events */
.events-inner {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.events-inner p {
  font-size: 1.1rem;
}

/* Workplace band */
.lead-block p {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: #d9d5c9;
  max-width: 60ch;
}

/* Articles */
.posts {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.post a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.post img {
  width: 100%;
  aspect-ratio: 370 / 230;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: transform 0.25s ease;
}

.post a:hover img {
  transform: translateY(-4px);
}

.post h3 {
  font-size: 1.1rem;
  margin: 0;
}

.post a:hover h3 {
  color: var(--accent-ink);
}

/* Awards */
.awards-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.awards-grid img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .awards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Newsletter */
.newsletter-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 720px;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.signup label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.signup input[type="email"] {
  flex: 1 1 240px;
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1px solid #c9c2b1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.signup button {
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border: 0;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
}

.signup button:hover {
  background: var(--accent-ink);
}

.form-status {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--accent-ink);
}

/* Instagram */
.ig-handle {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.ig-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: clamp(1.25rem, 3vw, 2rem);
  list-style: none;
  padding: 0;
}

.ig-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
}

.ig-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.ig-grid a:hover img {
  transform: scale(1.04);
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #d8d4c8;
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
  font-size: 0.97rem;
}

.footer-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.site-footer h2 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.75em;
}

.site-footer a {
  color: #f0ece1;
}

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

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-nav a {
  text-decoration: none;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

.footer-brand strong {
  color: #fff;
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* 404 */
.not-found {
  text-align: center;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.not-found p {
  margin-inline: auto;
}

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