/* ===========================
   Ben Young — Websites for Small Businesses
   Warm, editorial, personal
   =========================== */

/* --- Variables --- */
:root {
    --cream: #FAF8F5;
    --cream-dark: #F0EBE5;
    --cream-mid: #F5F1EC;
    --charcoal: #2D2A26;
    --charcoal-light: #3D3A35;
    --warm-gray: #7A7470;
    --warm-gray-light: #A39E99;
    --terracotta: #C05230;
    --terracotta-hover: #A8462A;
    --terracotta-soft: rgba(192, 82, 48, 0.07);
    --terracotta-glow: rgba(192, 82, 48, 0.12);
    --white: #FFFFFF;
    --border: rgba(45, 42, 38, 0.08);
    --border-strong: rgba(45, 42, 38, 0.14);
    --font-heading: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.06);
    --shadow-md: 0 4px 20px rgba(45, 42, 38, 0.08);
    --shadow-lg: 0 12px 40px rgba(45, 42, 38, 0.1);
    --shadow-xl: 0 24px 60px rgba(45, 42, 38, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--terracotta-hover);
}

::selection {
    background: var(--terracotta-glow);
    color: var(--charcoal);
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--charcoal);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.1;
}

h1 em {
    font-style: italic;
    color: var(--charcoal-light);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin-bottom: 8px;
}

p {
    color: var(--warm-gray);
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--warm-gray);
    max-width: 540px;
    margin-bottom: 56px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: var(--radius-full, 100px);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

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

.btn-primary:hover {
    background-color: var(--charcoal-light);
    color: var(--cream);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--charcoal);
    color: var(--charcoal);
    transform: translateY(-1px);
}


/* ========================
   HERO
   ======================== */
.hero {
    padding: 120px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--terracotta-soft) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.hero-content {
    max-width: 600px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--warm-gray);
    margin-top: 24px;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-photo {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-photo img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-xl);
    position: relative;
    z-index: 1;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.hero-photo-shape {
    position: absolute;
    top: -20px;
    right: -20px;
    width: calc(100% - 20px);
    max-width: 390px;
    aspect-ratio: 4 / 5;
    background: var(--terracotta-soft);
    border-radius: var(--radius-xl);
    z-index: 0;
}


/* ========================
   WORK / PORTFOLIO
   ======================== */
.section-work {
    padding: 120px 0;
    background-color: var(--cream-mid);
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.work-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.work-card:hover .work-link {
    color: var(--terracotta);
}

.work-card-browser {
    background: var(--cream);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-strong);
}

.browser-dots span:first-child { background: #F5A6A2; }
.browser-dots span:nth-child(2) { background: #F5D5A2; }
.browser-dots span:last-child { background: #A2D5A2; }

.browser-url {
    font-size: 0.8rem;
    color: var(--warm-gray-light);
    font-family: var(--font-body);
    background: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    flex: 1;
}

.work-card-body {
    padding: 28px;
}

.work-card-body h3 {
    font-family: var(--font-heading);
    color: var(--charcoal);
    margin-bottom: 8px;
}

.work-card-body p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--warm-gray);
    margin-bottom: 16px;
}

.work-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--warm-gray-light);
    transition: color var(--transition);
}


/* ========================
   PROCESS / HOW IT WORKS
   ======================== */
.section-process {
    padding: 120px 0;
}

.process-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.process-step {
    flex: 1;
    text-align: center;
    padding: 0 24px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--cream);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.process-step h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.process-step p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--warm-gray);
}

.process-connector {
    width: 80px;
    height: 1px;
    background: var(--border-strong);
    flex-shrink: 0;
    margin-top: 24px;
}


/* ========================
   PRICING
   ======================== */
.section-pricing {
    padding: 120px 0;
    background-color: var(--cream-mid);
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 700px;
}

.pricing-main {
    padding: 48px;
}

.pricing-item {
    padding: 24px 0;
}

.pricing-item:first-child {
    padding-top: 0;
}

.pricing-item:last-child {
    padding-bottom: 0;
}

.pricing-item-hero .pricing-value {
    font-size: 2rem;
}

.pricing-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--warm-gray-light);
    margin-bottom: 4px;
}

.pricing-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.pricing-note {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--warm-gray-light);
    font-weight: 400;
}

.pricing-item p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--warm-gray);
}

.pricing-divider {
    height: 1px;
    background: var(--border);
}

.pricing-footer {
    padding: 20px 48px;
    background: var(--cream);
    border-top: 1px solid var(--border);
}

.pricing-footer p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--charcoal);
}


/* ========================
   ABOUT
   ======================== */
.section-about {
    padding: 120px 0;
}

.about-grid {
    max-width: 680px;
}

.about-content h2 {
    margin-bottom: 32px;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 20px;
    color: var(--warm-gray);
}

.about-content p:last-child {
    margin-bottom: 0;
}


/* ========================
   GET STARTED
   ======================== */
.section-start {
    padding: 120px 0;
    background-color: var(--cream-mid);
}

.start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.start-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    border: 1px solid var(--border);
}

.start-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: var(--radius-md);
    color: var(--charcoal);
    margin-bottom: 24px;
}

.start-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.start-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--warm-gray);
    margin-bottom: 28px;
}

.start-card .btn {
    width: 100%;
}

.start-card-form {
    grid-column: 1 / -1;
    max-width: 700px;
}

.jotform-embed {
    width: 100%;
    margin-top: 4px;
}

.jotform-embed iframe {
    width: 100% !important;
    border: none !important;
}

.start-external {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--warm-gray-light);
}

.start-external:hover {
    color: var(--terracotta);
}


/* ========================
   FOOTER
   ======================== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.85rem;
    color: var(--warm-gray-light);
}


/* ========================
   FLOATING CHAT WIDGET
   ======================== */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--cream);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    position: relative;
    z-index: 2;
}

.chat-toggle:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-xl);
}

.chat-icon-close {
    display: none;
}

.chat-widget.open .chat-icon-open {
    display: none;
}

.chat-widget.open .chat-icon-close {
    display: block;
}

.chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 400px;
    height: 580px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.chat-widget.open .chat-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--charcoal);
    color: var(--cream);
    font-size: 0.9rem;
    font-weight: 500;
}

.chat-panel-close {
    background: none;
    border: none;
    color: var(--cream);
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.chat-panel-close:hover {
    opacity: 1;
}

.chat-panel iframe {
    flex: 1;
    border: none;
}


/* ========================
   SCROLL ANIMATIONS
   ======================== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-content,
.hero-photo {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

.hero-photo.loaded {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}


/* ========================
   RESPONSIVE — TABLET
   ======================== */
@media (max-width: 960px) {
    .hero {
        padding: 100px 0 80px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-photo {
        order: -1;
    }

    .hero-photo img {
        max-width: 280px;
    }

    .hero-photo-shape {
        max-width: 270px;
        right: auto;
        left: 50%;
        transform: translateX(-46%);
        top: -16px;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .process-steps {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .process-step {
        padding: 24px 0;
    }

    .process-connector {
        width: 1px;
        height: 40px;
        margin-top: 0;
    }

    .start-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-work,
    .section-process,
    .section-pricing,
    .section-about,
    .section-start {
        padding: 80px 0;
    }
}


/* ========================
   RESPONSIVE — MOBILE
   ======================== */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .hero-photo img {
        max-width: 220px;
    }

    .hero-photo-shape {
        max-width: 210px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .section-intro {
        margin-bottom: 40px;
    }

    .pricing-main {
        padding: 32px 24px;
    }

    .pricing-footer {
        padding: 16px 24px;
    }

    .start-card {
        padding: 36px 28px;
    }

    .section-work,
    .section-process,
    .section-pricing,
    .section-about,
    .section-start {
        padding: 64px 0;
    }

    /* Chat widget mobile */
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .chat-toggle {
        width: 54px;
        height: 54px;
    }

    .chat-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translateY(20px);
    }

    .chat-widget.open .chat-panel {
        transform: translateY(0);
    }
}
