/* ============================================
   GLOBAL STYLES — consumes tokens.css.
   No raw hex/shadow/radius here: every value is a token. A few literal
   px remain ONLY for non-design-system primitives (hairline border
   widths; micro transform offsets used as motion choreography; gradient
   geometry; bespoke content max-widths in the P4-bound hero). See P1 notes.
   ============================================ */

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

/* Brand color/type/spacing tokens now live in tokens.css (loaded first). */

html {
    scroll-behavior: smooth;
    /* Clip horizontal overflow at the viewport so the off-canvas mobile
       drawer (a fixed, right-translated panel) never creates a horizontal
       scrollbar or widens the layout. Pairs with body's overflow-x.
       `clip` (not `hidden`) because `overflow:hidden` turns the element
       into a scroll container, which breaks `position: sticky` (the home
       pinned-stage). `clip` clips identically without that side effect;
       `hidden` stays as the fallback for browsers without `clip`. */
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: var(--lh-body);
    overflow-x: hidden;
    overflow-x: clip;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--dur-base) var(--ease-soft);
}

/* ============================================
   CONTAINER
   ============================================ */

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

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: var(--space-11) 0;
    position: relative;
}

.section.light-bg {
    background: var(--bg-alt);
}

/* ============================================
   SECTION TITLES & SUBTITLES
   Headings are solid --text (the pink lives in surrounding gradients,
   the dot, and underlines). Opt into a pink gradient with .dd-text-gradient.
   ============================================ */

.section-title {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    line-height: var(--lh-tight);
    text-align: center;
    margin-bottom: var(--space-10);
    color: var(--text);
}

.section-title.left-aligned {
    text-align: left;
}

.section-title.smaller {
    font-size: var(--fs-h2);
}

.section-large-text {
    font-size: var(--fs-lead);
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--space-10);
    font-weight: 400;
}

.section-subtitle {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    line-height: var(--lh-tight);
    margin-top: 1.25em;
    margin-bottom: 0.75em;
    color: var(--text);
}

.section-subtitle-2 {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    margin-top: 1.25em;
    margin-bottom: 0.75em;
    color: var(--text-muted);
}

.section-subtext {
    font-size: var(--fs-lead);
    color: var(--text-muted);
    font-weight: 400;
}

.section-subtext-2 {
    font-size: var(--fs-lead);
    color: var(--text-muted);
    font-weight: 400;
}

.section-list {
    color: var(--text-muted);
    font-size: var(--fs-lead);
    margin-left: 3em;
}

div.section-columns {
    display: flex;
    justify-content: center;
    gap: var(--space-7);
    margin-top: var(--space-9);
}

div.section-column {
    width: 50%;
    border: 1px solid var(--coral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    transition: transform var(--dur-slow) var(--ease-dreamy),
                border-color var(--dur-slow) var(--ease-dreamy);
}

div.section-column:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.section-column .section-subtitle-2 {
    margin-top: 0em;
}

div.section-image {
    width: 100%;
    display: flex;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1em;
    box-shadow: var(--shadow-lg);
    height: 30vh;
}

img.section-image {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-pill);
    font-size: var(--fs-body);
    font-weight: 600;
    text-transform: lowercase;
    cursor: pointer;
    border: none;
    transition: transform var(--dur-base) var(--ease-dreamy),
                box-shadow var(--dur-base) var(--ease-dreamy),
                background-color var(--dur-base) var(--ease-soft),
                border-color var(--dur-base) var(--ease-soft),
                color var(--dur-base) var(--ease-soft);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--text-on-coral) 12%, transparent);
    transform: translate(-50%, -50%);
    transition: width var(--dur-page) var(--ease-soft),
                height var(--dur-page) var(--ease-soft);
}

.btn:hover::before {
    width: 300px;   /* ripple diameter (motion choreography) */
    height: 300px;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-coral);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--tint-soft);
    border-color: var(--accent);
    color: var(--text-on-coral);
    transform: translateY(-2px);
}

.btn-tertiary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--glass-border);
}

.btn-tertiary:hover {
    background: var(--tint-soft);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.btn-wide {
    width: 100%;
}

.btn-center {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* ============================================
   UTILITIES — dreamy background, grain, gradient text
   ============================================ */

/* One intentional pink-gradient text accent (e.g. a single hero word).
   Headings are otherwise solid --text. */
.dd-text-gradient {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Fine static film grain overlay — unifies the softness. Place as the
   topmost layer of a section/hero; pointer-events:none so it never blocks. */
.dd-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.04;
    mix-blend-mode: multiply;
    z-index: var(--z-base);
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-fade-in {
    animation: fadeInUp var(--dur-page) var(--ease-dreamy);
}

.animate-fade-in-delay {
    animation: fadeInUp var(--dur-page) var(--ease-dreamy) 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp var(--dur-page) var(--ease-dreamy) 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DREAMY BACKGROUND
   A soft mesh of drifting coral + peach glow blobs, behind a grain
   overlay. Replaces the old flat coral radial. `.bg-animation` kept as
   an alias until pages migrate to `.dd-dreamy-bg`.
   ============================================ */

.bg-animation,
.dd-dreamy-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(40% 50% at 18% 28%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 62%),
        radial-gradient(46% 56% at 84% 76%, color-mix(in srgb, var(--peach-200) 32%, transparent) 0%, transparent 62%),
        radial-gradient(34% 44% at 62% 12%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 58%);
    animation: bgDrift 26s var(--ease-soft) infinite alternate;
    z-index: var(--z-behind);
}

@keyframes bgDrift {
    from {
        opacity: 0.85;
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        opacity: 1;
        transform: translate3d(0, -2%, 0) scale(1.06);
    }
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-13) var(--space-8) var(--space-11);
    text-align: center;
    background-image: url('https://dreamsdemos-image-files.b-cdn.net/dreamsdemos_Studio%20Exterior%202%400.5x.webp');
}

.hero-content {
    max-width: 900px;   /* bespoke content measure (P4 hero redo) */
    padding: 1em;
    border-radius: var(--radius-xl);
    background: var(--scrim);
    box-shadow: 0 0 3em 3em var(--scrim);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-8);
    color: var(--text-on-coral);
}

.hero-subtitle {
    font-size: var(--fs-lead);
    font-weight: 600;
    color: var(--text-on-coral);
    margin-bottom: var(--space-5);
    letter-spacing: var(--tracking-wide);
    text-transform: lowercase;
}

.hero-text {
    font-size: var(--fs-lead);
    line-height: var(--lh-body);
    color: var(--text-on-coral);
    margin-bottom: var(--space-8);
    max-width: 800px;   /* bespoke content measure (P4 hero redo) */
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--space-5);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   IMAGE DIVIDERS
   ============================================ */

.image-divider {
    height: 40vh;
    position: relative;

    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow: clip;
}

.image-divider-bottom::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 20%);
}

.image-divider-norm::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
}

/* Full-bleed divider photo + focal-point modifiers (promoted from home.css
   so the home + service pages share them instead of inline styles). */
.image-divider > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-divider--pos-35 > img { object-position: 50% 35%; }
.image-divider--pos-40 > img { object-position: 50% 40%; }
.image-divider--pos-60 > img { object-position: 50% 60%; }
.image-divider--pos-70 > img { object-position: 50% 70%; }
.image-divider--pos-75 > img { object-position: 50% 75%; }
.image-divider--pos-85 > img { object-position: 50% 85%; }
.image-divider--pos-bottom > img { object-position: 50% 100%; }

.image-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--paper) 10%, transparent);
}

/* ============================================
   RESPONSIVE - 768PX & BELOW
   ============================================ */

@media (max-width: 768px) {
    .hero {
        padding: var(--space-13) var(--space-5) var(--space-10);
    }

    .section {
        padding: var(--space-10) 0;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .container {
        padding: 0 var(--space-5);
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
        height: 100vh;
    }

    .hero-content {
        margin-bottom: var(--space-11);
    }

    .hero-content h2 {
        font-size: var(--fs-lead);
        margin-bottom: var(--space-8);
    }

    .hero-content h1 {
        margin-bottom: var(--space-10);
    }

    .hero-title {
        font-size: var(--fs-h2);
    }

    .hero-buttons {
        gap: var(--space-2);
    }

    .hero-buttons a {
        font-size: var(--fs-small);
        width: 65%;
        margin: 0 auto;
    }
}

/* ============================================
   REDUCED MOTION — disable the animated grain/background + entrances.
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .bg-animation,
    .dd-dreamy-bg {
        animation: none;
    }

    .animate-fade-in,
    .animate-fade-in-delay,
    .animate-fade-in-delay-2 {
        animation: none;
    }
}
