/* ============================================================
   adelash.dev — shared design system
   The visual language for every site in the family.
   Site-specific chrome (nav/footer) styles live with their components.
   ============================================================ */

:root {
    --bg: #FAF7F2;
    --bg-elevated: #F2EDE4;
    --ink: #0F1A2E;
    --ink-soft: #3A4658;
    --ink-faint: #6B7585;
    --rule: #D7CFC3;
    --accent: #E63946;
    --accent-deep: #B82D38;
    --good: #2A9D5F;

    --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --font-body: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "Geist Mono", "SF Mono", Menlo, monospace;

    --maxw: 1180px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Paper texture overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

main,
header,
footer {
    position: relative;
    z-index: 2;
}

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

img {
    max-width: 100%;
    display: block;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 500;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0 0 0.5em;
    color: var(--ink);
}

h1 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 400;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 450;
}

h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 500;
    font-variation-settings: "opsz" 72, "SOFT" 30;
}

p {
    margin: 0 0 1em;
    color: var(--ink-soft);
    max-width: 65ch;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1.25rem;
}

.accent {
    color: var(--accent);
}

/* ---- Layout primitives ---- */
.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

section {
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-head {
    margin-bottom: 3rem;
    max-width: 720px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 180ms ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule);
}

.btn-ghost:hover {
    border-color: var(--ink);
    background: var(--bg-elevated);
}

.btn .arrow {
    transition: transform 200ms;
}

.btn:hover .arrow {
    transform: translateX(3px);
}

/* ---- Shared nav shell ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(250, 247, 242, 0.85);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid var(--rule);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.brand-logo {
    height: 26px;
    width: auto;
    display: block;
}

.brand-word {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 2.25rem);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a {
    position: relative;
    color: var(--ink-soft);
    transition: color 150ms;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-links a.active {
    color: var(--ink);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* ---- Shared footer shell ---- */
footer {
    border-top: 1px solid var(--rule);
    padding: 3rem 0 2.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 700px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.footer-tag {
    font-size: 0.9rem;
    color: var(--ink-faint);
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 0.9rem;
    font-weight: 500;
}

.footer-col a {
    display: block;
    color: var(--ink-soft);
    font-size: 0.95rem;
    padding: 0.2rem 0;
    transition: color 150ms;
}

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

.footer-rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2.5rem 0 1.5rem;
}

.footer-small {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* ---- Shared: project / content cards ---- */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 1.75rem;
}

/* ---- Shared: tech pills ---- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--rule);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}

/* ---- Shared: prose ---- */
.prose {
    max-width: 680px;
}

.prose p {
    font-size: 1.05rem;
    margin-bottom: 1.3em;
}

.prose h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.prose ul {
    padding-left: 1.2em;
    margin: 0 0 1.5em;
    color: var(--ink-soft);
}

.prose li {
    margin-bottom: 0.5em;
    font-size: 1rem;
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

.prose a:hover {
    color: var(--accent-deep);
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-elevated);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--rule);
    color: var(--ink);
}

/* ---- Page hero (shared) ---- */
.page-hero {
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---- Wordmark brand (adelash hub) ---- */
.brand-ash {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    font-variation-settings: "opsz" 72, "SOFT" 30;
}

/* ---- Blog brand suffix ---- */
.brand-suffix {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-left: 0.15rem;
    align-self: center;
}

/* ---- Logo-only nav brand (slightly larger when there's no text beside it) ---- */
.brand-logo-lg {
    height: 30px;
}

/* ============================================================
   Imagery — placeholders + real photos
   ============================================================ */
.media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--bg-elevated);
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Editorial duotone wash — keeps photos on-brand regardless of source.
   Sits over the image, tints it toward navy + a hint of accent. */
.media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 26, 46, 0.05) 0%,
            rgba(15, 26, 46, 0.28) 100%);
    pointer-events: none;
}

/* Aspect ratio variants */
.media-wide {
    aspect-ratio: 16 / 9;
}

.media-hero {
    aspect-ratio: 4 / 5;
}

.media-strip {
    aspect-ratio: 21 / 9;
}

/* Placeholder state — shown until you drop a real image in.
   Add class "is-placeholder" to .media and it renders a labeled frame. */
.media.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(45deg,
            var(--bg-elevated),
            var(--bg-elevated) 12px,
            #ECE5D9 12px,
            #ECE5D9 24px);
}

.media.is-placeholder::after {
    display: none;
}

.media-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    background: var(--bg);
    border: 1px solid var(--rule);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
}

/* Small caption under an image, editorial style */
.media-caption {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    margin-top: 0.6rem;
}