/* =========================================================
   DedSafe homepage styles
   ========================================================= */

/* Method 1: :has() selector — modern browsers */
body:has(.dedsafe-home) .container-header,
body:has(.dedsafe-home) .container-sidebar-right,
body:has(.dedsafe-home) .mod-breadcrumbs__wrapper,
body:has(.dedsafe-home) #system-message-container,
/* Method 2: class-based — works everywhere when JS adds .ds-home-page to <html> */
html.ds-home-page .container-header,
html.ds-home-page .container-sidebar-right,
html.ds-home-page .mod-breadcrumbs__wrapper,
html.ds-home-page #system-message-container { display: none !important; }

body:has(.dedsafe-home) .site-grid,
html.ds-home-page .site-grid {
    display: block !important;
    grid-template-columns: none !important;
}
body:has(.dedsafe-home) .container-component,
body:has(.dedsafe-home) main,
body:has(.dedsafe-home) .com-content-article,
body:has(.dedsafe-home) .com-content-article__body,
body:has(.dedsafe-home) .item-page,
html.ds-home-page .container-component,
html.ds-home-page main,
html.ds-home-page .com-content-article,
html.ds-home-page .com-content-article__body,
html.ds-home-page .item-page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    grid-column: 1 / -1 !important;
}
body:has(.dedsafe-home) .item-page > meta,
html.ds-home-page .item-page > meta { display: none; }

body:has(.dedsafe-home),
html.ds-home-page body {
    background: #FBF6EE !important;
    margin: 0 !important;
    padding: 0 !important;
}

html { scroll-behavior: smooth; }


        :root {
            --cream:  #FBF6EE;
            --paper:  #F5EFE3;
            --ink:    #2A2520;
            --ink-2:  #4A4239;
            --ink-3:  #7A6F62;
            --sage:   #8FA68E;
            --sage-d: #5E7560;
            --peach:  #E8B69F;
            --peach-d:#D4906F;
            --gold:   #D4A017;
            --logo-bg:#1F1A14;

            --serif: 'Cormorant Garamond', Georgia, serif;
            --sans:  'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;

            --radius:    14px;
            --radius-lg: 28px;
        }

        * { box-sizing: border-box; }

        .dedsafe-home-scope { scroll-behavior: smooth; }
.dedsafe-home {
            margin: 0;
            background: var(--cream);
            color: var(--ink);
            font-family: var(--sans);
            font-size: 17px;
            line-height: 1.65;
            font-weight: 400;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        /* Subtle paper texture overlay */
        .dedsafe-home::before {
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            opacity: 0.4;
            mix-blend-mode: multiply;
            background-image:
                radial-gradient(circle at 20% 30%, rgba(143, 166, 142, 0.06), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(232, 182, 159, 0.06), transparent 50%);
            z-index: 0;
        }

        a { color: var(--sage-d); text-decoration: none; transition: color 200ms ease; }
        a:hover { color: var(--ink); }

        /* ---------- Layout ---------- */
        .container {
            max-width: 1180px;
            margin: 0 auto;
            padding: 0 32px;
            position: relative;
            z-index: 1;
        }

        /* ---------- Top navigation ---------- */
        nav.top {
            padding: 28px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-family: var(--sans);
        }

        nav.top .brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-family: var(--serif);
            font-size: 26px;
            font-weight: 600;
            letter-spacing: -0.01em;
            color: var(--ink);
        }

        nav.top .brand-mark {
            width: 36px;
            height: 36px;
            background: var(--logo-bg);
            border-radius: 8px;
            display: grid;
            place-items: center;
            overflow: hidden;
        }

        nav.top .brand-mark img {
            width: 28px;
            height: 28px;
            object-fit: contain;
        }

        nav.top ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            gap: 36px;
            font-size: 15px;
            font-weight: 500;
        }

        nav.top ul a {
            color: var(--ink-2);
        }

        nav.top .actions {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        /* ---------- Buttons ---------- */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 13px 26px;
            border-radius: 100px;
            font-family: var(--sans);
            font-size: 15px;
            font-weight: 600;
            letter-spacing: 0.01em;
            text-decoration: none;
            border: none;
            cursor: pointer;
            transition: all 200ms ease;
            white-space: nowrap;
        }

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

        .btn-primary:hover {
            background: var(--sage-d);
            color: var(--cream);
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(42, 37, 32, 0.18);
        }

        .btn-ghost {
            background: transparent;
            color: var(--ink);
            border: 1.5px solid var(--ink-3);
        }

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

        .btn-arrow::after {
            content: '→';
            transition: transform 200ms ease;
        }

        .btn-arrow:hover::after {
            transform: translateX(4px);
        }

        /* ---------- Hero ---------- */
        section.hero {
            padding: 80px 0 100px;
            position: relative;
        }

        .hero-grid {
            display: grid;
            grid-template-columns: 380px 1fr;
            gap: 80px;
            align-items: center;
        }

        .hero-logo {
            background: var(--logo-bg);
            border-radius: var(--radius-lg);
            aspect-ratio: 1 / 1;
            display: grid;
            place-items: center;
            position: relative;
            overflow: hidden;
            box-shadow:
                0 30px 60px -20px rgba(42, 37, 32, 0.4),
                0 18px 36px -18px rgba(42, 37, 32, 0.25);
        }

        .hero-logo::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 30% 20%, rgba(212, 160, 23, 0.15), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(212, 160, 23, 0.08), transparent 50%);
        }

        .hero-logo img {
            width: 70%;
            height: 70%;
            object-fit: contain;
            position: relative;
            z-index: 1;
            filter: drop-shadow(0 0 30px rgba(212, 160, 23, 0.25));
            animation: gentle-glow 4s ease-in-out infinite;
        }

        @keyframes gentle-glow {
            0%, 100% { filter: drop-shadow(0 0 30px rgba(212, 160, 23, 0.25)); }
            50%      { filter: drop-shadow(0 0 45px rgba(212, 160, 23, 0.4)); }
        }

        .hero-content .eyebrow {
            font-family: var(--sans);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: var(--sage-d);
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .hero-content .eyebrow::before {
            content: '';
            width: 36px;
            height: 1.5px;
            background: var(--sage);
            display: inline-block;
        }

        .hero-content h1 {
            font-family: var(--serif);
            font-size: clamp(48px, 6vw, 78px);
            font-weight: 500;
            line-height: 1.02;
            letter-spacing: -0.02em;
            margin: 0 0 28px;
            color: var(--ink);
        }

        .hero-content h1 .italic {
            font-style: italic;
            font-weight: 400;
            color: var(--sage-d);
        }

        .hero-content .lede {
            font-size: 20px;
            line-height: 1.55;
            color: var(--ink-2);
            margin: 0 0 40px;
            max-width: 540px;
            font-weight: 400;
        }

        .hero-actions {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        /* ---------- The Promise (3 cards) ---------- */
        section.promise {
            padding: 80px 0;
        }

        .section-heading {
            text-align: center;
            margin-bottom: 64px;
        }

        .section-heading .eyebrow {
            font-family: var(--sans);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: var(--sage-d);
            margin-bottom: 16px;
        }

        .section-heading h2 {
            font-family: var(--serif);
            font-size: clamp(36px, 4vw, 52px);
            font-weight: 500;
            line-height: 1.1;
            letter-spacing: -0.015em;
            margin: 0;
            color: var(--ink);
            max-width: 720px;
            margin-inline: auto;
        }

        .section-heading h2 .italic {
            font-style: italic;
            color: var(--sage-d);
        }

        .promise-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .promise-card {
            background: var(--paper);
            border-radius: var(--radius-lg);
            padding: 40px 32px;
            border: 1px solid rgba(143, 166, 142, 0.18);
            transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
        }

        .promise-card:hover {
            transform: translateY(-4px);
            border-color: rgba(143, 166, 142, 0.4);
            box-shadow: 0 20px 40px -18px rgba(94, 117, 96, 0.18);
        }

        .promise-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            background: var(--cream);
            border: 1.5px solid var(--sage);
            display: grid;
            place-items: center;
            margin-bottom: 24px;
        }

        .promise-icon svg {
            width: 26px;
            height: 26px;
            stroke: var(--sage-d);
            stroke-width: 1.6;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .promise-card h3 {
            font-family: var(--serif);
            font-size: 26px;
            font-weight: 600;
            line-height: 1.2;
            margin: 0 0 14px;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .promise-card p {
            margin: 0;
            font-size: 16px;
            line-height: 1.6;
            color: var(--ink-2);
        }

        /* ---------- The Story (intimate panel) ---------- */
        section.story {
            padding: 100px 0;
        }

        .story-panel {
            background: linear-gradient(135deg, #F2DDC9 0%, #E8B69F 100%);
            border-radius: 36px;
            padding: 80px 80px;
            position: relative;
            overflow: hidden;
        }

        .story-panel::before {
            content: '"';
            position: absolute;
            top: -60px;
            left: 40px;
            font-family: var(--serif);
            font-size: 320px;
            line-height: 1;
            color: rgba(42, 37, 32, 0.08);
            font-weight: 600;
        }

        .story-content {
            position: relative;
            max-width: 740px;
            margin: 0 auto;
            text-align: center;
        }

        .story-content p {
            font-family: var(--serif);
            font-size: clamp(24px, 2.4vw, 32px);
            line-height: 1.4;
            font-weight: 400;
            color: var(--ink);
            margin: 0 0 28px;
            font-style: italic;
        }

        .story-content .attribution {
            font-family: var(--sans);
            font-size: 14px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--ink-2);
            font-weight: 500;
        }

        /* ---------- How it works (3 steps) ---------- */
        section.how {
            padding: 80px 0 100px;
        }

        .steps-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 48px;
            margin-top: 56px;
            position: relative;
        }

        .steps-grid::before {
            content: '';
            position: absolute;
            top: 36px;
            left: 12%;
            right: 12%;
            height: 1.5px;
            background: repeating-linear-gradient(
                to right,
                var(--sage) 0 6px,
                transparent 6px 14px
            );
            z-index: 0;
        }

        .step {
            text-align: center;
            position: relative;
            z-index: 1;
        }

        .step-number {
            width: 72px;
            height: 72px;
            border-radius: 50%;
            background: var(--cream);
            border: 2px solid var(--sage);
            display: grid;
            place-items: center;
            margin: 0 auto 24px;
            font-family: var(--serif);
            font-size: 32px;
            font-weight: 600;
            color: var(--sage-d);
            font-style: italic;
        }

        .step h3 {
            font-family: var(--serif);
            font-size: 24px;
            font-weight: 600;
            line-height: 1.25;
            margin: 0 0 12px;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .step p {
            margin: 0;
            font-size: 15.5px;
            line-height: 1.6;
            color: var(--ink-2);
            max-width: 280px;
            margin-inline: auto;
        }

        /* ---------- Footer CTA ---------- */
        section.cta {
            padding: 60px 0 120px;
        }

        .cta-box {
            background: var(--ink);
            color: var(--cream);
            border-radius: var(--radius-lg);
            padding: 72px 64px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .cta-box::before {
            content: '';
            position: absolute;
            top: -120px;
            right: -120px;
            width: 360px;
            height: 360px;
            background: radial-gradient(circle, rgba(212, 160, 23, 0.18), transparent 60%);
            border-radius: 50%;
        }

        .cta-box::after {
            content: '';
            position: absolute;
            bottom: -100px;
            left: -100px;
            width: 320px;
            height: 320px;
            background: radial-gradient(circle, rgba(143, 166, 142, 0.18), transparent 60%);
            border-radius: 50%;
        }

        .cta-box > * { position: relative; z-index: 1; }

        .cta-box h2 {
            font-family: var(--serif);
            font-size: clamp(34px, 4vw, 48px);
            font-weight: 500;
            line-height: 1.15;
            margin: 0 0 20px;
            letter-spacing: -0.015em;
        }

        .cta-box h2 .italic {
            font-style: italic;
            color: var(--peach);
        }

        .cta-box p {
            font-size: 18px;
            line-height: 1.55;
            color: rgba(251, 246, 238, 0.78);
            margin: 0 auto 36px;
            max-width: 520px;
        }

        .cta-box .btn-primary {
            background: var(--cream);
            color: var(--ink);
        }

        .cta-box .btn-primary:hover {
            background: var(--peach);
            color: var(--ink);
        }

        .cta-box .signin {
            margin-top: 22px;
            font-size: 14.5px;
            color: rgba(251, 246, 238, 0.66);
        }

        .cta-box .signin a {
            color: var(--peach);
            text-decoration: underline;
            text-decoration-color: rgba(232, 182, 159, 0.4);
            text-underline-offset: 4px;
        }

        .cta-box .signin a:hover {
            color: var(--cream);
            text-decoration-color: var(--cream);
        }

        /* ---------- Footer ---------- */
        footer {
            padding: 40px 0 60px;
            border-top: 1px solid rgba(122, 111, 98, 0.18);
        }

        .footer-grid {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 32px;
            flex-wrap: wrap;
        }

        .footer-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-family: var(--serif);
            font-size: 20px;
            font-weight: 500;
            color: var(--ink-2);
        }

        .footer-brand .brand-mark {
            width: 28px;
            height: 28px;
            background: var(--logo-bg);
            border-radius: 6px;
            display: grid;
            place-items: center;
            overflow: hidden;
        }

        .footer-brand .brand-mark img {
            width: 22px;
            height: 22px;
            object-fit: contain;
        }

        .footer-links {
            display: flex;
            gap: 28px;
            list-style: none;
            margin: 0;
            padding: 0;
            font-size: 14px;
        }

        .footer-links a {
            color: var(--ink-3);
        }

        .footer-meta {
            font-size: 13px;
            color: var(--ink-3);
        }

        /* ---------- Reveal animations ---------- */
        .reveal {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 700ms ease, transform 700ms ease;
        }

        .reveal.in {
            opacity: 1;
            transform: translateY(0);
        }

        .reveal-delay-1 { transition-delay: 100ms; }
        .reveal-delay-2 { transition-delay: 220ms; }
        .reveal-delay-3 { transition-delay: 340ms; }

        /* ---------- Responsive ---------- */
        @media (max-width: 960px) {
            .hero-grid {
                grid-template-columns: 1fr;
                gap: 48px;
                text-align: center;
            }
            .hero-logo {
                max-width: 320px;
                margin: 0 auto;
            }
            .hero-content .eyebrow {
                justify-content: center;
            }
            .hero-content .lede {
                margin-inline: auto;
            }
            .hero-actions {
                justify-content: center;
            }
            .promise-grid {
                grid-template-columns: 1fr;
            }
            .steps-grid {
                grid-template-columns: 1fr;
                gap: 40px;
            }
            .steps-grid::before {
                display: none;
            }
            .story-panel {
                padding: 56px 32px;
            }
            .cta-box {
                padding: 56px 32px;
            }
        }

        @media (max-width: 640px) {
            nav.top ul { display: none; }
            .container { padding: 0 20px; }
            section.hero { padding: 40px 0 70px; }
            section.promise,
            section.how { padding: 60px 0; }
            section.story { padding: 70px 0; }
            section.cta { padding: 40px 0 80px; }
            .footer-grid { flex-direction: column; text-align: center; }
        }
    