/* TasBet 17 — Emerald Ledger design system */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Outfit:wght@400;500;600;700&family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
  --ink: #14201e;
  --ink-soft: #2a3d39;
  --teal: #0f4f4a;
  --teal-deep: #0a3532;
  --mint: #c8ddd6;
  --mist: #e6efec;
  --sand: #d8c9a8;
  --gold: #b8963e;
  --gold-bright: #d4b45a;
  --copper: #9a6b3c;
  --cream: #f3f6f4;
  --white: #fbfdf0;
  --danger: #8b3a3a;
  --radius: 2px;
  --max: 1120px;
  --nav-h: 72px;
  --shadow: 0 18px 50px rgba(10, 53, 50, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Vazirmatn', 'Outfit', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(184, 150, 62, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(15, 79, 74, 0.14), transparent 50%),
    linear-gradient(180deg, #eef5f2 0%, #e3ebe7 40%, #dce7e3 100%);
  line-height: 1.85;
  font-size: 1.05rem;
  min-height: 100vh;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--copper);
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 244, 0.86);
  border-bottom: 1px solid rgba(15, 79, 74, 0.12);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-mark span {
  color: var(--gold);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--teal-deep);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(15, 79, 74, 0.25);
  background: transparent;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--copper));
  color: #1a160c;
  box-shadow: 0 10px 28px rgba(184, 150, 62, 0.35);
}

.btn-gold:hover {
  color: #1a160c;
}

.btn-teal {
  background: linear-gradient(135deg, #17665f, var(--teal-deep));
  color: #f4faf8;
  box-shadow: 0 10px 28px rgba(15, 79, 74, 0.28);
}

.btn-teal:hover {
  color: #fff;
}

.btn-ghost {
  border-color: rgba(15, 79, 74, 0.35);
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.35);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7fbf9;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 30, 28, 0.25) 0%, rgba(10, 30, 28, 0.55) 45%, rgba(8, 22, 20, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 28, 26, 0.75), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
}

.hero-kicker {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  line-height: 0.95;
  margin: 0 0 0.85rem;
  letter-spacing: -0.03em;
  animation: riseIn 0.9s var(--ease) both;
}

.hero-kicker em {
  font-style: normal;
  color: var(--gold-bright);
}

.hero-lead {
  max-width: 36rem;
  font-size: 1.12rem;
  color: rgba(243, 246, 244, 0.9);
  margin: 0 0 1.5rem;
  animation: riseIn 1s 0.12s var(--ease) both;
}

.hero .cta-row {
  animation: riseIn 1s 0.22s var(--ease) both;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.section {
  margin: 3rem 0;
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: 'Fraunces', 'Vazirmatn', Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--teal-deep);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}

.prose {
  font-size: 1.05rem;
}

.prose h2 {
  font-family: 'Fraunces', 'Vazirmatn', Georgia, serif;
  color: var(--teal-deep);
  margin-top: 2.4rem;
  scroll-margin-top: 90px;
}

.prose h3 {
  color: var(--ink-soft);
  margin-top: 1.6rem;
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose ul {
  padding-inline-start: 1.3rem;
}

.figure {
  margin: 1.6rem 0 2rem;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow);
  background: var(--teal-deep);
}

.figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.figure:hover img {
  transform: scale(1.03);
}

.figure figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: var(--mint);
  background: rgba(10, 53, 50, 0.95);
}

/* Partner cards (interactive containers) */
.partners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.partner {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(200, 221, 214, 0.55));
  border: 1px solid rgba(15, 79, 74, 0.14);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.partner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.partner h3 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
}

.partner p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.blog-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 79, 74, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.blog-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  color: inherit;
}

.blog-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.blog-item .meta {
  padding: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.blog-item h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--teal-deep);
}

.blog-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Sticky CTA bar */
.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.7rem 1rem;
  background: rgba(10, 53, 50, 0.94);
  border-top: 1px solid rgba(184, 150, 62, 0.35);
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}

.sticky-cta.is-visible {
  transform: translateY(0);
}

.sticky-cta .btn {
  flex: 1;
  max-width: 280px;
  padding: 0.75rem 1rem;
}

/* Footer */
.site-footer {
  background: var(--teal-deep);
  color: var(--mint);
  margin-top: 3rem;
  padding: 2.5rem 1.25rem 5.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

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

.site-footer h4 {
  margin: 0 0 0.7rem;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--gold-bright);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.disclaimer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.85;
  max-width: var(--max);
  margin-inline: auto;
}

/* Article meta */
.article-hero {
  padding: 2.2rem 0 0.5rem;
}

.article-hero h1 {
  font-family: 'Fraunces', 'Vazirmatn', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.25;
  margin: 0 0 0.8rem;
  color: var(--teal-deep);
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}

.breadcrumbs a {
  text-decoration: none;
}

.toc {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 79, 74, 0.12);
  padding: 1rem 1.1rem;
  margin: 1.2rem 0 1.8rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.related {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 79, 74, 0.15);
}

/* Motion */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.1) translateY(-2%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-media img {
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 1rem;
    top: calc(var(--nav-h) + 0.4rem);
    background: rgba(243, 246, 244, 0.98);
    border: 1px solid rgba(15, 79, 74, 0.15);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .partners,
  .blog-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 72vh;
  }

  .sticky-cta {
    flex-direction: column;
  }

  .sticky-cta .btn {
    max-width: none;
  }
}
