:root {
  --navy: #0a1f44;
  --teal: #00b4b4;
  --teal-dark: #008f8f;
  --turquoise-light: #e9fafa;
  --off-white: #f7f9f9;
  --white: #ffffff;
  --text: #2c3e50;
  --muted: #687b86;
  --line: rgba(10, 31, 68, 0.12);
  --shadow: 0 18px 50px rgba(10, 31, 68, 0.08);
  --radius: 24px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.container {
  width: min(var(--max-width), 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: 150px;
  height: 58px;
  max-width: 150px;
  object-fit: contain;
}
.site-header .container {
  width: min(var(--max-width), 92%);
}

.header-inner {
  min-height: 76px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.nav a:hover { color: var(--teal-dark); }

.button {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
}
.button-small { min-height: 40px; padding-inline: 16px; }
.button-primary {
  background: var(--teal);
  color: white;
}
.button-primary:hover { background: var(--teal-dark); }
.button-secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.hero {
  padding: 92px 0 68px;
  background:
    radial-gradient(circle at 85% 15%, rgba(0,180,180,0.15), transparent 32%),
    linear-gradient(180deg, var(--turquoise-light), white);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 12px;
  font-weight: 800;
}
h1, h2, h3 {
  font-family: Outfit, Inter, sans-serif;
  color: var(--navy);
  margin-top: 0;
}
h1 {
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
h3 { font-size: 23px; }
.lead, .feature-copy {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
}
.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.panel-label {
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 800;
}
.hero-panel h2 { font-size: 34px; }
.panel-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.panel-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.panel-list span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--turquoise-light);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.trust-strip {
  background: white;
  padding: 0 0 44px;
}
.trust-grid {
  margin-top: -26px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
}
.trust-grid div {
  padding: 22px;
  border-right: 1px solid var(--line);
}
.trust-grid div:last-child { border-right: 0; }
.trust-grid strong {
  display: block;
  color: var(--navy);
  font-family: Outfit;
  font-size: 22px;
}
.trust-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section { padding: 84px 0; }
.section-light { background: var(--off-white); }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading > p:last-child { color: var(--muted); font-size: 17px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 10px 32px rgba(10,31,68,0.04);
}
.card p { margin-bottom: 0; color: var(--muted); }

.feature-grid, .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}
.coffee-visual {
  min-height: 340px;
  position: relative;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--turquoise-light), white);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cup {
  position: absolute;
  width: 150px;
  height: 120px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border: 8px solid var(--teal);
  border-radius: 12px 12px 48px 48px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-family: Outfit;
  font-size: 28px;
  font-weight: 800;
}
.cup::after {
  content: "";
  position: absolute;
  right: -48px;
  top: 28px;
  width: 42px;
  height: 48px;
  border: 8px solid var(--teal);
  border-left: 0;
  border-radius: 0 24px 24px 0;
}
.saucer {
  position: absolute;
  width: 230px;
  height: 22px;
  left: 50%;
  top: 70%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0,180,180,0.18);
}
.steam {
  position: absolute;
  top: 55px;
  width: 12px;
  height: 70px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0,180,180,0.4), transparent);
}
.steam-a { left: 46%; }
.steam-b { left: 54%; }

.about-grid p {
  color: var(--muted);
  font-size: 17px;
}

.cta-section { background: white; }
.cta-box {
  background: var(--navy);
  color: white;
  border-radius: 28px;
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta-box h2 { color: white; margin-bottom: 0; }

.site-footer {
  padding: 48px 0 26px;
  background: var(--off-white);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}
.footer-logo {
  width: 120px;
  height: 48px;
  object-fit: contain;
}
.site-footer p, .site-footer span, .site-footer a {
  color: var(--muted);
}
.site-footer a, .site-footer span { display: block; margin-top: 8px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,31,68,0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-panel {
  width: min(650px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 28px;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid var(--line);
  background: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}
form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}
input, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
}
textarea { resize: vertical; }

@media (max-width: 900px) {
  .hero-grid, .feature-grid, .about-grid { grid-template-columns: 1fr; }
  .trust-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  
  .hero { padding: 64px 0 52px; }
  h1 { font-size: 44px; }
  .trust-grid, .card-grid { grid-template-columns: 1fr; }
  .trust-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .section { padding: 64px 0; }
  .cta-box, .footer-inner { flex-direction: column; align-items: flex-start; }
  .button { width: 100%; }
}


/* Ensure the contact modal stays closed until a contact button is clicked. */
.modal[hidden] {
  display: none !important;
}

/* =========================================================
   DS4 RESOURCE LIBRARY
   ========================================================= */

.resources-page {
  background: var(--white);
}

.resources-hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(circle at 88% 12%, rgba(0, 180, 180, 0.15), transparent 30%),
    linear-gradient(180deg, var(--turquoise-light), var(--white));
  border-bottom: 1px solid var(--line);
}

.resources-hero h1 {
  max-width: 850px;
}

.resources-hero .lead {
  max-width: 800px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(10, 31, 68, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.resource-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 180, 180, 0.45);
  box-shadow: 0 20px 48px rgba(10, 31, 68, 0.12);
}

.resource-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  background: var(--off-white);
  border-bottom: 1px solid var(--line);
}

.resource-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}

.resource-type {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resource-card h2 {
  margin-bottom: 14px;
  font-size: 27px;
  line-height: 1.15;
}

.resource-card-content > p:not(.resource-type):not(.resource-time) {
  margin: 0 0 20px;
  color: var(--muted);
}

.resource-time {
  margin: auto 0 20px;
  padding-top: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.resource-download {
  width: fit-content;
}

.resources-cta {
  background: var(--white);
}

.resources-cta .cta-box p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

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

@media (max-width: 680px) {
  .resources-hero {
    padding: 64px 0 48px;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resource-card-content {
    padding: 22px;
  }

  .resource-download {
    width: 100%;
  }
}
/* =========================================================
   TRADE OVER COFFEE NEWSLETTER
   ========================================================= */

.newsletter-page {
  background: var(--white);
}

.newsletter-hero {
  padding: 88px 0 70px;
  background:
    radial-gradient(circle at 88% 14%, rgba(0, 180, 180, 0.16), transparent 30%),
    linear-gradient(180deg, var(--turquoise-light), var(--white));
  border-bottom: 1px solid var(--line);
}

.newsletter-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.newsletter-hero h1 {
  max-width: 760px;
}

.newsletter-intro {
  max-width: 720px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
}

.newsletter-mark {
  min-height: 330px;
  padding: 34px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.newsletter-mark > p {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.newsletter-cup {
  position: relative;
  width: 155px;
  height: 122px;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 8px solid var(--teal);
  border-radius: 14px 14px 52px 52px;
  color: var(--navy);
  font-family: Outfit, Inter, sans-serif;
  font-size: 30px;
  font-weight: 800;
}

.newsletter-cup::after {
  content: "";
  position: absolute;
  right: -50px;
  top: 29px;
  width: 43px;
  height: 50px;
  border: 8px solid var(--teal);
  border-left: 0;
  border-radius: 0 26px 26px 0;
}

.newsletter-cup::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -38px;
  width: 230px;
  height: 20px;
  transform: translateX(-50%);
  background: rgba(0, 180, 180, 0.16);
  border-radius: 50%;
}

.newsletter-heading {
  margin-bottom: 36px;
}

.edition-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.edition-cover {
  min-height: 500px;
  padding: 34px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(155deg, rgba(10, 31, 68, 0.98), rgba(10, 31, 68, 0.9)),
    var(--navy);
}

.edition-cover-inner {
  width: 100%;
  min-height: 390px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 180, 180, 0.34), transparent 30%),
    rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.edition-cover-label {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.edition-cover h2 {
  max-width: 380px;
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
}

.edition-cover-inner > p:not(.edition-cover-label) {
  margin: 0;
  font-weight: 700;
}

.edition-cover-inner span {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.78;
}

.edition-content {
  padding: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.edition-number {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.edition-content h2 {
  margin-bottom: 20px;
}

.edition-summary {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
}

.edition-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.edition-topics span {
  padding: 8px 12px;
  background: var(--turquoise-light);
  border: 1px solid rgba(0, 180, 180, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.edition-content .button {
  width: fit-content;
}

.newsletter-about {
  background: var(--white);
}

.newsletter-about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 54px;
  align-items: start;
}

.newsletter-about-grid p {
  color: var(--muted);
  font-size: 17px;
}

.future-editions {
  max-width: 780px;
}

.future-editions > p:last-child {
  color: var(--muted);
  font-size: 17px;
}

.newsletter-cta {
  background: var(--white);
}

.newsletter-cta .cta-box p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 900px) {
  .newsletter-hero-grid,
  .edition-card,
  .newsletter-about-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-mark {
    min-height: 280px;
  }

  .edition-cover {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .newsletter-hero {
    padding: 64px 0 50px;
  }

  .newsletter-mark {
    padding: 26px;
  }

  .edition-cover {
    min-height: 360px;
    padding: 22px;
  }

  .edition-cover-inner {
    min-height: 310px;
    padding: 28px;
  }

  .edition-content {
    padding: 28px 22px;
  }

  .edition-content .button {
    width: 100%;
  }
}

/* Final header logo size override */
.site-header .header-inner .brand {
  display: inline-flex;
  width: 150px;
  flex: 0 0 150px;
  align-items: center;
}

.site-header .header-inner .brand img {
  display: block;
  width: 150px !important;
  height: 58px !important;
  max-width: 150px !important;
  max-height: 58px !important;
  object-fit: contain !important;
}
/* Trade Over Coffee hero image */

.newsletter-image-panel {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.newsletter-image-panel img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .newsletter-image-panel img {
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .newsletter-image-panel {
    border-radius: 22px;
  }

  .newsletter-image-panel img {
    min-height: 240px;
  }
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
  border-radius: 999px;
}

@media (max-width: 680px) {
  .header-inner {
    position: relative;
    min-height: 70px;
  }

  .brand img {
    width: 125px !important;
    height: 50px !important;
    max-width: 125px !important;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 200;
    padding: 16px 4%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(10, 31, 68, 0.12);
  }

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

  .nav a {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border-radius: 10px;
  }

  .nav a:hover {
    background: var(--turquoise-light);
  }

  .nav .button {
    width: 100%;
    margin-top: 8px;
  }
}