/*
 * Zen theme layer — loaded after screen.css.
 * Calm rice-paper backgrounds, sage accents, pebble-shaped cards,
 * pill buttons, an ensō motif in heroes and lotus section dividers.
 */

:root {
    --zen-paper: #f3efe4;
    --zen-paper-deep: #e9e1cf;
    --zen-sand: #d9ccb0;
    --zen-earth: #8b7355;
    --zen-earth-deep: #6b5a45;
    --zen-sage: #8a9a7b;
    --zen-sage-soft: #e4e9dc;
    --zen-sage-deep: #5f6f52;
    --zen-ink: #2f3a33;
    --zen-ink-soft: #4a554d;
    --zen-clay: #b98b73;
    --zen-shadow: 0 1px 2px rgb(47 58 51 / 0.04), 0 12px 32px -12px rgb(47 58 51 / 0.14);
    --zen-shadow-lift: 0 2px 4px rgb(47 58 51 / 0.05), 0 22px 44px -18px rgb(47 58 51 / 0.22);
    --zen-radius: 1.75rem;
    --zen-ease: cubic-bezier(.33, .8, .35, 1);

    /* Ensō brush circle and lotus, as inline SVG */
    --zen-enso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M150 42C128 22 90 18 62 36 30 57 22 104 44 138c22 33 70 44 104 24 30-18 42-55 30-88' fill='none' stroke='%238b7355' stroke-width='9' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E");
    --zen-lotus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32' fill='none' stroke='%238a9a7b' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M32 4c5 6 5 16 0 24-5-8-5-18 0-24z'/%3E%3Cpath d='M32 28c-3-8-9-14-17-15 1 8 8 14 17 15z'/%3E%3Cpath d='M32 28c3-8 9-14 17-15-1 8-8 14-17 15z'/%3E%3Cpath d='M32 28c-6-3-14-4-22-1 6 3 14 4 22 1zM32 28c6-3 14-4 22-1-6 3-14 4-22 1z'/%3E%3C/svg%3E");
    --zen-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

html { background-color: var(--zen-paper); }

body,
body.bg-gray-50 {
    background-color: var(--zen-paper);
    background-image: var(--zen-grain);
    color: var(--zen-ink);
    letter-spacing: .005em;
    -webkit-font-smoothing: antialiased;
}

body, h1, h2, h3, h4, h5, h6 { color: var(--zen-ink); }

h1, h2, h3 {
    font-weight: 500;
    letter-spacing: -.01em;
}

h1 { line-height: 1.15; }

p { line-height: 1.8; }

::selection { background: var(--zen-sage-soft); color: var(--zen-ink); }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--zen-sage);
    outline-offset: 3px;
    border-radius: .5rem;
}

blockquote {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.2em;
    line-height: 1.7;
}

/* Text tones */
.text-secondary-800 { color: var(--zen-ink); }
.text-secondary-700 { color: var(--zen-ink-soft); }
.text-secondary-600 { color: #5b655d; }
.text-primary-500 { color: var(--zen-earth); }
.text-primary-600 { color: var(--zen-earth-deep); }
.text-green-500 { color: var(--zen-sage); }
.text-red-500 { color: var(--zen-clay); }

/* ---------- Header ---------- */

header.sticky {
    background-color: rgb(243 239 228 / .82);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    box-shadow: none;
    border-bottom: 1px solid rgb(139 115 85 / .14);
}

header nav a {
    position: relative;
    letter-spacing: .04em;
}

header nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: .2rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--zen-sage);
    opacity: 0;
    transform: translateX(-50%) scale(.4);
    transition: opacity .4s var(--zen-ease), transform .4s var(--zen-ease);
}

header nav a:hover::after,
header nav a.text-primary-500::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

header .mobile-menu > div {
    background-color: var(--zen-paper);
    border-color: rgb(139 115 85 / .14);
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: 9999px;
    letter-spacing: .03em;
    font-weight: 500;
    transition: background-color .5s var(--zen-ease), color .5s var(--zen-ease),
                box-shadow .5s var(--zen-ease), transform .5s var(--zen-ease),
                border-color .5s var(--zen-ease);
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background-color: var(--zen-earth);
    box-shadow: 0 10px 24px -12px rgb(107 90 69 / .55);
}

.btn-primary:hover {
    background-color: var(--zen-sage-deep);
    box-shadow: 0 16px 30px -14px rgb(95 111 82 / .6);
}

.btn-secondary {
    border-width: 1.5px;
    border-color: rgb(139 115 85 / .55);
    color: var(--zen-earth-deep);
    background-color: rgb(255 255 255 / .35);
}

.btn-secondary:hover {
    background-color: var(--zen-earth);
    border-color: var(--zen-earth);
    color: #fff;
}

.btn-accent { background-color: var(--zen-sage); }
.btn-accent:hover { background-color: var(--zen-sage-deep); }

/* ---------- Sections & backgrounds ---------- */

.section { padding-top: 5.5rem; padding-bottom: 5.5rem; }
.section-sm { padding-top: 4rem; padding-bottom: 4rem; }
.section-lg { padding-top: 7rem; padding-bottom: 7rem; }

main > .section,
main > .section-sm,
main > .section-lg { position: relative; }

.bg-white { background-color: #fbf9f4; }
.bg-gray-50 { background-color: var(--zen-paper); }
.bg-primary-50 { background-color: var(--zen-paper-deep); }
.bg-green-50 { background-color: var(--zen-sage-soft); }

.bg-gradient-primary {
    background: radial-gradient(ellipse at 15% 0%, rgb(228 233 220 / .9), transparent 55%),
                radial-gradient(ellipse at 90% 100%, rgb(217 204 176 / .6), transparent 60%),
                var(--zen-paper);
}

.bg-gradient-secondary,
.bg-secondary-800 {
    background: radial-gradient(ellipse at 80% 0%, rgb(138 154 123 / .22), transparent 60%),
                linear-gradient(160deg, #36443b, #26302a);
}

.bg-gradient-accent { background: linear-gradient(135deg, var(--zen-sage), var(--zen-sage-deep)); }

/* Lotus divider above light sections that follow another section */
main > section.section.bg-white + section.section::before,
main > section.section.bg-gradient-primary + section.section.bg-white::before,
main > section.section.bg-primary-50 + section.section.bg-white::before,
main > section.section.bg-white + section.section-sm::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 64px;
    height: 32px;
    transform: translate(-50%, -50%);
    background: var(--zen-lotus) center / contain no-repeat;
    opacity: .85;
    pointer-events: none;
}

/* ---------- Hero ---------- */

.hero {
    min-height: 92vh;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(88vmin, 760px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: var(--zen-enso) center / contain no-repeat;
    opacity: .16;
    z-index: 0;
    pointer-events: none;
    animation: zenBreathe 9s ease-in-out infinite;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 9rem;
    background: linear-gradient(to bottom, transparent, rgb(251 249 244 / .95));
    z-index: 0;
    pointer-events: none;
}

.hero h1 {
    font-weight: 400;
    color: var(--zen-ink);
}

@media (min-width: 768px) {
    .hero h1 { font-size: 3.5rem; line-height: 1.12; }
}

.hero p { color: var(--zen-ink-soft); }

@keyframes zenBreathe {
    0%, 100% { transform: translate(-50%, -50%) scale(.96) rotate(0deg); opacity: .12; }
    50%      { transform: translate(-50%, -50%) scale(1.03) rotate(4deg); opacity: .2; }
}

/* ---------- Cards ---------- */

.card,
.testimonial-card {
    border-radius: var(--zen-radius);
    border: 1px solid rgb(139 115 85 / .12);
    background-color: rgb(255 255 255 / .72);
    box-shadow: var(--zen-shadow);
    transition: box-shadow .6s var(--zen-ease), transform .6s var(--zen-ease);
}

.card:hover,
.testimonial-card:hover {
    box-shadow: var(--zen-shadow-lift);
    transform: translateY(-3px);
}

.testimonial-card-image {
    border-top-left-radius: var(--zen-radius);
    border-top-right-radius: var(--zen-radius);
}

.testimonial-card blockquote,
.testimonial-card p { font-family: 'Crimson Text', Georgia, serif; font-size: 1.15rem; }

.testimonial-avatar { background-color: var(--zen-sage); }

/* Softer rounding on Tailwind's rounded utilities */
.rounded-lg { border-radius: 1rem; }
.rounded-xl { border-radius: 1.5rem; }
.rounded-2xl { border-radius: 2rem; }

/* Problem / solution: gentle tones instead of alarm red and bright green */
.problem-card,
.solution-card {
    border-left: none;
    border-radius: var(--zen-radius);
    padding: 2.5rem;
}

.problem-card {
    background: linear-gradient(160deg, #f6ece4, #efe2d6);
}

.solution-card {
    background: linear-gradient(160deg, #eef2e8, var(--zen-sage-soft));
}

/* ---------- CTA ---------- */

.cta-section {
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 6rem;
    /* Deep earth tones so white text and translucent panels keep AA contrast */
    background: radial-gradient(ellipse at 20% 0%, rgb(138 154 123 / .14), transparent 55%),
                linear-gradient(160deg, #5d4d3b, #3f342a);
}

.cta-section::before {
    content: "";
    position: absolute;
    right: -8rem;
    bottom: -8rem;
    width: 28rem;
    aspect-ratio: 1;
    background: var(--zen-enso) center / contain no-repeat;
    filter: brightness(0) invert(1);
    opacity: .08;
    pointer-events: none;
}

.cta-content { position: relative; }

/* ---------- Dark sections (urgency + CTA): contrast fixes ---------- */

/* The .bg-white override above makes "bg-white bg-opacity-10" panels solid
   off-white behind white text; restore the intended translucent panel. */
.bg-gradient-secondary .bg-white.bg-opacity-10,
.cta-section .bg-white.bg-opacity-10 {
    background-color: rgb(255 255 255 / .08);
    border: 1px solid rgb(255 255 255 / .14);
}

/* Warm light body copy instead of cool Tailwind gray-300 */
.bg-gradient-secondary .text-gray-300,
.cta-section .text-gray-300 { color: #f3efe4; }

.bg-gradient-secondary h2,
.bg-gradient-secondary h3,
.bg-gradient-secondary h4,
.cta-section h2,
.cta-section h3,
.cta-section h4 { color: #fff; }

/* Icons on the dark panels */
.cta-section .text-primary-500:not(.btn) { color: var(--zen-paper-deep); }

/* Main CTA: light pill with deep earth text */
.cta-section .btn.bg-white {
    background-color: #fbf9f4;
    color: var(--zen-earth-deep);
}

.cta-section .btn.bg-white:hover {
    background-color: var(--zen-paper-deep);
    color: #4a3d2f;
}

/* Outline buttons on the dark CTA background */
.cta-section .btn-secondary {
    color: #fff;
    border-color: rgb(255 255 255 / .75);
    background-color: transparent;
}

.cta-section .btn-secondary:hover {
    background-color: #fbf9f4;
    border-color: #fbf9f4;
    color: var(--zen-earth-deep);
}

/* ---------- Trust signals ---------- */

.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--zen-sage-soft);
    color: var(--zen-sage-deep);
}

.trust-icon svg { width: 1.75rem; height: 1.75rem; }

/* ---------- Footer ---------- */

footer.bg-secondary-800 {
    position: relative;
    border-top: 1px solid rgb(255 255 255 / .06);
}

footer.bg-secondary-800::before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 50%;
    width: 48px;
    height: 24px;
    transform: translateX(-50%);
    background: var(--zen-lotus) center / contain no-repeat;
    opacity: .6;
}

footer.bg-secondary-800,
footer.bg-secondary-800 h3,
footer.bg-secondary-800 h4,
footer.bg-secondary-800 p { color: #f3efe4; }

footer .text-gray-400,
footer p.text-gray-400 { color: #a9b3a5; }

/* ---------- Motion ---------- */

.animate-fade-in { animation: fadeIn 1.2s var(--zen-ease) both; }
.animate-slide-up { animation: slideUp 1.2s var(--zen-ease) .15s both; }

@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
    .btn:hover,
    .card:hover,
    .testimonial-card:hover { transform: none; }
    .animate-fade-in,
    .animate-slide-up { animation: none; }
}
