/*
 * Yunara — shared stylesheet
 *
 * Everything inherits from docs/brand.md. If you're about to change a color,
 * typeface, or voice rule here, change brand.md first, then propagate.
 */

:root {
    /* Brand palette — from docs/brand.md */
    --bg:            #FAF8F3;  /* warm off-white */
    --text:          #1A1A1A;  /* near-black (not pure black) */
    --accent:        #5C6B47;  /* deep olive */
    --accent-muted:  #9CA88F;  /* sage */
    --rule:          #E5E0D6;  /* hairline dividers, slightly darker than bg */

    /* Typography scale */
    --font:          "Fraunces", Georgia, "Times New Roman", serif;
    --body-size:     18px;
    --body-size-sm:  16px;
    --line-height:   1.55;
    --measure:       36rem;    /* max reading width (~660px) */
    --wide:          72rem;    /* max layout width for nav/footer */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--body-size);
    -webkit-text-size-adjust: 100%;
}

@media (max-width: 640px) {
    html { font-size: var(--body-size-sm); }
}

body {
    font-family: var(--font);
    font-weight: 300;
    font-variation-settings: "opsz" 14, "SOFT" 0, "WONK" 0;
    line-height: var(--line-height);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── Layout primitives ─────────────────────────────────────────────── */

.container {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 640px) {
    .container { padding: 0 1.5rem; }
}

.measure {
    max-width: var(--measure);
}

/* ── Header ────────────────────────────────────────────────────────── */

header {
    padding: 2.5rem 0 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
}

.wordmark {
    font-family: var(--font);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    color: var(--text);
    text-decoration: none;
}

.wordmark::before {
    content: "·";
    color: var(--accent);
    margin-right: 0.3em;
    font-size: 1.3em;
    line-height: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 120ms ease;
}

nav a:hover {
    border-bottom-color: var(--accent);
}

nav a[aria-current="page"] {
    border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
    nav ul { gap: 1.25rem; }
    nav a { font-size: 0.875rem; }
}

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero {
    padding: 8rem 0 6rem;
}

.hero h1 {
    font-family: var(--font);
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 22ch;
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.125rem;
    max-width: var(--measure);
}

@media (max-width: 640px) {
    .hero { padding: 4rem 0 3rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
}

/* ── Sections ──────────────────────────────────────────────────────── */

section {
    padding: 4rem 0;
}

section + section {
    border-top: 1px solid var(--rule);
}

section.container {
    padding-left: 2rem;
    padding-right: 2rem;
}

section h2 {
    font-family: var(--font);
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
    color: var(--accent);
}

section h3 {
    font-family: var(--font);
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

section p {
    max-width: var(--measure);
    margin-bottom: 1.25rem;
}

section p:last-child {
    margin-bottom: 0;
}

/* Page title — smaller than hero, used on inner pages */
.page-title {
    padding: 6rem 0 2rem;
}

.page-title h1 {
    font-family: var(--font);
    font-weight: 500;
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

.page-title p {
    font-size: 1.125rem;
    max-width: var(--measure);
    color: var(--text);
}

@media (max-width: 640px) {
    .page-title { padding: 3rem 0 2rem; }
    .page-title h1 { font-size: 2rem; }
}

/* ── Process steps (how-we-work) ───────────────────────────────────── */

.step {
    margin-bottom: 3rem;
    max-width: var(--measure);
}

.step:last-child { margin-bottom: 0; }

.step-number {
    display: block;
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.step h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.005em;
}

.step p {
    margin-bottom: 0.75rem;
}

/* ── Links in body text ────────────────────────────────────────────── */

p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-muted);
    padding-bottom: 1px;
    transition: border-color 120ms ease;
}

p a:hover {
    border-bottom-color: var(--accent);
}

/* ── Contact block ─────────────────────────────────────────────────── */

.contact-cta {
    margin-top: 3rem;
}

.contact-email {
    display: inline-block;
    font-family: var(--font);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 3px;
    margin-top: 0.5rem;
}

.contact-email:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .contact-email { font-size: 1.25rem; }
}

/* ── Footer ────────────────────────────────────────────────────────── */

footer {
    padding: 4rem 0 3rem;
    margin-top: 6rem;
    border-top: 1px solid var(--rule);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--accent-muted);
}

footer a {
    color: var(--accent-muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent);
}

/* ── Selection ─────────────────────────────────────────────────────── */

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ── Utility: no JS, focus ring ────────────────────────────────────── */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
