/* ============================================
   WAQAS MALIK — Editorial Personal Brand
   Warm. Handmade. Personal. Opinionated.
   ============================================ */

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

:root {
    /* Warm editorial palette */
    --cream: #fbf6ec;
    --cream-2: #f3ead8;
    --cream-3: #ecdfc5;
    --sand: #e4d4b1;
    --ink: #1a1410;
    --ink-2: #2a2018;
    --ink-3: #453a30;
    --ink-4: #6b5d4f;
    --ink-5: #9a8a78;
    --paper: #fffdf7;

    /* Accents */
    --red: #d93025;
    --red-2: #b52a1f;
    --red-ink: #7a1d16;
    --blush: #fde8e5;
    --ochre: #c47a20;
    --leaf: #5a7a3a;
    --sky: #3a6b8c;

    /* Legacy aliases so old pages keep working */
    --black: var(--ink);
    --white: var(--paper);
    --red-light: #e8443a;
    --red-dark: var(--red-ink);
    --red-glow: rgba(217,48,37,.15);
    --gray-950: var(--cream-2);
    --gray-900: var(--cream-2);
    --gray-850: var(--cream-2);
    --gray-800: var(--cream-3);
    --gray-700: var(--sand);
    --gray-600: var(--ink-5);
    --gray-500: var(--ink-4);
    --gray-400: var(--ink-4);
    --gray-300: var(--ink-3);
    --gray-200: var(--ink-3);
    --gray-100: var(--ink-2);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
    --font-hand: 'Caveat', 'Comic Sans MS', cursive;
    --ease: cubic-bezier(.4,0,.2,1);
    --ease-bounce: cubic-bezier(.34,1.56,.64,1);
    --transition: .3s var(--ease);
    --transition-slow: .6s var(--ease);
    --nav-h: 76px;
    --container: 1240px;
    --radius: 18px;
    --radius-sm: 10px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 0 var(--ink);
    --shadow: 4px 4px 0 var(--ink);
    --shadow-lg: 8px 8px 0 var(--ink);
    --shadow-red: 6px 6px 0 var(--red);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(217,48,37,.04) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(196,122,32,.05) 0, transparent 45%);
    background-attachment: fixed;
}

/* Paper grain texture */
body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .06 0 0 0 .04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .5; mix-blend-mode: multiply;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--red); color: var(--paper); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.text-red { color: var(--red); font-style: italic; font-family: var(--font-display); font-weight: 500; }
.text-gray { color: var(--ink-4); }

/* Hand-drawn underline utility */
.squiggle { position: relative; display: inline-block; }
.squiggle::after {
    content: ''; position: absolute; left: -4px; right: -4px; bottom: -8px; height: 12px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 7 Q 50 0, 100 6 T 198 5' stroke='%23d93025' stroke-width='3' fill='none' stroke-linecap='round'/></svg>") no-repeat;
    background-size: 100% 100%;
}

/* ─── Cursor Glow (subtle warm) ─── */
.cursor-glow {
    position: fixed; width: 480px; height: 480px; border-radius: 50%;
    background: radial-gradient(circle, rgba(217,48,37,.08) 0%, transparent 65%);
    pointer-events: none; z-index: 0;
    transform: translate(-50%, -50%); transition: opacity .3s; opacity: 0;
    mix-blend-mode: multiply;
}
body:hover .cursor-glow { opacity: 1; }

/* ─── Loader ─── */
.loader {
    position: fixed; inset: 0; background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; transition: opacity .6s, visibility .6s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-bar {
    width: 220px; height: 3px; background: var(--sand);
    border-radius: 2px; overflow: hidden; margin: 0 auto 18px;
}
.loader-bar::after {
    content: ''; display: block; width: 0; height: 100%;
    background: var(--red); animation: loaderBar 1.2s ease-out forwards;
}
@keyframes loaderBar { to { width: 100%; } }
.loader-text {
    font-family: var(--font-display); font-size: 14px;
    letter-spacing: 6px; color: var(--ink-3); font-weight: 500;
    font-style: italic;
}

/* ─── Navigation ─── */
.nav {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; padding: 18px 0; transition: var(--transition);
}
.nav.scrolled {
    background: rgba(251,246,236,.92); backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px); padding: 12px 0;
    border-bottom: 1.5px solid var(--ink);
}
.nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-family: var(--font-display); font-size: 30px; font-weight: 700;
    letter-spacing: -1.2px; display: flex; align-items: baseline; gap: 0;
    font-style: italic;
}
.logo-w { color: var(--ink); }
.logo-dot { color: var(--red); font-size: 34px; line-height: 1; }
.logo-m { color: var(--ink); }
.nav-logo:hover .logo-dot { animation: bounce .5s var(--ease-bounce); }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
    font-size: 14px; font-weight: 500; color: var(--ink-3);
    letter-spacing: .1px; position: relative; padding: 4px 2px;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -3px; left: 50%; width: 0;
    height: 2.5px; background: var(--red); transition: var(--transition);
    border-radius: 2px; transform: translateX(-50%);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-link.active::after { width: 100%; }
.nav-link-cta {
    background: var(--ink); color: var(--paper) !important;
    padding: 11px 22px; border-radius: 999px; font-weight: 600;
    border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
.nav-link-cta::after { display: none; }
.nav-link-cta:hover { background: var(--red); border-color: var(--red); transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }

.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; flex-direction: column; gap: 5px;
}
.nav-toggle span {
    display: block; width: 24px; height: 2.5px;
    background: var(--ink); transition: var(--transition); border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
    position: fixed; inset: 0; background: var(--cream);
    z-index: 999; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition-slow);
}
.mobile-menu.active { opacity: 1; visibility: visible; }
.mobile-menu-links { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mobile-link {
    font-family: var(--font-display); font-size: 34px; font-weight: 600;
    color: var(--ink-3); transition: var(--transition); font-style: italic;
}
.mobile-link:hover { color: var(--red); }

/* ─── Buttons (sticker style) ─── */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    border: 2px solid var(--ink); font-family: var(--font); transition: all .25s var(--ease-bounce);
    position: relative; white-space: nowrap;
    box-shadow: var(--shadow-sm);
    background: var(--paper); color: var(--ink);
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.btn:active { transform: translate(0,0); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--red-2); }
.btn-secondary { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--ink-3); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 18px 34px; font-size: 16.5px; }
.btn-full { width: 100%; justify-content: center; }
.btn-youtube { background: #FF0000; color: var(--paper); }
.btn-youtube:hover { background: #cc0000; }
.btn-download {
    background: var(--paper); color: var(--ink);
    border: 2px solid var(--ink); width: 100%; justify-content: center;
    box-shadow: var(--shadow-sm);
}
.btn-download:hover { background: var(--red); color: var(--paper); transform: translate(-2px,-2px); box-shadow: var(--shadow); }

/* ─── Section Styles ─── */
.section { padding: 110px 0; position: relative; }
.section-dark {
    background: var(--ink);
    color: var(--paper);
}
.section-dark * { color: inherit; }
.section-dark .section-label { color: var(--red); }
.section-dark .card { background: var(--ink-2); border-color: var(--ink-3); color: var(--cream); }
.section-dark .card h3, .section-dark .card h4 { color: var(--paper); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: 3px;
    color: var(--red); text-transform: uppercase; margin-bottom: 16px;
    padding: 6px 14px; border: 1.5px solid currentColor; border-radius: 999px;
}
.section-title {
    font-family: var(--font-display); font-size: clamp(34px,5vw,58px);
    font-weight: 500; line-height: 1.05; letter-spacing: -1.8px; margin-bottom: 16px;
    font-variation-settings: "SOFT" 50, "WONK" 1;
    color: var(--ink);
}
.section-title em, .section-title i { color: var(--red); font-weight: 400; }
.section-subtitle {
    font-size: 17px; color: var(--ink-4);
    max-width: 580px; margin: 0 auto; line-height: 1.7;
}

/* ─── Cards (hand-drawn feel) ─── */
.card {
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    transition: all .3s var(--ease-bounce);
    overflow: hidden;
    box-shadow: var(--shadow);
    color: var(--ink);
}
.card:hover {
    transform: translate(-3px,-3px);
    box-shadow: var(--shadow-lg);
}

/* ─── Tags (sticker) ─── */
.tag {
    font-size: 11px; font-weight: 700; padding: 5px 11px;
    border-radius: 999px; background: var(--blush);
    color: var(--red-ink); letter-spacing: .4px;
    border: 1.5px solid var(--red);
    text-transform: uppercase;
    display: inline-block;
}

/* ─── Social Pills ─── */
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; background: var(--paper);
    border: 2px solid var(--ink); border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--ink);
    transition: all .25s var(--ease-bounce);
    box-shadow: var(--shadow-sm);
}
.social-pill:hover { transform: translate(-2px,-2px) rotate(-1deg); box-shadow: var(--shadow); background: var(--red); color: var(--paper); }
.social-pill svg { width: 17px; height: 17px; }

/* ─── Footer ─── */
.footer {
    padding: 90px 0 32px;
    background: var(--ink);
    color: var(--cream);
    border-top: 2px solid var(--ink);
    position: relative;
}
.footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 8px;
    background: repeating-linear-gradient(90deg, var(--red) 0 40px, var(--ochre) 40px 80px, var(--cream) 80px 120px, var(--ink) 120px 160px);
}
.footer-grid {
    display: grid; grid-template-columns: 1.3fr 2fr;
    gap: 80px; padding-bottom: 48px;
    border-bottom: 1px solid var(--ink-3); margin-bottom: 32px;
}
.footer .nav-logo .logo-w, .footer .nav-logo .logo-m { color: var(--paper); }
.footer-brand p {
    font-size: 15px; color: var(--ink-5); line-height: 1.75;
    margin-top: 18px; max-width: 320px;
    font-family: var(--font-display); font-style: italic;
}
.footer-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; }
.footer-col h4 {
    font-family: var(--font-display); font-size: 14px;
    font-weight: 700; margin-bottom: 18px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--red);
}
.footer-col a {
    display: block; font-size: 14px; color: var(--cream);
    padding: 6px 0; transition: var(--transition);
}
.footer-col a:hover { color: var(--red); transform: translateX(4px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 13px; color: var(--ink-5); }
.footer-tagline { font-family: var(--font-display); font-style: italic; color: var(--sand) !important; }

/* ─── Back to Top ─── */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px; width: 52px; height: 52px;
    background: var(--ink); border: 2px solid var(--ink); border-radius: 50%;
    color: var(--paper); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all .3s var(--ease-bounce); z-index: 100;
    box-shadow: var(--shadow);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--red); border-color: var(--red); transform: translate(-2px,-4px) rotate(-5deg); box-shadow: var(--shadow-lg); }

/* ─── Page Header ─── */
.page-header {
    padding: 160px 0 70px; text-align: center; position: relative;
    background: var(--cream-2);
    border-bottom: 2px solid var(--ink);
    overflow: hidden;
}
.page-header::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, var(--ochre) 2px, transparent 3px),
        radial-gradient(circle at 85% 70%, var(--red) 2px, transparent 3px),
        radial-gradient(circle at 45% 85%, var(--leaf) 2px, transparent 3px);
    background-size: 200px 200px, 250px 250px, 180px 180px;
    opacity: .3;
}
.page-header > .container { position: relative; z-index: 2; }
.page-header .section-title { margin-bottom: 14px; }
.page-header .section-subtitle { margin-bottom: 0; }
.page-breadcrumb {
    font-size: 13px; color: var(--ink-4); margin-bottom: 20px;
    letter-spacing: .5px; font-family: var(--font-display); font-style: italic;
}
.page-breadcrumb a { color: var(--ink-4); text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--red); }
.page-breadcrumb a:hover { color: var(--red); }

/* ─── Reveal Animations ─── */
.reveal {
    opacity: 0; transform: translateY(32px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }
.reveal-d5 { transition-delay: .5s; }
.reveal-left {
    opacity: 0; transform: translateX(-40px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(26,20,16,.75);
    backdrop-filter: blur(6px); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition); padding: 24px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--paper); border: 2.5px solid var(--ink);
    border-radius: var(--radius-lg); padding: 48px; max-width: 460px;
    width: 100%; text-align: center; transform: translateY(24px) rotate(-1deg);
    transition: var(--transition); position: relative;
    box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: translateY(0) rotate(0); }
.modal-close {
    position: absolute; top: 14px; right: 18px; background: none;
    border: none; color: var(--ink-3); font-size: 28px; cursor: pointer;
}
.modal-close:hover { color: var(--red); }
.modal-icon {
    width: 72px; height: 72px; background: var(--blush); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--red); margin: 0 auto 20px; border: 2px solid var(--red);
}
.modal h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.modal p { font-size: 15px; color: var(--ink-4); line-height: 1.7; margin-bottom: 22px; }
.modal-form input {
    width: 100%; padding: 14px 18px; background: var(--cream);
    border: 2px solid var(--ink); border-radius: 999px;
    color: var(--ink); font-size: 14.5px; font-family: var(--font);
    outline: none; margin-bottom: 14px;
}
.modal-form input:focus { border-color: var(--red); }
.modal-note { display: block; margin-top: 12px; font-size: 12.5px; color: var(--ink-4); font-style: italic; }

/* ─── Form Inputs ─── */
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block; font-size: 13px; font-weight: 700;
    color: var(--ink); margin-bottom: 8px; letter-spacing: .3px;
    font-family: var(--font-display); font-style: italic;
}
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%; padding: 14px 18px; background: var(--paper);
    border: 2px solid var(--ink); border-radius: var(--radius-sm);
    color: var(--ink); font-size: 15px; font-family: var(--font);
    outline: none; transition: var(--transition); resize: none;
}
.form-field textarea { border-radius: var(--radius); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--red); box-shadow: var(--shadow-red);
    transform: translate(-2px,-2px);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--ink-5); }
.form-field select { -webkit-appearance: none; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%231a1410' stroke-width='2' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.form-field select option { background: var(--paper); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .section { padding: 76px 0; }
    .page-header { padding: 130px 0 54px; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .footer-cols { grid-template-columns: 1fr; }
}

/* ─── Download Modal ─── */
.dl-modal-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(26,20,16,.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.dl-modal-overlay.active { opacity: 1; pointer-events: all; }
.dl-modal {
    background: var(--paper); border: 2px solid var(--ink);
    border-radius: var(--radius); padding: 40px 36px;
    max-width: 500px; width: 100%;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform .3s var(--ease-bounce);
    position: relative;
}
.dl-modal-overlay.active .dl-modal { transform: translateY(0); }
.dl-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; cursor: pointer;
    font-size: 22px; color: var(--ink-4); line-height: 1;
    padding: 4px 8px; transition: color .2s;
}
.dl-modal-close:hover { color: var(--red); }
.dl-modal-kicker {
    font-family: var(--font-hand); font-size: 26px;
    color: var(--red); transform: rotate(-2deg);
    display: inline-block; margin-bottom: 4px;
}
.dl-modal h3 {
    font-family: var(--font-display); font-size: 26px;
    font-weight: 500; letter-spacing: -.5px;
    color: var(--ink); margin-bottom: 8px; line-height: 1.2;
}
.dl-modal p {
    font-size: 15px; color: var(--ink-4);
    font-family: var(--font-display); font-style: italic;
    line-height: 1.6; margin-bottom: 20px;
}
.dl-modal-form { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-modal-form input[type="email"] {
    flex: 1; min-width: 200px; padding: 13px 16px;
    border: 2px solid var(--ink); border-radius: var(--radius-sm);
    font-size: 15px; font-family: var(--font);
    background: var(--cream); color: var(--ink); outline: none;
    transition: var(--transition);
}
.dl-modal-form input[type="email"]:focus {
    border-color: var(--red); box-shadow: 4px 4px 0 var(--red);
    transform: translate(-2px,-2px);
}
.dl-modal-success {
    display: none; text-align: center; padding: 20px 0 8px;
}
.dl-modal-success .tick {
    font-size: 48px; display: block; margin-bottom: 10px;
}
.dl-modal-success h4 {
    font-family: var(--font-display); font-size: 22px;
    font-weight: 500; color: var(--ink); margin-bottom: 6px;
}
.dl-modal-success p {
    font-size: 14px; color: var(--ink-4); margin: 0;
    font-family: var(--font-display); font-style: italic;
}
@media (max-width: 520px) {
    .dl-modal { padding: 28px 22px; }
    .dl-modal-form { flex-direction: column; }
    .dl-modal-form input[type="email"] { min-width: unset; }
}
