﻿  /* =====================================================================
     1. DESIGN TOKENS
     Every color and font in the site is defined once, here, as a CSS
     custom property (variable). Change a value here and it updates
     everywhere it's used — this is the single most useful habit for
     a client site you'll be handing off or revisiting later.
     Palette is pulled straight from the Eastside logo.
     ===================================================================== */
  :root {
    /* --- Logo palette --- */
    --teal:        #2C9C86; /* the tall central figure + "Baptist Church" text */
    --teal-dark:   #1E7563; /* hover/pressed states, derived from --teal */
    --teal-tint:   #E4F3EF; /* very light teal, for soft section backgrounds */
    --charcoal:    #3A3A3C; /* the dark figure */
    --gray-mid:    #8C8C8E; /* the mid figure */
    --gray-light:  #C9C9CB; /* the ellipse / light figure */
    --ink:         #1B1B1D; /* near-black, main text (softer than pure #000) */

    /* --- Neutral surface --- */
    --paper:       #FBFAF8; /* warm off-white page background */
    --paper-raised:#FFFFFF; /* cards / raised surfaces */
    --line:        #E4E2DD; /* hairline borders */

    /* --- Type --- */
    --font-display: "Fraunces", Georgia, serif;
    --font-body:    "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;

    /* --- Rhythm --- */
    --radius: 14px;
    --shadow: 0 12px 28px -14px rgba(27, 27, 29, 0.22);
  }

  /* =====================================================================
     2. RESET & BASE
     ===================================================================== */
  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  img { max-width: 100%; display: block; }
  a { color: inherit; }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
  }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--ink);
  }

  .container {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 24px;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal-dark);
  }
  .eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--teal);
    display: inline-block;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .btn:hover { transform: translateY(-2px); }
  .btn-primary { background: var(--teal); color: #fff; }
  .btn-primary:hover { background: var(--teal-dark); }
  .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
  .btn-ghost:hover { border-color: var(--charcoal); }
  .btn-on-dark { background: #fff; color: var(--charcoal); }
  .btn-on-dark:hover { background: var(--teal-tint); }
  .btn-ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
  .btn-ghost-on-dark:hover { border-color: #fff; }

  section { position: relative; }

  /* =====================================================================
     3. SIGNATURE MOTIF — the "orbit line"
     The Eastside logo has the three figures leaping through a gray
     ellipse/ring. That ring becomes this site's recurring signature:
     a single sweeping arc, reused (at different sizes/rotations) as a
     backdrop and as a section divider, instead of generic straight
     hairlines. It's the one visual idea the whole page hangs on.
     ===================================================================== */
  .orbit-svg { position: absolute; z-index: 0; pointer-events: none; }

  .hero-logo-backdrop { object-fit: contain; }
  @media (max-width: 760px) {
    .hero-logo-backdrop { display: none; }
  }

  /* =====================================================================
     4. HEADER / NAV
     ===================================================================== */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 250, 248, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 12px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }
  .brand img { height: 42px; width: 42px; object-fit: contain; }
  .brand-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.18rem;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .brand-word span { color: var(--teal); }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
  }
  .nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--charcoal);
    padding-block: 6px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .nav-links a:hover { color: var(--teal-dark); border-color: var(--teal); }

  .nav-cta { display: flex; align-items: center; gap: 14px; }

  .menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 5px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  @media (max-width: 860px) {
    .nav-links {
      position: absolute;
      top: 100%; left: 0; right: 0;
      background: var(--paper-raised);
      border-bottom: 1px solid var(--line);
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      padding: 12px 24px 20px;
      display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; padding-block: 12px; }
    .menu-toggle { display: block; }
    .nav-cta .btn-ghost { display: none; }
  }

  /* =====================================================================
     5. HERO
     ===================================================================== */
  .hero {
    overflow: hidden;
    background: linear-gradient(180deg, #F3F6F5 0%, var(--paper) 72%);
  }
  .hero-inner {
    position: relative;
    z-index: 1;
    padding-block: 88px 96px;
    display: grid;
    gap: 28px;
    max-width: 760px;
  }
  .hero h1 {
    font-size: clamp(2.5rem, 5.4vw, 3.9rem);
    margin-top: 18px;
  }
  .hero h1 em {
    font-style: italic;
    color: var(--teal-dark);
  }
  .hero-lede {
    font-size: 1.14rem;
    color: #4B4B4D;
    max-width: 56ch;
  }
  .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

  .hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
  }
  .hero-fact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--charcoal);
  }
  .hero-fact .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

  /* =====================================================================
     6. SERVICE TIMES STRIP
     ===================================================================== */
  .times-strip {
    background: var(--charcoal);
    color: #fff;
  }
  .times-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .times-cell {
    padding: 30px 26px;
    text-align: center;
    border-left: 1px solid rgba(255,255,255,0.12);
  }
  .times-cell:first-child { border-left: none; }
  .times-cell .label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-light);
  }
  .times-cell .time {
    font-family: var(--font-display);
    font-size: 1.7rem;
    margin-top: 8px;
  }
  .times-cell .day { color: #C6C6C8; font-size: 0.88rem; margin-top: 4px; }

  @media (max-width: 700px) {
    .times-grid { grid-template-columns: 1fr; }
    .times-cell { border-left: none; border-top: 1px solid rgba(255,255,255,0.12); }
    .times-cell:first-child { border-top: none; }
  }

  /* =====================================================================
     7. WELCOME / PASTOR
     ===================================================================== */
  .welcome {
    padding-block: 100px;
    overflow: hidden;
  }
  .welcome-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: center;
  }
  .pastor-photo {
    aspect-ratio: 4 / 5;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    object-fit: cover;
    object-position: top center;
    box-shadow: var(--shadow);
  }
  .welcome h2 { font-size: clamp(2rem, 3.6vw, 2.6rem); margin-top: 14px; }
  .welcome p { margin-top: 18px; color: #46464A; max-width: 56ch; }
  .welcome .signoff { margin-top: 26px; font-family: var(--font-display); font-style: italic; color: var(--charcoal); font-size: 1.1rem; }

  @media (max-width: 860px) {
    .welcome-grid { grid-template-columns: 1fr; gap: 34px; }
    .pastor-photo { max-width: 320px; }
  }

  /* =====================================================================
     8. MINISTRIES — three columns, echoing the three figures in the logo
     ===================================================================== */
  .ministries {
    padding-block: 100px;
    background: var(--paper-raised);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .section-head { max-width: 640px; margin-bottom: 52px; }
  .section-head h2 { font-size: clamp(2rem, 3.6vw, 2.6rem); margin-top: 14px; }
  .section-head p { color: #46464A; margin-top: 14px; }

  .ministry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
  .ministry-card {
    padding: 34px 28px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .ministry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .ministry-mark {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
  }
  .ministry-card h3 { font-size: 1.28rem; margin-bottom: 10px; }
  .ministry-card p { color: #55555A; font-size: 0.96rem; }
  .ministry-card .when { display: block; margin-top: 16px; font-weight: 700; font-size: 0.85rem; color: var(--charcoal); }

  .m-kids .ministry-mark   { background: var(--teal); }
  .m-youth .ministry-mark  { background: var(--charcoal); }
  .m-adults .ministry-mark { background: var(--gray-mid); }

  @media (max-width: 860px) {
    .ministry-grid { grid-template-columns: 1fr; }
  }

  /* =====================================================================
     9. SERMONS
     ===================================================================== */
  .sermons { padding-block: 100px; }
  .sermons-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 52px;
    flex-wrap: wrap;
  }
  .sermons-head h2 { font-size: clamp(2rem, 3.6vw, 2.6rem); margin-top: 14px; }

  .sermon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
  .sermon-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper-raised);
  }
  .sermon-art {
    aspect-ratio: 16/10;
    background: linear-gradient(140deg, var(--charcoal), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sermon-art svg { width: 46px; height: 46px; }
  .sermon-art-video { position: relative; background: var(--charcoal); }
  .sermon-art-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
  .sermon-body { padding: 22px 22px 26px; }
  .sermon-date { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); }
  .sermon-card h3 { font-size: 1.14rem; margin-top: 8px; }
  .sermon-card p { color: #5B5B5F; font-size: 0.92rem; margin-top: 8px; }
  .sermon-card a { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--teal-dark); text-decoration: none; }
  .sermon-card a:hover { text-decoration: underline; }

  @media (max-width: 860px) {
    .sermon-grid { grid-template-columns: 1fr; }
  }

  /* =====================================================================
     10. VISIT / CONTACT
     ===================================================================== */
  .visit {
    padding-block: 100px;
    background: var(--charcoal);
    color: #fff;
    overflow: hidden;
    position: relative;
  }
  .visit::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('../images/Worship_01.jpg') center/cover no-repeat;
    opacity: 0.22;
  }
  .visit-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .visit .eyebrow { color: var(--gray-light); }
  .visit .eyebrow::before { background: var(--teal); }
  .visit h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.6rem); margin-top: 14px; }
  .visit p { color: #D6D6D8; margin-top: 14px; max-width: 50ch; }

  .visit-detail {
    display: flex;
    gap: 14px;
    margin-top: 24px;
  }
  .visit-detail .k { width: 20px; flex-shrink: 0; color: var(--teal); margin-top: 3px; }
  .visit-detail .v strong { display: block; font-size: 0.98rem; }
  .visit-detail .v span { color: #C6C6C8; font-size: 0.9rem; }

  .visit-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

  .contact-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius);
    padding: 32px;
  }
  .contact-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
  .contact-card .sub { color: #C6C6C8; font-size: 0.9rem; margin-bottom: 22px; }
  .field { margin-bottom: 16px; }
  .field label { display: block; font-size: 0.82rem; font-weight: 700; color: #D6D6D8; margin-bottom: 6px; }
  .field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
  }
  .field input::placeholder, .field textarea::placeholder { color: #9B9B9E; }
  .field textarea { resize: vertical; min-height: 96px; }
  .contact-card .btn-primary { width: 100%; margin-top: 4px; }
  .form-note { font-size: 0.8rem; color: #9B9B9E; margin-top: 12px; }

  @media (max-width: 860px) {
    .visit-grid { grid-template-columns: 1fr; gap: 44px; }
  }

  /* =====================================================================
     10b. VISIT-DETAIL MODAL
     ===================================================================== */
  .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(27, 27, 29, 0.55);
    backdrop-filter: blur(2px);
  }
  .modal-overlay[hidden] { display: none; }

  .modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--paper-raised);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    animation: modal-in 0.18s ease;
  }
  @keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  .modal-card h3 { font-size: 1.35rem; padding-right: 24px; }
  .modal-card .sub { color: var(--gray-mid); font-size: 0.92rem; margin-top: 8px; }

  .modal-card .visit-detail:first-of-type { margin-top: 26px; }
  .modal-card .visit-detail .v span { color: var(--gray-mid); }

  .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--gray-mid);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .modal-close:hover { background: var(--teal-tint); color: var(--charcoal); }

  .modal-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; }

  /* =====================================================================
     11. FOOTER
     ===================================================================== */
  .site-footer { padding-block: 40px; }
  .footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: #6C6C70;
  }
  .footer-brand { display: flex; align-items: center; gap: 10px; }
  .footer-brand img { height: 26px; width: 26px; object-fit: contain; }
  .footer-links { display: flex; gap: 22px; list-style: none; }
  .footer-links a { text-decoration: none; color: #6C6C70; font-weight: 600; }
  .footer-links a:hover { color: var(--teal-dark); }

  /* =====================================================================
     12. SCROLL REVEAL (small, restrained — see script at bottom)
     ===================================================================== */
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
