/* =========================================================================
   DYWORK OFFICIAL — BASE STYLES
   Reset, typography, layout primitives, header/footer, and the built-in
   homepage section styling. All colors/fonts reference the tokens in
   style.css so the whole site stays in sync with the Figma brand.
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--dw-bg);
    color: var(--dw-fg);
    font-family: var(--dw-font-body);
    font-size: var(--dw-fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { opacity: .75; }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.05; font-weight: 400; }

.dw-display,
.dw-hero h1 {
    font-family: var(--dw-font-display);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.01em;
}

h1 { font-size: var(--dw-fs-h1); font-family: var(--dw-font-display); }
h2 { font-size: var(--dw-fs-h2); font-family: var(--dw-font-display); }
h3 { font-size: var(--dw-fs-h3); font-family: var(--dw-font-head); letter-spacing: .02em; text-transform: uppercase; }

p { margin: 0 0 1.15em; }

.dw-eyebrow,
.dw-label {
    font-family: var(--dw-font-head);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: var(--dw-fs-eyebrow);
    line-height: 1.2;
}

/* ---- Layout primitives ---- */
.dw-container { width: 100%; max-width: var(--dw-content-width); margin-inline: auto; padding-inline: var(--dw-gutter); }
.dw-container--wide { max-width: var(--dw-wide-width); }
.dw-section { padding-block: var(--dw-section-y); }
.dw-section--dark { background: var(--dw-bg-dark); color: var(--dw-fg-on-dark); }
.dw-section--wine { background: var(--dw-wine); color: var(--dw-fg-on-dark); }
.dw-section--cream { background: var(--dw-cream); color: var(--dw-ink); }
.dw-center { text-align: center; }
.dw-measure { max-width: 62ch; margin-inline: auto; }

/* ---- Buttons ---- */
.dw-btn {
    display: inline-block;
    font-family: var(--dw-font-head);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 1.05rem;
    line-height: 1;
    padding: 1.05em 2.4em;
    border: 1.5px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: var(--dw-radius);
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.dw-btn:hover { opacity: 1; }
.dw-btn--solid { background: var(--dw-cream); color: var(--dw-ink); border-color: var(--dw-cream); }
.dw-btn--solid:hover { background: transparent; color: var(--dw-cream); }
.dw-btn--ink { background: var(--dw-ink); color: var(--dw-cream); border-color: var(--dw-ink); }
.dw-btn--ink:hover { background: transparent; color: var(--dw-ink); }
.dw-btn--wine { background: var(--dw-wine); color: var(--dw-cream); border-color: var(--dw-wine); }

/* =========================================================================
   HEADER
   ========================================================================= */
.dw-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--dw-wine-deep);
    color: var(--dw-cream);
    border-bottom: 1px solid var(--dw-line-on-dark);
}
.dw-header__bar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--dw-space-3);
    min-height: 72px;
}
.dw-brand {
    font-family: var(--dw-font-display);
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    line-height: 1; letter-spacing: .01em;
    white-space: nowrap;
}
.dw-brand img { max-height: 42px; width: auto; }
.dw-nav { display: flex; align-items: center; }
.dw-nav ul { list-style: none; display: flex; gap: clamp(1rem, 2vw, 2.2rem); margin: 0; padding: 0; }
.dw-nav a {
    font-family: var(--dw-font-head);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 1.15rem;
}
.dw-header__actions { display: flex; align-items: center; gap: var(--dw-space-3); }
.dw-cart-link { font-family: var(--dw-font-head); letter-spacing: .06em; text-transform: uppercase; display: inline-flex; gap: .4em; align-items: center; }
.dw-cart-count {
    background: var(--dw-cream); color: var(--dw-wine-deep);
    border-radius: 999px; min-width: 1.5em; height: 1.5em; padding: 0 .4em;
    display: inline-grid; place-items: center; font-family: var(--dw-font-accent); font-size: .8rem; font-weight: 600;
}
.dw-menu-toggle { display: none; background: none; border: 0; color: inherit; font-size: 1.6rem; cursor: pointer; }

/* mobile nav */
@media (max-width: 900px) {
    .dw-menu-toggle { display: inline-block; }
    .dw-nav {
        position: absolute; inset: 100% 0 auto 0;
        background: var(--dw-wine-deep);
        border-bottom: 1px solid var(--dw-line-on-dark);
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .dw-nav.is-open { max-height: 70vh; }
    .dw-nav ul { flex-direction: column; padding: var(--dw-space-3) var(--dw-gutter); gap: var(--dw-space-2); }
}

/* =========================================================================
   HOMEPAGE — built-in demo sections (used when no static front page is set)
   ========================================================================= */
.dw-hero {
    background: var(--dw-wine-deep);
    color: var(--dw-cream);
    text-align: center;
    padding-block: clamp(3rem, 7vw, 6rem);
    overflow: hidden;
}
.dw-hero__brand {
    font-family: var(--dw-font-display);
    font-size: clamp(3.5rem, 13vw, 13rem);
    line-height: .82;
    margin: 0 0 clamp(1.5rem, 4vw, 3rem);
}
.dw-hero__media { margin: 0 auto clamp(1.5rem,4vw,3rem); max-width: 1100px; }
.dw-hero__media img { width: 100%; object-fit: cover; }
.dw-hero h1 { font-size: var(--dw-fs-display); margin: 0 auto; max-width: 16ch; }

.dw-intro { background: var(--dw-wine); color: var(--dw-cream); text-align: center; }
.dw-intro h2 { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: var(--dw-space-3); }
.dw-intro p { font-family: var(--dw-font-head); letter-spacing: .03em; font-size: clamp(1.05rem,1.6vw,1.4rem); line-height: 1.5; max-width: 70ch; margin-inline: auto; }

.dw-grid-section { background: var(--dw-wine); color: var(--dw-cream); }
.dw-grid-section .dw-eyebrow { text-align: center; display: block; margin-bottom: var(--dw-space-4); }

.dw-founder { background: var(--dw-cream); color: var(--dw-ink); }
.dw-founder__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,5rem); align-items: center; }
.dw-founder h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
.dw-founder__media img { width: 100%; }
@media (max-width: 860px){ .dw-founder__inner{ grid-template-columns: 1fr; } }

.dw-quote { background: var(--dw-wine-deep); color: var(--dw-cream); text-align: center; }
.dw-quote blockquote {
    font-family: var(--dw-font-display);
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    line-height: 1.1; margin: 0 auto; max-width: 22ch;
}
.dw-quote cite { display: block; margin-top: var(--dw-space-3); font-style: normal; font-family: var(--dw-font-head); letter-spacing: .1em; text-transform: uppercase; font-size: 1.05rem; }

.dw-seenon { background: var(--dw-cream); color: var(--dw-ink); text-align: center; }
.dw-seenon h3 { letter-spacing: .18em; margin-bottom: var(--dw-space-4); }
.dw-seenon__logos { display: flex; flex-wrap: wrap; gap: clamp(1.5rem,4vw,4rem); align-items: center; justify-content: center; opacity: .8; }
.dw-seenon__logos span { font-family: var(--dw-font-head); text-transform: uppercase; letter-spacing: .1em; font-size: clamp(1.1rem,2vw,1.6rem); }

.dw-movement { background: var(--dw-wine); color: var(--dw-cream); text-align: center; }
.dw-movement h2 { font-size: clamp(2.4rem, 6vw, 5rem); max-width: 18ch; margin-inline: auto; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.dw-footer { background: var(--dw-wine-deep); color: var(--dw-cream); padding-block: var(--dw-space-5) var(--dw-space-3); }
.dw-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--dw-space-4); align-items: start; }
.dw-footer__brand { font-family: var(--dw-font-display); font-size: clamp(2rem,4vw,3rem); line-height: 1; }
.dw-footer__news h4 { font-family: var(--dw-font-head); text-transform: uppercase; letter-spacing: .1em; font-size: 1.2rem; margin-bottom: var(--dw-space-2); }
.dw-footer__news form { display: flex; gap: .5rem; flex-wrap: wrap; }
.dw-footer__news input[type=email] {
    flex: 1 1 200px; background: transparent; border: 1px solid var(--dw-line-on-dark);
    color: var(--dw-cream); padding: .9em 1em; font-family: var(--dw-font-body); border-radius: var(--dw-radius);
}
.dw-footer__news input::placeholder { color: rgba(249,246,239,.55); }
.dw-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dw-footer nav a { font-family: var(--dw-font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; }
.dw-footer__social { font-family: var(--dw-font-head); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(1.4rem,3vw,2.5rem); margin-top: var(--dw-space-4); text-align: center; }
.dw-footer__bottom { margin-top: var(--dw-space-4); padding-top: var(--dw-space-3); border-top: 1px solid var(--dw-line-on-dark); text-align: center; font-size: var(--dw-fs-small); opacity: .8; }
@media (max-width: 760px){ .dw-footer__top{ grid-template-columns: 1fr; } }

/* =========================================================================
   GENERIC CONTENT (posts/pages without Elementor)
   ========================================================================= */
.dw-page-header { background: var(--dw-wine-deep); color: var(--dw-cream); padding-block: var(--dw-space-5); text-align: center; }
.dw-page-header h1 { font-size: clamp(2.5rem,6vw,5rem); margin: 0; }
.dw-entry { padding-block: var(--dw-section-y); }
.dw-entry .dw-container { max-width: 820px; }
.dw-entry h2, .dw-entry h3 { margin-top: 1.5em; }
.dw-entry img { margin-block: 1.5em; }
.dw-post-card { border-bottom: 1px solid var(--dw-line); padding-block: var(--dw-space-3); }
.dw-post-card h2 { font-size: var(--dw-fs-h3); }
.dw-post-card .dw-meta { font-family: var(--dw-font-head); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; opacity: .7; }

.dw-pagination { display: flex; gap: .5rem; justify-content: center; margin-top: var(--dw-space-4); }
.dw-pagination .page-numbers { font-family: var(--dw-font-head); padding: .5em .9em; border: 1px solid var(--dw-line); }
.dw-pagination .current { background: var(--dw-wine); color: var(--dw-cream); border-color: var(--dw-wine); }

/* Accessibility */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--dw-accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--dw-cream); color: var(--dw-ink); padding: .6em 1em; z-index: 999; }

@media (prefers-reduced-motion: reduce){ *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
