/* Shared foundation for OhanaBuilds */
/* Not template-specific */

/* === Design Tokens (Colors, spacing, radii, shadows) === */
:root {
  --bg: #f8f4ef;
  --surface: #ffffff;
  --text: #2a2a26;
  --muted: #5a5a52;
  --line: #e2d8cf;
  --accent: #c07a5c;
  --accent-strong: #a65f44;
  --soft: #f3e8e1;
  --section-soft: #f6ede6;
  --section-mist: #f3e7df;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 12px rgba(160, 120, 90, 0.08);
  --shadow-md: 0 12px 30px rgba(160, 120, 90, 0.12);
  --container: 1040px;
}

/* === CSS Reset & Box Model === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* === Global HTML / Document Behavior === */
html {
  scroll-behavior: smooth;
}

/* === Base Typography & Body Styles === */
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* === Headings & Text Elements === */
h1,
h2,
h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1rem;
}

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

/* === Layout Primitives === */
.container {
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
}

/* === Accessibility Utilities === */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-strong);
  color: #fff;
  padding: 0.6rem 0.85rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
}

.skip-link:focus-visible {
  left: 0;
}

/* === Site Header & Navigation === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 244, 239, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 4.2rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.nav-list a {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--soft);
}

.nav-list .nav-link--support {
  border-color: #c6d8cf;
  background: #edf4f0;
}

/* === Hero Section === */
.hero {
  padding: 3rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 1.3rem;
  align-items: center;
}

.hero-grid--single {
  grid-template-columns: 1fr;
}

.hero-text {
  max-width: 60ch;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-strong);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-1px);
}

.cta-button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cta-button--primary:hover,
.cta-button--primary:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.cta-button--secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.cta-button--secondary:hover,
.cta-button--secondary:focus-visible {
  background: var(--soft);
}

.hero-visual {
  margin: 0;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hero-visual svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* === Section Layouts & Background Variants === */
.section {
  padding: 2.1rem 0;
}

.section--soft {
  background: var(--section-soft);
}

.section--mist {
  background: var(--section-mist);
}

.section--cluster-a {
  background: #edf3f0;
}

.section--cluster-b {
  background: #e6eeea;
}

.section-shell {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.section-header {
  margin-bottom: 1rem;
}

.section-header .section-intro {
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.45;
  margin-bottom: 0;
}

/* === Grid Systems === */
.section-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* === Card Components === */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.mission-card p:last-child,
.contact-card p:last-child,
.support-card p:last-child,
.step-card p:last-child {
  margin-bottom: 0;
}

.support-note {
  color: var(--muted);
}

/* === Lists & Content Helpers === */
.check-list {
  margin: 0;
  padding-left: 1rem;
}

.check-list li + li {
  margin-top: 0.45rem;
}

.card ul {
  max-width: 40ch;
}

.get-food-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.hero-image {
  background: #f1e6dd;
  border: 1px solid #e2d8cf;
  border-radius: var(--radius);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.get-food-image {
  background: #f3e7df;
  border: 1px dashed #d9c7bb;
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.get-food-image p {
  margin: 0;
  color: var(--muted);
}

.get-food-image img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  display: block;
}

.section-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: block;
}

/* ---------------------------------------
   Services: De-emphasized media
---------------------------------------- */
.service-media {
  max-width: 100%;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface-soft, #f4f7f5);
}

.service-media img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  opacity: 0.85;
  filter: saturate(0.9);
  display: block;
}

@media (min-width: 900px) {
  .service-media img {
    max-height: 120px;
  }
}

/* ---------------------------------------
   Services: alternating image layout
---------------------------------------- */
#services .card--odd,
#services .card--even {
  display: flex;
  flex-direction: column;
}

#services .card--odd .service-media {
  order: -1;
  margin-bottom: 0.5rem;
}

#services .card--even h3 {
  order: 0;
}

#services .card--even .service-media {
  order: 1;
  margin-top: 0.5rem;
}

#services .card--even p {
  order: 2;
}

/* ---------------------------------------
   Services: subtle grayscale on hover
   desktop only
---------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  #services .service-media img {
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
  }

  #services .service-media img:hover {
    filter: grayscale(0);
  }
}

.service-card h3,
.card h3 {
  margin-top: 0.25rem;
}

.service-card p,
.card p {
  margin-top: 0.25rem;
}

.story-quote {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--line);
  border-radius: 0 10px 10px 0;
  background: #f6ede6;
}

.story-quote p {
  margin: 0 0 0.45rem;
}

.story-quote footer {
  color: var(--muted);
  font-size: 0.95rem;
}

.impact-value {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  line-height: 1.1;
  font-weight: 700;
}

.impact-label {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.social-strip {
  text-align: center;
}

.social-strip h2 {
  margin-bottom: 0.9rem;
}

.social-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 6px 16px rgba(160, 120, 90, 0.08);
}

.btn-social i {
  font-size: 1rem;
}

.btn-social:hover,
.btn-social:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(160, 120, 90, 0.18);
}

.btn-social--instagram:hover,
.btn-social--instagram:focus-visible {
  color: #c13584;
  border-color: #c13584;
}

.btn-social--facebook:hover,
.btn-social--facebook:focus-visible {
  color: #1877f2;
  border-color: #1877f2;
}

/* === Process / Steps Component === */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.text-link {
  font-weight: 700;
  text-underline-offset: 2px;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

/* === Responsive Adjustments === */
@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .contact-grid,
  .get-food-layout,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.3rem;
  }
}

@media (max-width: 700px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 0;
  }

  .nav-list {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .section-shell {
    padding: 0.95rem;
  }

  .social-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-social {
    width: 100%;
  }
}
