/*
 * TradeVest Securities
 * Global Base Styles
 *
 * @package TradeVest_Securities
 */


/* =========================================================
   1. DOCUMENT FOUNDATION
   ========================================================= */

html {
    margin: 0;
    padding: 0;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    padding: 0;

    background: var(--tv-white);
    color: var(--tv-text);

    font-family: var(--tv-font-primary);
    font-size: var(--tv-text-base);
    font-weight: var(--tv-weight-regular);
    line-height: 1.7;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    overflow-wrap: break-word;
}


/* =========================================================
   2. BOX SIZING
   ========================================================= */

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


/* =========================================================
   3. MEDIA
   ========================================================= */

img,
svg,
video,
iframe {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

figure {
    margin: 0;
}


/* =========================================================
   4. LINKS
   ========================================================= */

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   5. FORM FOUNDATION
   ========================================================= */

button,
input,
textarea,
select {
    margin: 0;
    font: inherit;
}

button {
    border: 0;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

input,
textarea,
select {
    max-width: 100%;
}


/* =========================================================
   6. FOCUS STATES
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
}


/* =========================================================
   7. TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;

    color: var(--tv-navy);

    font-weight: var(--tv-weight-semibold);
    line-height: 1.15;
    letter-spacing: -0.025em;

    overflow-wrap: break-word;
}

h1 {
    font-size: var(--tv-text-hero);
}

h2 {
    font-size: var(--tv-text-3xl);
}

h3 {
    font-size: var(--tv-text-xl);
}

h4 {
    font-size: var(--tv-text-lg);
}

h5 {
    font-size: var(--tv-text-base);
}

h6 {
    font-size: var(--tv-text-sm);
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

strong,
b {
    font-weight: var(--tv-weight-semibold);
}

small {
    font-size: var(--tv-text-sm);
}


/* =========================================================
   8. LISTS
   ========================================================= */

ul,
ol {
    margin-top: 0;
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.25rem;
}

ol {
    padding-left: 1.5rem;
}


/* =========================================================
   9. CONTAINERS
   ========================================================= */

.tv-container,
.tv-container--narrow {
    width: min(calc(100% - 64px), var(--tv-container));
    margin-inline: auto;
}

.tv-container--narrow {
    width: min(calc(100% - 64px), var(--tv-container-narrow));
}


/* =========================================================
   10. GLOBAL SECTIONS
   ========================================================= */

.tv-section {
    position: relative;
    padding-block: var(--tv-space-10);
}

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

.tv-section--muted {
    background: var(--tv-bg-muted);
}

.tv-section--navy {
    background: var(--tv-navy);
    color: var(--tv-text-white);
}


/* =========================================================
   11. SECTION HEADER
   ========================================================= */

.tv-section__header {
    max-width: 760px;
    margin-inline: auto;
    margin-bottom: var(--tv-space-7);
    text-align: center;
}

.tv-section__header--center {
    text-align: center;
}

.tv-section__title {
    margin-bottom: 1rem;
}

.tv-section__description {
    max-width: 680px;
    margin: 0 auto;

    color: var(--tv-text-secondary);

    font-size: var(--tv-text-lg);
    line-height: 1.7;
}

.tv-section--navy .tv-section__title {
    color: var(--tv-white);
}

.tv-section--navy .tv-section__description {
    color: rgba(255, 255, 255, 0.72);
}


/* =========================================================
   12. EYEBROW
   ========================================================= */

.tv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 1rem;

    color: var(--tv-teal);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.tv-eyebrow::before {
    width: 22px;
    height: 1px;
    flex: 0 0 auto;

    background: currentColor;

    content: "";
}


/* =========================================================
   13. CONTENT LINKS
   ========================================================= */

.tv-content a:not(.tv-btn):not(.tv-site-logo) {
    color: var(--tv-teal);

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    transition: color var(--tv-transition-fast);
}

.tv-content a:not(.tv-btn):not(.tv-site-logo):hover {
    color: var(--tv-teal-dark);
}


/* =========================================================
   14. WORDPRESS CONTENT
   ========================================================= */

.wp-block-image {
    margin: 0 0 1.5rem;
}

.wp-block-image img {
    border-radius: var(--tv-radius-lg);
}

.wp-block-quote,
blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;

    background: var(--tv-bg-soft);

    border-left: 3px solid var(--tv-teal);
    border-radius: 0 var(--tv-radius-md) var(--tv-radius-md) 0;
}

.wp-block-quote p:last-child,
blockquote p:last-child {
    margin-bottom: 0;
}

.wp-block-separator,
hr {
    margin: 3rem 0;

    border: 0;
    border-top: 1px solid var(--tv-border);
}


/* =========================================================
   15. TABLES
   ========================================================= */

table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: collapse;
}

th,
td {
    padding: 0.85rem 1rem;

    border-bottom: 1px solid var(--tv-border);

    text-align: left;
    vertical-align: top;
}

th {
    color: var(--tv-navy);
    font-weight: var(--tv-weight-semibold);
}


/* =========================================================
   16. CODE
   ========================================================= */

code,
kbd,
samp {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: 0.9em;
}

code {
    padding: 0.15em 0.35em;

    background: var(--tv-bg-soft);
    border-radius: var(--tv-radius-sm);
}

pre {
    max-width: 100%;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;

    overflow-x: auto;

    background: var(--tv-navy);
    color: var(--tv-white);

    border-radius: var(--tv-radius-md);
}

pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}


/* =========================================================
   17. WORDPRESS ALIGNMENT
   ========================================================= */

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}


/* =========================================================
   18. WORDPRESS CAPTIONS
   ========================================================= */

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    margin-top: 0.5rem;

    color: var(--tv-text-light);
    font-size: var(--tv-text-sm);
}


/* =========================================================
   19. ACCESSIBILITY
   ========================================================= */

.screen-reader-text {
    position: absolute !important;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);

    white-space: nowrap;

    border: 0;
}

.screen-reader-text:focus {
    position: fixed !important;

    top: 12px;
    left: 12px;
    z-index: 999999;

    width: auto;
    height: auto;

    padding: 12px 16px;
    margin: 0;

    overflow: visible;

    clip: auto;
    clip-path: none;

    white-space: normal;

    background: var(--tv-white);
    color: var(--tv-navy);

    border: 2px solid var(--tv-teal);
    border-radius: var(--tv-radius-md);

    box-shadow: var(--tv-shadow-md);
}
