/*
Theme Name:   Tehama Together Child
Theme URI:    https://tehamatogether.org
Description:  Child theme for Tehama Together — brand tokens, typography, and accessibility styles.
Author:       Dennis Wyman
Author URI:   https://tehamatogether.org
Template:     hello-elementor
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  tehama-together-child
*/

/* ─────────────────────────────────────────────────────────────────────────────
   TEHAMA TOGETHER — BRAND TOKENS (CSS Custom Properties)
   These variables are the single source of truth for all brand colors, fonts,
   spacing, and effects. Reference them everywhere via var(--token-name).
   ───────────────────────────────────────────────────────────────────────────── */

:root {

    /* ── Color Palette ───────────────────────────────────────────────────── */
    --color-teal:         #1B6A7B;   /* Primary brand / headings / CTAs       */
    --color-teal-light:   #EAF4F6;   /* Tinted backgrounds / hover states      */
    --color-orange:       #E87722;   /* Accent / highlights / active buttons   */
    --color-orange-dark:  #CC6619;   /* Orange hover/active state              */
    --color-cream:        #FAF7F2;   /* Page background                        */
    --color-dark:         #1A1A2E;   /* Body text / dark section backgrounds   */
    --color-white:        #FFFFFF;   /* Card / panel backgrounds               */
    --color-gray:         #6B7280;   /* Captions / meta / supporting text      */
    --color-gray-light:   #E5E7EB;   /* Borders / dividers                     */
    --color-danger:       #DC2626;   /* Destructive actions / error states     */
    --color-success:      #16A34A;   /* Success / confirmation states          */

    /* ── Typography ─────────────────────────────────────────────────────── */
    --font-heading:       'Montserrat', sans-serif;
    --font-body:          'Open Sans', sans-serif;
    --font-mono:          'Courier New', Courier, monospace;

    /* ── Font Weights ────────────────────────────────────────────────────── */
    --fw-regular:         400;
    --fw-medium:          500;
    --fw-semibold:        600;
    --fw-bold:            700;
    --fw-extrabold:       800;

    /* ── Font Sizes (Base Scale) ─────────────────────────────────────────── */
    --fs-xs:              12px;
    --fs-sm:              13px;
    --fs-base:            16px;
    --fs-md:              18px;
    --fs-lg:              20px;
    --fs-xl:              24px;
    --fs-2xl:             28px;
    --fs-3xl:             36px;
    --fs-4xl:             48px;

    /* ── Line Heights ────────────────────────────────────────────────────── */
    --lh-tight:           1.2;
    --lh-snug:            1.4;
    --lh-normal:          1.6;
    --lh-relaxed:         1.75;

    /* ── Letter Spacing ──────────────────────────────────────────────────── */
    --ls-tight:          -0.5px;
    --ls-normal:          0px;
    --ls-wide:            0.5px;
    --ls-wider:           1px;
    --ls-widest:          1.5px;

    /* ── Border Radius ───────────────────────────────────────────────────── */
    --radius-sm:          4px;
    --radius-btn:         6px;
    --radius-card:        10px;
    --radius-pill:        9999px;

    /* ── Shadows ─────────────────────────────────────────────────────────── */
    --shadow-sm:          0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card:        0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md:          0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg:          0 8px 32px rgba(0, 0, 0, 0.16);

    /* ── Spacing Scale ───────────────────────────────────────────────────── */
    --space-xs:           8px;
    --space-sm:           16px;
    --space-md:           24px;
    --space-lg:           40px;
    --space-xl:           60px;
    --space-2xl:          80px;

    /* ── Transitions ─────────────────────────────────────────────────────── */
    --transition-fast:    0.1s ease;
    --transition-base:    0.2s ease;
    --transition-slow:    0.35s ease;

    /* ── Layout ──────────────────────────────────────────────────────────── */
    --max-width:          1140px;
    --content-width:      1100px;
    --sidebar-width:      300px;

}


/* ─────────────────────────────────────────────────────────────────────────────
   GLOBAL BASE STYLES
   ───────────────────────────────────────────────────────────────────────────── */

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

html {
    font-size: var(--fs-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    color: var(--color-dark);
    background-color: var(--color-cream);
    line-height: var(--lh-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY — HEADING SCALE
   ───────────────────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
    font-family: var(--font-heading);
    line-height: var(--lh-tight);
    color: var(--color-dark);
    margin-top: 0;
}

h1 { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--fs-3xl); font-weight: var(--fw-bold);      color: var(--color-teal); }
h3 { font-size: var(--fs-2xl); font-weight: var(--fw-semibold);  }
h4 { font-size: var(--fs-xl);  font-weight: var(--fw-semibold);  }
h5 { font-size: var(--fs-md);  font-weight: var(--fw-medium);    }
h6 { font-size: var(--fs-base);font-weight: var(--fw-medium);    }

p {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-relaxed);
    color: var(--color-dark);
    margin: 0 0 var(--space-sm);
}

/* Lead / intro paragraph */
.lead, .intro {
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
    color: var(--color-dark);
}

/* Caption / meta text */
.caption, .meta, small {
    font-size: var(--fs-sm);
    color: var(--color-gray);
    line-height: var(--lh-normal);
}

a {
    color: var(--color-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-base);
}
a:hover { color: var(--color-orange); }


/* ─────────────────────────────────────────────────────────────────────────────
   BUTTON SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Elementor Button Global Reset ───────────────────────────────────────── */
.elementor-button {
    font-family:    var(--font-heading);
    font-weight:    var(--fw-semibold);
    font-size:      14px;
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    border-radius:  var(--radius-btn);
    padding:        12px 28px;
    min-height:     44px;            /* WCAG 2.1 minimum touch target */
    display:        inline-flex;
    align-items:    center;
    justify-content:center;
    gap:            8px;
    cursor:         pointer;
    border:         none;
    transition:     background var(--transition-base),
                    color var(--transition-base),
                    transform var(--transition-fast),
                    box-shadow var(--transition-base);
}

.elementor-button:hover  { transform: translateY(-1px); }
.elementor-button:active { transform: translateY(0);    }

/* ── Primary (Orange) ────────────────────────────────────────────────────── */
.elementor-button-primary,
.btn-primary {
    background: var(--color-orange);
    color:      var(--color-white);
    border:     none;
}
.elementor-button-primary:hover,
.btn-primary:hover {
    background: var(--color-orange-dark);
    color:      var(--color-white);
}

/* ── Secondary (Teal) ────────────────────────────────────────────────────── */
.elementor-button-secondary,
.btn-secondary {
    background: var(--color-teal);
    color:      var(--color-white);
}
.elementor-button-secondary:hover,
.btn-secondary:hover {
    background: #145a69;
    color:      var(--color-white);
}

/* ── Outline / Ghost ─────────────────────────────────────────────────────── */
.btn-outline {
    background:  transparent;
    color:       var(--color-teal);
    border:      2px solid var(--color-teal);
}
.btn-outline:hover {
    background: var(--color-teal-light);
}

/* ── Ghost (for dark backgrounds) ───────────────────────────────────────── */
.btn-ghost {
    background: transparent;
    color:      var(--color-white);
    border:     2px solid var(--color-white);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.15);
}

/* ── Danger ──────────────────────────────────────────────────────────────── */
.btn-danger {
    background: var(--color-danger);
    color:      var(--color-white);
}
.btn-danger:hover { background: #b91c1c; }

/* ── Disabled state (all buttons) ────────────────────────────────────────── */
.elementor-button:disabled,
.elementor-button[disabled],
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity:  0.5;
    cursor:   not-allowed;
    transform: none;
}


/* ─────────────────────────────────────────────────────────────────────────────
   ACCESSIBILITY
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Visible focus ring for all interactive elements ─────────────────────── */
*:focus-visible {
    outline:        3px solid var(--color-teal);
    outline-offset: 3px;
    border-radius:  var(--radius-sm);
}

/* ── Skip Navigation Link ────────────────────────────────────────────────── */
.skip-link {
    position:   absolute;
    top:        -50px;
    left:       0;
    background: var(--color-teal);
    color:      var(--color-white);
    font-family:var(--font-heading);
    font-weight:var(--fw-semibold);
    font-size:  14px;
    padding:    10px 20px;
    z-index:    99999;
    border-radius: 0 0 var(--radius-btn) 0;
    transition: top var(--transition-base);
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Screen-reader only utility ──────────────────────────────────────────── */
.sr-only {
    position:   absolute;
    width:      1px;
    height:     1px;
    padding:    0;
    margin:     -1px;
    overflow:   hidden;
    clip:       rect(0, 0, 0, 0);
    white-space:nowrap;
    border:     0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   CARD COMPONENT
   ───────────────────────────────────────────────────────────────────────────── */

.tehama-card {
    background:     var(--color-white);
    border-radius:  var(--radius-card);
    box-shadow:     var(--shadow-card);
    overflow:       hidden;
    transition:     box-shadow var(--transition-base), transform var(--transition-base);
}
.tehama-card:hover {
    box-shadow: var(--shadow-md);
    transform:  translateY(-2px);
}
.tehama-card__body    { padding: var(--space-md); }
.tehama-card__title   { font-family: var(--font-heading); font-weight: var(--fw-bold); font-size: var(--fs-xl); color: var(--color-teal); margin: 0 0 var(--space-xs); }
.tehama-card__excerpt { font-size: var(--fs-base); color: var(--color-gray); line-height: var(--lh-relaxed); margin: 0 0 var(--space-sm); }


/* ─────────────────────────────────────────────────────────────────────────────
   SECTION UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */

.section-teal   { background-color: var(--color-teal);       color: var(--color-white); }
.section-cream  { background-color: var(--color-cream);      }
.section-light  { background-color: var(--color-teal-light); }
.section-dark   { background-color: var(--color-dark);       color: var(--color-white); }
.section-white  { background-color: var(--color-white);      }

.section-teal h1,
.section-teal h2,
.section-teal h3,
.section-dark h1,
.section-dark h2,
.section-dark h3 { color: var(--color-white); }


/* ─────────────────────────────────────────────────────────────────────────────
   LOGO
   ───────────────────────────────────────────────────────────────────────────── */

.site-logo img,
.elementor-site-logo img {
    min-width:  120px;    /* never scale below this */
    max-width:  200px;
    height:     auto;
}


/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────────── */

.site-footer,
.elementor-location-footer {
    background-color: var(--color-dark);
    color:            var(--color-white);
    padding:          var(--space-2xl) 0 var(--space-lg);
}

.site-footer h4,
.site-footer h5 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size:   var(--fs-md);
    color:       var(--color-white);
    margin:      0 0 var(--space-sm);
}

.site-footer a {
    font-family: var(--font-body);
    font-size:   14px;
    color:       var(--color-teal-light);
    text-decoration: none;
    transition:  color var(--transition-base);
}
.site-footer a:hover { color: var(--color-orange); }

.site-footer .copyright {
    font-size:   var(--fs-xs);
    color:       var(--color-gray);
    margin:      0;
}

.site-footer .footer-cta-link {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size:   14px;
    color:       var(--color-orange);
    text-decoration: none;
    letter-spacing: var(--ls-wide);
}
.site-footer .footer-cta-link:hover { color: var(--color-white); }


/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Tablet (768px – 1024px) ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    h1 { font-size: 38px; }
    h2 { font-size: 30px; }
    h3 { font-size: 24px; }
}

/* ── Mobile (≤ 767px) ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    h1 { font-size: 30px; }
    h2 { font-size: 26px; }
    h3 { font-size: 20px; }
    p  { font-size: 15px; }

    .elementor-button {
        width:      100%;
        justify-content: center;
    }

    .site-footer { padding: 48px 0 32px; }
}

