/*
Theme Name: ATQS Newsletter Gateway
Theme URI: https://atqs-transmission.com/
Author: A THEORY OF QUIET SIGNALS
Description: Minimal pre-launch theme for the ATQS mailing-list subscription and service pages.
Version: 1.0.0
Requires at least: 6.1
Requires PHP: 7.0
Text Domain: atqs-newsletter
*/

/*
 * ATQS Newsletter Gateway
 * No external fonts, JavaScript, analytics, or tracking resources.
 */

:root {
    --atqs-background: #ffffff;
    --atqs-foreground: #000000;
    --atqs-muted: #555555;
    --atqs-border: #d8d8d8;
    --atqs-page-width: 74rem;
    --atqs-reading-width: 42rem;
    --atqs-page-padding: clamp(1.25rem, 4vw, 4rem);
    --atqs-font-sans:
        "Helvetica Neue",
        Helvetica,
        Arial,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

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

html {
    min-height: 100%;
    color-scheme: light;
    background: var(--atqs-background);
    color: var(--atqs-foreground);
    font-family: var(--atqs-font-sans);
    font-size: 100%;
    line-height: 1.65;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--atqs-background);
    color: var(--atqs-foreground);
    font-family: var(--atqs-font-sans);
    font-size: clamp(1.125rem, 1.3vw, 1.25rem);
    font-weight: 400;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.22em;
}

a:hover {
    text-decoration-thickness: 0.13em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 0.15rem solid currentColor;
    outline-offset: 0.25rem;
}

.atqs-site-header,
.atqs-main,
.atqs-site-footer {
    width: min(100%, var(--atqs-page-width));
    margin-inline: auto;
    padding-inline: var(--atqs-page-padding);
}

.atqs-site-header {
    display: flex;
    justify-content: center;
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

.atqs-wordmark {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.19em;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.atqs-main {
    padding-block:
        clamp(3rem, 8vw, 7rem)
        clamp(5rem, 11vw, 9rem);
}

.atqs-panel {
    width: min(100%, var(--atqs-reading-width));
    margin-inline: auto;
    text-align: center;
}

.atqs-eyebrow {
    margin: 0 0 1.25rem;
    color: var(--atqs-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}

.atqs-title {
    max-width: 14ch;
    margin: 0 auto 2rem;
    font-size: clamp(2.15rem, 7vw, 4.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.02;
    text-wrap: balance;
}

.atqs-title--service {
    max-width: 18ch;
    font-size: clamp(2rem, 6vw, 4rem);
}

.atqs-lead {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.55;
    text-wrap: pretty;
}

.atqs-copy {
    margin-top: 1.25rem;
    text-wrap: pretty;
}

.atqs-subscription-form,
.atqs-service-content,
.atqs-page-content {
    margin-top: clamp(2.5rem, 6vw, 4rem);
}

.atqs-service-content > :first-child,
.atqs-page-content > :first-child {
    margin-top: 0;
}

.atqs-service-content > :last-child,
.atqs-page-content > :last-child {
    margin-bottom: 0;
}

.atqs-service-content p,
.atqs-page-content p {
    margin-block: 0;
    text-wrap: pretty;
}

.atqs-service-content p + p,
.atqs-page-content p + p {
    margin-top: 1.25rem;
}

.atqs-fine-print {
    max-width: 38rem;
    margin: 1.5rem auto 0;
    color: var(--atqs-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.atqs-site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    border-top: 0.06rem solid var(--atqs-border);
    padding-block: 1.75rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.atqs-site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.atqs-site-footer p {
    margin: 0;
}

/* Newsletter Plugin forms and service controls */

.tnp,
.tnp-subscription,
.tnp-subscription-minimal,
.tnp-profile,
.tnp-unsubscribe,
.newsletter-subscription {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    color: var(--atqs-foreground) !important;
    font-family: var(--atqs-font-sans) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-align: left;
}

.tnp form,
.newsletter-subscription {
    margin: 0 !important;
}

.tnp-field,
.newsletter-field {
    margin: 0 0 1.4rem !important;
}

.tnp-field label,
.tnp-label,
.newsletter-label {
    display: block;
    margin: 0 0 0.55rem !important;
    color: var(--atqs-foreground) !important;
    font-family: var(--atqs-font-sans) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em;
    line-height: 1.4 !important;
    text-transform: uppercase;
}

.tnp input[type="text"],
.tnp input[type="email"],
.tnp input[type="url"],
.tnp input[type="password"],
.tnp select,
.tnp textarea,
.newsletter-subscription input[type="text"],
.newsletter-subscription input[type="email"],
.newsletter-subscription select,
.newsletter-subscription textarea {
    display: block;
    width: 100% !important;
    min-height: 3.35rem;
    margin: 0 !important;
    padding: 0.85rem 1rem !important;
    border: 0.08rem solid var(--atqs-foreground) !important;
    border-radius: 0 !important;
    background: var(--atqs-background) !important;
    box-shadow: none !important;
    color: var(--atqs-foreground) !important;
    font-family: var(--atqs-font-sans) !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
}

.tnp input::placeholder,
.newsletter-subscription input::placeholder {
    color: #777777;
    opacity: 1;
}

.tnp input[type="checkbox"],
.newsletter-subscription input[type="checkbox"] {
    width: 1.1rem !important;
    height: 1.1rem !important;
    margin: 0.22rem 0.65rem 0 0 !important;
    accent-color: var(--atqs-foreground);
    vertical-align: top;
}

.tnp-field-privacy,
.tnp-privacy-field {
    color: var(--atqs-muted);
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
}

.tnp-field-privacy label,
.tnp-privacy-field label {
    display: inline !important;
    margin: 0 !important;
    color: var(--atqs-muted) !important;
    font-size: inherit !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    line-height: inherit !important;
    text-transform: none !important;
}

.tnp input[type="submit"],
.tnp button,
.newsletter-subscription input[type="submit"],
.atqs-service-content input[type="submit"],
.atqs-service-content button,
.atqs-service-content .button,
.atqs-page-content .button {
    display: inline-block !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.9rem 1.25rem !important;
    border: 0.08rem solid var(--atqs-foreground) !important;
    border-radius: 0 !important;
    background: var(--atqs-background) !important;
    box-shadow: none !important;
    color: var(--atqs-foreground) !important;
    cursor: pointer;
    font-family: var(--atqs-font-sans) !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em;
    line-height: 1.3 !important;
    text-decoration: none !important;
    text-transform: uppercase;
}

.tnp input[type="submit"]:hover,
.tnp button:hover,
.newsletter-subscription input[type="submit"]:hover,
.atqs-service-content input[type="submit"]:hover,
.atqs-service-content button:hover,
.atqs-service-content .button:hover,
.atqs-page-content .button:hover {
    background: var(--atqs-foreground) !important;
    color: var(--atqs-background) !important;
}

.tnp-field-submit {
    margin-top: 2rem !important;
    margin-bottom: 0 !important;
    text-align: center;
}

/* Messages generated by Newsletter can be plain text, paragraphs, or forms. */

.atqs-service-content {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.65;
}

.atqs-service-content form {
    margin-top: 2rem !important;
    text-align: center;
}

.atqs-service-content a:not(.button) {
    overflow-wrap: anywhere;
}

.atqs-service-content .tnp,
.atqs-service-content .newsletter-subscription {
    font-size: 1rem !important;
}

/* WordPress-generated content and admin-only edit links. */

.post-edit-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--atqs-muted);
    font-size: 0.75rem;
}

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

@media (max-width: 40rem) {
    body {
        font-size: 1.125rem;
    }

    .atqs-site-header {
        justify-content: center;
    }

    .atqs-main {
        padding-top: 2.25rem;
    }

    .atqs-title {
        max-width: 12ch;
    }

    .atqs-site-footer {
        flex-direction: column;
    }

    .tnp input[type="submit"],
    .tnp button,
    .newsletter-subscription input[type="submit"],
    .atqs-service-content input[type="submit"],
    .atqs-service-content button {
        width: 100% !important;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
