/* 
=============================================
   Notebook Doodles Theme - Main Stylesheet
   Project: AF Sales & Marketing Redesign
=============================================
*/

/* --- Imports & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Kalam:wght@300;400;700&family=Permanent+Marker&display=swap');

:root {
    /* Colors */
    --paper-bg: #fdfbf7;
    --paper-line: #a2aab3;
    --ink-blue: #2c3e50;
    --ink-accent: #2980b9;
    --pencil-gray: #7f8c8d;
    --highlighter-yellow: rgba(241, 196, 15, 0.4);
    --highlighter-pink: rgba(231, 76, 60, 0.3);
    --tape-color: #f0e68c;
    --sticky-yellow: #fff740;
    --sticky-blue: #cbf0ff;
    --sticky-pink: #ffcbf2;

    /* Fonts */
    --font-heading: 'Kalam', cursive;
    --font-body: 'Architects Daughter', cursive;
    --font-marker: 'Permanent Marker', cursive;

    /* Layout */
    --container-width: 1200px;
    --header-height: 90px;

    /* Effects */
    --shadow-paper: 2px 3px 5px rgba(0, 0, 0, 0.1);
    --shadow-float: 5px 8px 15px rgba(0, 0, 0, 0.15);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper-bg);
    /* Lined Paper Pattern */
    background-image: linear-gradient(var(--paper-line) 1px, transparent 1px);
    background-size: 100% 2rem;
    color: var(--ink-blue);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 2rem;
    /* Matches background size */
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--paper-bg);
    border-left: 1px solid var(--paper-line);
}

::-webkit-scrollbar-thumb {
    background: var(--pencil-gray);
    border-radius: 6px;
    border: 2px solid var(--paper-bg);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--ink-blue);
}

h1 {
    font-size: 3.5rem;
    transform: rotate(-1deg);
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Highlighter Effect for Highlights */
.highlight {
    background: linear-gradient(120deg, var(--highlighter-yellow) 0%, var(--highlighter-yellow) 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 88%;
    transition: background-size 0.3s ease;
}

.highlight:hover {
    background-size: 100% 80%;
}

/* --- Layout Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.section-padding {
    padding: 80px 0;
    position: relative;
}

/* --- Hand-Drawn Borders Mixin Concept --- */
.doodle-border {
    border: 2px solid var(--ink-blue);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    background: white;
}

/* --- Buttons (Tape Style) --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--tape-color);
    color: var(--ink-blue);
    font-family: var(--font-marker);
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    position: relative;
    transform: rotate(-1deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    /* Jagged edges for tape */
    clip-path: polygon(2% 0%, 98% 0%, 100% 100%, 0% 100%);
    /* Simplification */
}

/* Advanced CSS Tape effect using pseudo elements */
.btn::before,
.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    left: 0;
}

.btn::before {
    top: 0;
}

.btn::after {
    bottom: 0;
}

.btn:hover {
    transform: rotate(1deg) scale(1.05);
    background-color: #f7eea0;
}

.btn-primary {
    background-color: var(--ink-accent);
    color: white;
    /* Masking tape texture overlay */
    background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3h1v1H1V3zm2-2h1v1H3V1z' fill='%23ffffff' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* =============================================
   HEADER
============================================= */
.header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--paper-bg);
    border-bottom: 2px solid var(--ink-blue);
    /* Irregular bottom border */
    border-bottom-left-radius: 50% 2px;
    border-bottom-right-radius: 50% 2px;
    box-shadow: var(--shadow-paper);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    height: 60px;
    /* Make logo look stamped */
    filter: invert(1) sepia(0.2) contrast(1.2);
    transform: rotate(-2deg);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
}

/* Underline Scribble Hover */
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    bottom: -5px;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='5' viewBox='0 0 100 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2.5 Q 25 5, 50 2.5 T 100 2.5' fill='none' stroke='%232980b9' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
}

.bar {
    height: 3px;
    width: 100%;
    background-color: var(--ink-blue);
    border-radius: 5px;
    transition: 0.3s;
    /* Sketchy look */
    mask: url(#);
}

/* =============================================
   HERO SECTION
============================================= */
.hero {
    padding-top: calc(var(--header-height) + 50px);
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-text .subtitle {
    font-family: var(--font-marker);
    color: var(--ink-accent);
    font-size: 1.5rem;
    transform: rotate(-2deg);
    display: inline-block;
    margin-bottom: 10px;
}

.hero-doodle-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    /* Graph paper background for image area */
    background-image:
        linear-gradient(var(--paper-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center;
    border: 3px solid var(--ink-blue);
    border-radius: 10px;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS Only Laptop Doodle */
.doodle-laptop {
    width: 300px;
    height: 200px;
    border: 4px solid var(--ink-blue);
    border-radius: 10px;
    position: relative;
    background: white;
}

.doodle-laptop::after {
    content: '';
    /* Keyboard base */
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 340px;
    height: 20px;
    border: 4px solid var(--ink-blue);
    border-radius: 5px 5px 15px 15px;
    background: white;
}

/* Rocket Animation */
.rocket-ship {
    position: absolute;
    font-size: 4rem;
    top: -40px;
    right: -30px;
    animation: float 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(10deg);
    }

    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

/* =============================================
   ABOUT (Sticky Note Style)
============================================= */
.about {
    background: transparent;
}

.sticky-note-large {
    background-color: var(--sticky-yellow);
    padding: 60px;
    width: 80%;
    margin: 0 auto;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    transform: rotate(1deg);
    position: relative;
}

/* Tape on top center */
.sticky-note-large::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* =============================================
   SERVICES (Polaroids)
============================================= */
.services {
    padding-top: 100px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 10px;
    margin: 10px auto;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 5 Q 10 0, 20 5 T 40 5 T 60 5 T 80 5 T 100 5' fill='none' stroke='%232c3e50' stroke-width='2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: white;
    padding: 20px 20px 40px 20px;
    /* Extra bottom padding for polaroid look */
    box-shadow: var(--shadow-float);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
}

/* Random rotations for cards using nth-child */
.service-card:nth-child(odd) {
    transform: rotate(-2deg);
}

.service-card:nth-child(even) {
    transform: rotate(2deg);
}

.service-card:hover {
    transform: rotate(0) scale(1.05);
    z-index: 10;
}

/* Tape on top */
.service-card::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 35%;
    width: 30%;
    height: 35px;
    background-color: var(--tape-color);
    opacity: 0.8;
    transform: rotate(-3deg);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--ink-accent);
    /* Doodle circle around icon */
    border: 2px solid var(--ink-blue);
    width: 80px;
    height: 80px;
    line-height: 75px;
    border-radius: 50% 40% 60% 50%;
    margin: 0 auto 20px;
}

/* =============================================
   CALCULATOR (Math Notebook)
============================================= */
.calculator-section {
    background-image:
        linear-gradient(var(--paper-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #f4f8fb;
    /* Blueish graph paper tint */
    border-top: 3px dashed var(--ink-blue);
    border-bottom: 3px dashed var(--ink-blue);
}

.calc-wrapper {
    background: white;
    padding: 40px;
    border: 3px solid var(--ink-blue);
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.calc-input-group {
    margin-bottom: 25px;
}

.calc-input-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Hand-drawn Range Slider styling */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    background: var(--ink-blue);
    cursor: pointer;
    margin-top: -10px;
    border: 2px solid white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    background: var(--ink-blue);
    border-radius: 2px;
    /* Zigzag line effect via mask? Too complex. Just a thick scribbled line. */
    border-bottom: 1px solid black;
}

.calc-result {
    margin-top: 30px;
    padding: 20px;
    border: 2px solid var(--ink-accent);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    text-align: center;
    font-size: 2rem;
    color: var(--ink-accent);
    font-family: var(--font-marker);
}

/* =============================================
   PROCESS (Connect the dots)
============================================= */
.process-steps {
    position: relative;
    padding: 50px 0;
}

/* The winding line (SVG in HTML) */
.process-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.step-item:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    font-family: var(--font-marker);
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.1);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.step-content {
    width: 45%;
    background: white;
    padding: 30px;
    border: 2px solid var(--ink-blue);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--pencil-gray);
}

/* =============================================
   TESTIMONIALS (Speech Bubbles)
============================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.testimonial-item {
    position: relative;
}

.speech-bubble {
    background: white;
    border: 2px solid var(--ink-blue);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    margin-bottom: 20px;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 40px;
    border-width: 20px 20px 0;
    border-style: solid;
    border-color: var(--ink-blue) transparent;
    display: block;
    width: 0;
}

/* Inner white triangle to cover border */
.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 43px;
    border-width: 17px 17px 0;
    border-style: solid;
    border-color: white transparent;
    display: block;
    width: 0;
    z-index: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.client-avatar {
    width: 60px;
    height: 60px;
    background: #ddd;
    border-radius: 50%;
    border: 2px dashed var(--ink-blue);
    overflow: hidden;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================
   CONTACT SECTION
============================================= */
.contact-paper {
    background: white;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    /* Ripped paper top */
    clip-path: polygon(0% 20px, 5% 0px, 10% 20px, 15% 0px, 20% 20px, 25% 0px,
            30% 20px, 35% 0px, 40% 20px, 45% 0px, 50% 20px, 55% 0px,
            60% 20px, 65% 0px, 70% 20px, 75% 0px, 80% 20px, 85% 0px,
            90% 20px, 95% 0px, 100% 20px, 100% 100%, 0% 100%);
    border: 1px solid #eee;
    /* Fallback */
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--ink-blue);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--ink-accent);
    background-color: rgba(41, 128, 185, 0.05);
}

/* =============================================
   FOOTER
============================================= */
/* =============================================
   FOOTER (Corrected Structure - Notebook Theme)
============================================= */
.footer {
    background-color: var(--ink-blue);
    color: white;
    padding: 80px 0 30px;
    position: relative;
    margin-top: 100px;
    font-family: var(--font-body);
    /* Irregular top edge to look like a notebook cover */
    clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
    /* Stitched look */
}

/* Footer About Column */
.footer-about p {
    margin-top: 20px;
    opacity: 0.9;
    font-size: 1rem;
}

.footer-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
    /* Make logo white */
    transform: rotate(-2deg);
}

.footer-social {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    border-radius: 50% 40% 60% 50%;
    /* Imperfect circle */
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--ink-accent);
    transform: rotate(10deg) scale(1.1);
    border-color: var(--sticky-yellow);
    color: var(--sticky-yellow);
}

/* Footer Links Columns */
.footer-links h3,
.footer-contact h3 {
    font-family: var(--font-marker);
    color: var(--sticky-yellow);
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

/* Underline decoration for headers */
.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transform: rotate(-1deg);
    margin-top: 5px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    transition: 0.3s;
    position: relative;
}

.footer-links ul li a:hover {
    color: var(--tape-color);
    padding-left: 5px;
    /* Slight movement */
}

.footer-links ul li a:hover::before {
    content: '→';
    margin-right: 5px;
    font-family: var(--font-marker);
}

/* Footer Contact Column */
.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.footer-contact i {
    color: var(--sticky-yellow);
    font-size: 1.2rem;
    margin-top: 5px;
}

.footer-contact a {
    color: inherit;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.footer-contact a:hover {
    color: var(--tape-color);
    border-bottom-style: solid;
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: bold;
}

.footer-legal a:hover {
    color: var(--sticky-yellow);
    text-decoration: underline;
    text-decoration-style: wavy;
    /* Wavy underline */
}

.footer-legal span {
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contact ul li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links h3::after,
    .footer-contact h3::after {
        margin: 5px auto;
        /* Center the underline */
    }
}

/* =============================================
   CHAT WIDGET
============================================= */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--ink-accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    border: 3px solid white;
    animation: wiggle 5s infinite;
}

@keyframes wiggle {

    0%,
    90% {
        transform: rotate(0);
    }

    92% {
        transform: rotate(10deg);
    }

    94% {
        transform: rotate(-10deg);
    }

    96% {
        transform: rotate(5deg);
    }

    98% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0);
    }
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-doodle-wrapper {
        margin-top: 40px;
    }

    .sticky-note-large {
        width: 100%;
        transform: rotate(0);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--paper-bg);
        width: 100%;
        text-align: center;
        transition: 0.4s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 40px 0;
        background-image: linear-gradient(var(--paper-line) 1px, transparent 1px);
        background-size: 100% 2rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .step-item {
        flex-direction: column !important;
    }

    .step-content {
        width: 100%;
        margin-top: 20px;
    }

    .header-actions .btn {
        display: none;
    }

    /* Hide CTA on mobile nav for space */
}

@media (max-width: 600px) {
    .contact-paper {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 50px 0;
    }
}

/* =============================================
   LEGAL PAGE SPECIFICS
============================================= */
.legal-content p {
    margin-bottom: 2rem;
    text-align: justify;
}

.legal-content h2 {
    margin-top: 3rem;
    border-bottom: 2px dashed var(--pencil-gray);
    display: inline-block;
}