/*
Theme Name: The Number Within
Description: The Moonlit Almanac, a spiritual guide to angel numbers, mirror hours and personal numerology.
Version: 4.0.1
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: the-number-within
*/

@font-face {
    font-family: "Bodoni Moda";
    src: url("fonts/BodoniModa.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("fonts/DMSans.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
}

:root {
    --pine: #142d26;
    --pine-deep: #0d211b;
    --paper: #f3efe4;
    --chalk: #faf6ec;
    --ink: #182b25;
    --muted: #456053;
    --accent: #9e442f;
    --copper: #cd8b66;
    --peach: #e9a982;
    --line: #cdcec0;
    --serif: "Bodoni Moda", Georgia, serif;
    --sans: "DM Sans", system-ui, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem / 1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:disabled { cursor: not-allowed; }
a { color: var(--accent); text-underline-offset: .23em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
:is(.tnw-header, .tnw-footer, .tnw-home-hero) :focus-visible { outline-color: var(--peach); }

h1, h2, h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 540;
    font-variation-settings: "opsz" 15;
    line-height: 1.06;
    letter-spacing: -.045em;
    overflow-wrap: break-word;
}
h1 { font-size: clamp(2.8rem, 6.6vw, 5.9rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.7rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; color: var(--muted); }
p:last-child { margin-bottom: 0; }
main { min-height: 56vh; }

.tnw-shell { width: min(1336px, calc(100% - 104px)); margin-inline: auto; }
.tnw-reading { width: min(100%, 720px); margin-inline: auto; }
.tnw-lead { max-width: 38rem; font-size: clamp(1.04rem, 1.5vw, 1.26rem); }
.tnw-kicker {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .81rem;
    font-weight: 750;
}
.tnw-kicker::before { content: ""; width: 1.45rem; height: 1px; background: currentColor; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
.tnw-skip {
    position: fixed;
    z-index: 100000;
    top: .5rem;
    left: .5rem;
    transform: translateY(-160%);
    background: var(--peach);
    color: var(--pine-deep);
    padding: .55rem 1rem;
}
.tnw-skip:focus { transform: none; }

.tnw-button, .tnw-menu-button {
    display: inline-flex;
    gap: .72rem;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    padding: .66rem 1.16rem;
    border: 1px solid var(--pine);
    border-radius: .15rem;
    background: var(--pine);
    color: var(--chalk);
    text-decoration: none;
    text-align: center;
    font-size: .94rem;
    font-weight: 680;
    line-height: 1.35;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.tnw-button:hover { background: #27483b; border-color: #27483b; }
.tnw-button-outline, .tnw-button-secondary {
    border-color: #728377;
    background: transparent;
    color: var(--pine);
}
.tnw-button-outline:hover, .tnw-button-secondary:hover {
    border-color: var(--pine);
    background: #dce2d2;
}
.tnw-text-link {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #bd8e78;
    text-underline-offset: .36rem;
}
.tnw-text-link:hover { color: var(--ink); text-decoration-color: currentColor; }

.tnw-header, .tnw-footer {
    background: var(--pine-deep);
    color: var(--chalk);
}
.tnw-header { border-bottom: 1px solid #385147; }
.tnw-header-row, .tnw-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.tnw-header-row { min-height: 76px; }
.tnw-wordmark {
    display: inline-flex;
    align-items: center;
    gap: .72rem;
    flex: 0 0 auto;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    font: 560 1.56rem / 1.1 var(--serif);
    font-variation-settings: "opsz" 14;
    letter-spacing: -.04em;
}
.tnw-mark {
    display: block;
    width: 1.4rem;
    height: 1.43rem;
    flex: 0 0 1.4rem;
    background: var(--peach);
    clip-path: polygon(8% 63%, 25% 51%, 25% 85%, 8% 97%, 8% 63%, 40% 37%, 57% 25%, 57% 72%, 40% 84%, 40% 37%, 72% 13%, 89% 1%, 89% 57%, 72% 69%, 72% 13%, 8% 63%);
}
.tnw-nav, .tnw-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(1.05rem, 3.2vw, 3rem);
}
.tnw-nav a, .tnw-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #e1e3d5;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 560;
}
.tnw-nav a:hover, .tnw-nav [aria-current="page"], .tnw-footer-links a:hover {
    color: var(--peach);
    text-decoration: underline;
    text-underline-offset: .42rem;
}
.tnw-header-action, .tnw-menu-button {
    border-color: #7a8a7a;
    background: transparent;
    color: var(--chalk);
}
.tnw-header-action:hover, .tnw-menu-button:hover {
    border-color: var(--peach);
    background: #31473c;
}
.tnw-menu-button { display: none; }
.tnw-footer { border-top: 1px solid #37534a; }
.tnw-footer-row { min-height: 130px; flex-wrap: wrap; padding-block: 1.2rem; }

.tnw-search {
    display: flex;
    width: min(100%, 550px);
    padding: .29rem;
    gap: .25rem;
    border: 1px solid #a7ac9b;
    border-radius: .2rem;
    background: var(--chalk);
}
.tnw-search input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .55rem .8rem;
    border: 0;
    background: transparent;
    color: var(--ink);
}
.tnw-search input::placeholder { color: #526359; opacity: 1; }
.tnw-search .tnw-button { flex: 0 0 auto; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
