/* ==========================================================
   Trowbridge shared block styles
   Design tokens + shared pieces (container, eyebrow, buttons)
   used by every tb-* block in /blocks.
   ========================================================== */

:root {
    --tb-gold: #c99a3e;
    --tb-gold-dark: #b0832c;
    --tb-gold-text: #7f5f22; /* gold that passes 4.5:1 on white and cream, for text */
    --tb-bronze: #8c6a2e;
    --tb-ink: #1d1d1f;
    --tb-text: #5b5b5b;
    --tb-cream: #ece8e1;
    --tb-card: #f1efeb;
    --tb-line: #d9d5ce;
    --tb-white: #ffffff;
    --tb-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --tb-sans: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    --tb-container: 1320px;
    --tb-gutter: 30px;
}

/* Every tb block resets the theme's dark body colors */
.tb-block {
    background: var(--tb-white);
    color: var(--tb-text);
    font-family: var(--tb-sans);
    font-size: 15px;
    line-height: 1.7;
}
.tb-block *,
.tb-block *::before,
.tb-block *::after {
    box-sizing: border-box;
}
.tb-block img {
    display: block;
    max-width: 100%;
    height: auto;
}
.tb-block a {
    text-decoration: none;
}

/* Undo style.css's global heading and link rules (old serif font, capitalize,
   white/gold links). :where() keeps this at element specificity so
   every block class still wins. */
:where(.tb-block) :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--tb-serif);
    letter-spacing: 0;
    text-transform: none;
}
:where(.tb-block) a,
:where(.tb-block) a:hover {
    color: inherit;
}

.tb-container {
    width: 100%;
    max-width: calc(var(--tb-container) + (var(--tb-gutter) * 2));
    margin: 0 auto;
    padding: 0 var(--tb-gutter);
}

/* Headings */
.tb-heading {
    font-family: var(--tb-serif);
    font-weight: 500;
    color: var(--tb-ink);
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    margin: 0 0 22px;
}

/* Small gold uppercase label */
.tb-eyebrow {
    display: block;
    font-family: var(--tb-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tb-gold-text);
    margin: 0 0 10px;
}

/* Gold button */
.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--tb-gold);
    color: var(--tb-ink) !important;
    font-family: var(--tb-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    padding: 16px 26px;
    border: 0;
    border-radius: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.tb-btn:hover,
.tb-btn:focus {
    background: var(--tb-gold-dark);
    text-decoration: none;
    transform: translateY(-1px);
}
.tb-btn i {
    font-size: 10px;
}

/* Black button, white text */
.tb-btn--dark {
    background: var(--tb-ink);
    color: var(--tb-white) !important;
    padding: 18px 28px;
    box-shadow: none;
}
.tb-btn--dark:hover,
.tb-btn--dark:focus {
    background: var(--tb-gold);
    color: var(--tb-ink) !important;
}

/* Underlined uppercase text link */
.tb-text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tb-ink);
}
.tb-text-link i {
    font-size: 9px;
    transition: transform 0.2s ease;
}
.tb-text-link:hover {
    color: var(--tb-gold-text);
    text-decoration: none;
}
.tb-text-link:hover i {
    transform: translateX(3px);
}

.tb-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link: hidden until focused */
.tb-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100000;
    padding: 12px 20px;
    background: var(--tb-ink);
    color: var(--tb-white) !important;
    font-family: var(--tb-sans);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-120%);
}
.tb-skip-link:focus {
    transform: none;
}

/* Visible keyboard focus everywhere. currentColor always contrasts with
   the element's own background, so the ring shows on light and dark blocks. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
.tb-btn:focus-visible {
    outline-color: var(--tb-ink);
}
.tb-hero .tb-btn:focus-visible,
.tb-footer .tb-btn:focus-visible {
    outline-color: var(--tb-white);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Skip-link target: focusable so the jump works, but no ring on the whole page */
main[tabindex="-1"]:focus {
    outline: none;
}
