/*
Theme Name: SAM Cleaning
Theme URI: https://sam.cleaning
Author: SAM Cleaning Team
Author URI: https://sam.cleaning
Description: Child theme of Twenty Twenty-Five using the SAM Cleaning claymorphism design system (warm beige, teal/green palette, DM Sans typography).
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sam-cleaning
Tags: child-theme, claymorphism, cleaning
*/

/* ═══════════════════════════════════════════════════════════════
   SAM Cleaning — Clay Design System
   Extends Twenty Twenty-Five
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
    /* Surfaces */
    --clay-bg:              #ede9e2;
    --clay-surface:         #e4e0d8;
    --clay-card:            #f0ede7;
    --clay-raised:          #eae7e1;
    --clay-white:           #fbfaf8;

    /* Typography */
    --clay-text:            #3f3d56;
    --clay-text-muted:      #7a746c;

    /* Brand colours */
    --clay-teal:            #17B8A6;
    --clay-teal-dark:       #0F8A7C;
    --clay-teal-soft:       #c8ede8;
    --clay-teal-glow:       rgba(23, 184, 166, 0.3);
    --clay-green:           #7DBF6E;
    --clay-pink:            #ff6884;
    --clay-pink-soft:       #ffd8de;
    --clay-gold:            #F6C244;
    --clay-gold-soft:       #fdefc8;

    /* Radius */
    --clay-radius-xs:       10px;
    --clay-radius-sm:       16px;
    --clay-radius:          22px;
    --clay-radius-pill:     50px;

    /* Shadows */
    --clay-shadow-out:
        8px 8px 20px rgba(0, 0, 0, 0.12),
        -5px -5px 14px rgba(255, 255, 255, 0.55);
    --clay-shadow-in:
        inset 2px 2px 6px rgba(0, 0, 0, 0.07),
        inset -3px -3px 8px rgba(255, 255, 255, 0.6);
    --clay-shadow-pressed:
        inset 4px 4px 10px rgba(0, 0, 0, 0.12),
        inset -3px -3px 8px rgba(255, 255, 255, 0.5);
    --clay-shadow-card:
        10px 10px 24px rgba(0, 0, 0, 0.11),
        -6px -6px 18px rgba(255, 255, 255, 0.6),
        inset 1px 1px 2px rgba(255, 255, 255, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.03);

    /* Gradients */
    --clay-gradient-primary:   linear-gradient(145deg, #7DBF6E 0%, #17B8A6 100%);
    --clay-gradient-primary-r: linear-gradient(145deg, #17B8A6 0%, #7DBF6E 100%);
    --clay-gradient-h:         linear-gradient(90deg,  #7DBF6E 0%, #17B8A6 100%);
    --clay-gradient-h-fade:    linear-gradient(90deg, transparent 0%, #7DBF6E 30%, #17B8A6 70%, transparent 100%);
    --clay-gradient-135:       linear-gradient(135deg, #7DBF6E 0%, #17B8A6 100%);

    /* Semantic */
    --clay-success:            #4e9e3f;
    --clay-error:              #e83e5a;
    --clay-text-2xl:           2rem;
}

/* ── Grain texture overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 160px 160px;
}

/* ═══════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════ */

body {
    font-family: 'DM Sans', sans-serif;
    background:
        radial-gradient(ellipse 45% 28% at 3% 8%,   rgba(125, 191, 110, 0.08) 0%, transparent 100%),
        radial-gradient(ellipse 45% 40% at 95% 35%,  rgba(23, 184, 166, 0.11)  0%, transparent 100%),
        radial-gradient(ellipse 40% 30% at 8% 72%,   rgba(23, 184, 166, 0.09)  0%, transparent 100%),
        radial-gradient(ellipse 50% 35% at 92% 85%,  rgba(125, 191, 110, 0.08) 0%, transparent 100%),
        #edeae3;
    background-attachment: fixed;
    color: var(--clay-text);
    -webkit-font-smoothing: antialiased;
}

/* Override TT25 default background */
.wp-site-blocks,
.editor-styles-wrapper {
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    font-family: 'DM Sans', sans-serif;
    color: var(--clay-text);
    letter-spacing: -0.02em;
}

h1, .wp-block-heading h1 {
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--clay-teal-dark);
}

h2 {
    font-weight: 700;
    color: var(--clay-teal-dark);
}

p {
    color: var(--clay-text);
    line-height: 1.65;
}

a {
    color: var(--clay-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--clay-teal-dark);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.wp-block-template-part[data-slug="header"],
header.wp-block-template-part {
    background: var(--clay-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Site title as gradient */
.wp-block-site-title a,
.wp-block-site-title {
    background: var(--clay-gradient-135);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

/* Nav links */
.wp-block-navigation a {
    color: var(--clay-text);
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.wp-block-navigation a:hover {
    color: var(--clay-teal);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.wp-block-button__link,
.wp-element-button {
    background: var(--clay-gradient-primary) !important;
    border: none !important;
    border-radius: var(--clay-radius-pill) !important;
    color: #fff !important;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.65rem 1.6rem;
    box-shadow: var(--clay-shadow-out);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
    letter-spacing: -0.01em;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow:
        12px 12px 24px rgba(0, 0, 0, 0.14),
        -6px -6px 16px rgba(255, 255, 255, 0.6);
    color: #fff !important;
}

.wp-block-button__link:active,
.wp-element-button:active {
    transform: translateY(0);
    box-shadow: var(--clay-shadow-pressed);
}

/* Outline variant */
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 2px solid var(--clay-teal) !important;
    color: var(--clay-teal) !important;
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--clay-teal-soft) !important;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   CARDS / GROUPS
   ═══════════════════════════════════════════════════════════════ */

.wp-block-group.is-style-clay-card,
.sam-card {
    background: rgba(240, 237, 231, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: var(--clay-radius);
    box-shadow: var(--clay-shadow-card);
    padding: 2rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.wp-block-group.is-style-clay-card:hover,
.sam-card:hover {
    transform: translateY(-3px);
    box-shadow:
        14px 14px 28px rgba(0, 0, 0, 0.13),
        -8px -8px 20px rgba(255, 255, 255, 0.95),
        inset 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
input[type="password"],
input[type="search"],
select,
textarea,
.wp-block-search__input {
    font-family: 'DM Sans', sans-serif;
    background: var(--clay-white);
    border: 1.5px solid rgba(23, 184, 166, 0.18);
    border-radius: var(--clay-radius-sm);
    color: var(--clay-text);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    box-shadow: var(--clay-shadow-in);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus,
.wp-block-search__input:focus {
    outline: none;
    border-color: var(--clay-teal);
    box-shadow:
        var(--clay-shadow-in),
        0 0 0 3px var(--clay-teal-glow);
}

label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--clay-text-muted);
    margin-bottom: 0.3rem;
    display: block;
}

/* ── Submit button ── */
input[type="submit"],
button[type="submit"] {
    background: var(--clay-gradient-primary);
    border: none;
    border-radius: var(--clay-radius-pill);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    box-shadow: var(--clay-shadow-out);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: -0.01em;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow:
        12px 12px 24px rgba(0, 0, 0, 0.14),
        -6px -6px 16px rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION LABELS / HEADINGS
   ═══════════════════════════════════════════════════════════════ */

.sam-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--clay-teal);
    opacity: 0.85;
    font-weight: 700;
}

.sam-page-header-title {
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--clay-teal-dark);
    font-size: 2.4rem;
}

.sam-page-header-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--clay-radius);
    background: var(--clay-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow:
        8px 8px 20px rgba(23, 184, 166, 0.3),
        -4px -4px 12px rgba(255, 255, 255, 0.7);
    margin: 0 auto 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   INFO FIELD CHIPS
   ═══════════════════════════════════════════════════════════════ */

.sam-info-field {
    background: var(--clay-surface);
    border-radius: var(--clay-radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: var(--clay-shadow-in);
}

.sam-info-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clay-text-muted);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sam-info-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--clay-text);
    letter-spacing: -0.01em;
}

.sam-info-value.teal {
    color: var(--clay-teal);
}

/* ═══════════════════════════════════════════════════════════════
   DIVIDERS
   ═══════════════════════════════════════════════════════════════ */

hr,
.wp-block-separator {
    border: none;
    height: 2px;
    background: var(--clay-gradient-h-fade);
    opacity: 0.22;
    margin: 1.25rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */

.sam-badge {
    background: var(--clay-gradient-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--clay-radius-pill);
    padding: 0.25em 0.7em;
    box-shadow: 2px 2px 6px rgba(23, 184, 166, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sam-badge-gold {
    background: linear-gradient(145deg, #F6C244 0%, #e8a800 100%);
    box-shadow: 2px 2px 6px rgba(246, 194, 68, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.wp-block-template-part[data-slug="footer"],
footer.wp-block-template-part {
    background: var(--clay-surface) !important;
    border-top: none;
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}

.wp-block-template-part[data-slug="footer"] h6,
.wp-block-template-part[data-slug="footer"] .wp-block-heading {
    background: var(--clay-gradient-135);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.85rem;
}

.wp-block-template-part[data-slug="footer"] a {
    color: var(--clay-text-muted);
    font-size: 0.88rem;
}

.wp-block-template-part[data-slug="footer"] a:hover {
    color: var(--clay-teal);
}

/* ═══════════════════════════════════════════════════════════════
   TWENTY TWENTY-FIVE OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

/* Remove default TT25 white/cream background from content area */
.wp-block-post-content,
.entry-content {
    background: transparent !important;
}

/* Constrain single CPT content to the content width */
.single-sam_location .wp-block-post-content > *,
.single-sam_service  .wp-block-post-content > *,
.single            .wp-block-post-content > * {
    max-width: var(--wp--style--global--content-size, 780px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: var(--wp--preset--spacing--30, 1.5rem);
    padding-right: var(--wp--preset--spacing--30, 1.5rem);
}

.single-sam_location .wp-block-post-content > *.alignwide,
.single-sam_service  .wp-block-post-content > *.alignwide,
.single            .wp-block-post-content > *.alignwide {
    max-width: var(--wp--style--global--wide-size, 1340px);
}

.single-sam_location .wp-block-post-content > *.alignfull,
.single-sam_service  .wp-block-post-content > *.alignfull,
.single            .wp-block-post-content > *.alignfull {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* TT25 uses --wp--preset--color--base for background — remap */
:root {
    --wp--preset--color--base:      #ede9e2;
    --wp--preset--color--contrast:  #3f3d56;
    --wp--preset--color--accent-1:  #17B8A6;
    --wp--preset--color--accent-2:  #7DBF6E;
    --wp--preset--color--accent-3:  #0F8A7C;
    --wp--preset--color--accent-4:  #7a746c;
    --wp--preset--color--accent-5:  #fbfaf8;
}
