@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Source+Sans+3:wght@400;500;700&display=swap');

:root {
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --color-primary: #005048;
  --color-secondary: #0b6f63;
  --color-accent: #d03058;
  --color-bg: #f0faf4;
  --color-bg-alt: #e1f2e8;
  --color-bg-card: #ffffff;
  --color-text: #081a10;
  --color-text-muted: #386858;
  --color-text-on-primary: #ffffff;
  --color-border: #b7d4c7;
  --color-shadow: rgba(8, 26, 16, 0.12);

  --radius: 0;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --container-max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}
h1 { font-size: var(--font-size-3xl); }
h2, .section-title { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p { margin: 0 0 var(--space-4); color: var(--color-text); }
a { color: var(--color-primary); text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; }
a:hover { color: var(--color-accent); }
strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }
ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); }

.container {
  width: 100%;
  max-width: var(--container-max);
  padding: 0 1rem;
  margin: 0 auto;
  box-sizing: border-box;
}
.section, .faq-section { padding: 4rem 0; position: relative; }
.section:not(.hero):nth-child(even), .faq-section:nth-child(even) {
  background: var(--color-bg-alt);
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  overflow: visible;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  overflow: visible;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  overflow: visible;
}
.nav-toggle-input:checked ~ .site-nav { display: block; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  overflow: visible;
}
.nav-item { position: relative; }
.nav-dropdown {
  position: relative;
  overflow: visible;
}
.nav-link {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.5rem;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }
.nav-link:hover,
.nav-link:focus-visible { color: var(--color-accent); }

.nav-dropdown-toggle { cursor: pointer; user-select: none; white-space: nowrap; }
.nav-dropdown-menu {
  display: none;
  position: static;
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  white-space: nowrap;
  overflow: visible;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
  color: var(--color-text);
}
.nav-dropdown-menu .nav-link:hover,
.nav-dropdown-menu .nav-link:focus-visible { background: var(--color-bg-alt); }

.hero {
  min-height: 50vh;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #FFFFFF;
}
.hero h1, .hero h2, .hero h3, .hero p, .hero a, .hero li, .hero strong, .hero em { color: inherit; }
.hero .container { width: 100%; }
.hero-th-wrap {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-th-wrap h1 {
  color: var(--color-text);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 1.5rem;
}
.hero-th-quote {
  color: var(--color-text);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1.5rem 0;
  padding: 0 1rem;
  position: relative;
  quotes: '\201C' '\201D';
}
.hero-th-quote::before {
  content: open-quote;
  font-size: 2.5rem;
  color: var(--color-primary);
  vertical-align: -0.4em;
  margin-right: 0.2rem;
}
.hero-th-author { margin-bottom: 1.5rem; }
.hero-th-author strong { display: block; color: var(--color-text); }
.hero-th-author span { display: block; color: var(--color-text-muted); font-size: 0.88rem; }
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-bg-card);
  box-shadow: 0 10px 30px var(--color-shadow);
  clip-path: polygon(0 0, calc(100% - 1.2rem) 0, 100% 1.2rem, 100% 100%, 1.2rem 100%, 0 calc(100% - 1.2rem));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px var(--color-shadow);
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-body,
.card > :not(img) {
  padding: 1rem 1.25rem;
}
.card h3, .card h4 { margin-top: 0; margin-bottom: 0.5rem; }
.card p {
  margin: 0;
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
}

.btn, button[type="submit"] {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  transition: 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.7rem), calc(100% - 0.7rem) 100%, 0 100%);
}
.btn:hover, button[type="submit"]:hover { transform: translateY(-1px); filter: brightness(0.9); }
.btn-primary, button[type="submit"] {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border-color: var(--color-primary);
}
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: 3rem 0;
}
.site-footer a { color: #1A1A1A; }
.footer-inner {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 1rem;
}
.footer-inner .btn-primary {
  color: var(--color-text-on-primary) !important;
}
.footer-inner .btn-secondary {
  color: var(--color-primary) !important;
  background: transparent;
  border-color: var(--color-text-on-primary);
  background: var(--color-bg-card);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
  color: var(--color-text);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after { content: "−"; }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

input, textarea, select, label {
  font: inherit;
  color: var(--color-text);
}
input, textarea, select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 80, 72, 0.15);
}
textarea { min-height: 9rem; resize: vertical; }
label { display: inline-block; margin-bottom: 0.35rem; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); }
button[type="submit"] { appearance: none; }

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
tr:nth-child(odd) { background: var(--color-bg); }
tr:nth-child(even) { background: var(--color-bg-alt); }
th {
  background: var(--color-bg-alt);
  font-weight: var(--font-weight-bold);
}

.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.hidden { display: none !important; }

@media (min-width: 768px) {
  .container {
    max-width: 960px;
    padding: 0 1.5rem;
    margin: 0 auto;
  }
  .nav-toggle-label { display: none !important; }
  .site-header .container {
    justify-content: flex-start;
    gap: 3rem;
  }
  .site-nav {
    display: flex !important;
    align-items: center;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
    flex: 1;
    justify-content: center;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0;
    margin: 0;
  }
  .nav-link {
    display: inline-block;
    font-size: var(--font-size-sm);
    padding: 0.4rem 0.75rem;
    border-bottom: none;
    white-space: nowrap;
    color: #1A1A1A;
  }
  .nav-link::after { left: 0.75rem; right: 0.75rem; }
  .nav-dropdown-menu {
    position: absolute !important;
    top: 100%;
    left: 0;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    padding: 0.5rem 0;
  }
  .nav-dropdown-menu .nav-link {
    color: var(--color-text);
    padding: 0.5rem 1.25rem;
  }
  .hero { min-height: 60vh; }
  .hero h1 { font-size: var(--font-size-3xl); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .footer-inner { flex-direction: row; text-align: left; justify-content: space-between; align-items: center; }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
  }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section, .faq-section { padding: 4rem 0; }
}

@media (max-width: 767px) {
  .site-header .container { padding: 0.5rem 1rem; }
  .site-logo img { height: 40px; width: auto; max-width: 140px; object-fit: contain; display: block; }
  .hero h1 { font-size: var(--font-size-2xl); word-break: break-word; }
  .hero p { font-size: var(--font-size-base); }
  .card-grid { grid-template-columns: 1fr; }
  .section, .faq-section { padding: 2rem 0; }
  .section-title { font-size: var(--font-size-xl); word-break: break-word; }
  .site-nav { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  table {
    width: 100%;
    display: block;
    overflow-x: auto;
  }
}
/* Phase 7 nav-link contrast fix (desktop only) */
@media (min-width: 768px) {
  .site-header .nav-list > li > .nav-link,
  .site-header .nav-list > li > .nav-dropdown-toggle {
    color: #F2F2F2 !important;
  }
}

.hero .btn-secondary{color:var(--color-text-on-primary);border-color:var(--color-text-on-primary);}
