/* ============================================================
   Big Ideas Designs — bigideasdesigns.com
   Single stylesheet. Dark cinematic, gold-on-slate accents.
   ============================================================ */

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

:root {
    --bg:            #0a0a0a;
    --surface:       #111111;
    --border:        #1a1a1a;
    --border-hover:  #2a2a2a;

    --text:          #ffffff;
    --text-dim:      #888888;
    --text-muted:    #555555;

    --accent:        #b0bcd1;
    --accent-bright: #d4def0;
    --accent-dim:    #8c98ad;
    --accent-glow:   rgba(176, 188, 209, 0.3);

    --gold:          #d4af37;
    --gold-glow:     rgba(212, 175, 55, 0.25);
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}
html { scroll-behavior: smooth; }

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}
body.loading { overflow: hidden; }

.mono { font-family: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

::selection { background: var(--accent); color: var(--bg); }

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

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-icon  { font-size: 32px; margin-bottom: 16px; }
.preloader-text  { font-size: 12px; color: var(--text-dim); letter-spacing: 4px; text-transform: uppercase; }

/* ============================================================
   CUSTOM CURSOR (dot + lagging ring)
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
    body, a, button, .btn, input, textarea, select { cursor: none; }
}
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 10000;
    will-change: transform;
    mix-blend-mode: difference;
}
.cursor-dot {
    width: 6px; height: 6px;
    background: var(--accent-bright);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}
.cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid var(--accent-bright);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.2s ease,
                background 0.2s ease;
}
.cursor-ring.hover {
    width: 64px; height: 64px;
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.06);
}
.cursor-dot.hover {
    width: 4px; height: 4px;
    background: var(--gold);
}
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   PARTICLE CANVAS (mouse-reactive network behind page)
   ============================================================ */
.particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.7;
}

/* ============================================================
   GRID BACKGROUND (subtle SVG, vignette-faded)
   ============================================================ */
.grid-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.grid-svg { width: 100%; height: 100%; }

/* All page sections sit above the canvas + grid */
.site-header, .hero, .brief-section, .cta-section, .site-footer {
    position: relative;
    z-index: 2;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.4px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease,
                background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 18px 38px; font-size: 16px; }

.btn-primary {
    background: var(--gold);
    color: #0a0a0a;
    border-color: var(--gold);
    font-weight: 600;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.28);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-hover);
    color: var(--text-dim);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-arrow { transition: transform 0.3s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.magnetic {
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s ease;
}
.magnetic:hover {
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.35),
                0 0 0 1px rgba(212, 175, 55, 0.55);
}

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav { display: block; }
.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px clamp(20px, 4vw, 48px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.nav-brand {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    font-size: 14px;
    letter-spacing: 1px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}
.brand-mark {
    color: var(--gold);
    font-size: 1.2em;
    margin-right: 0.5em;
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
}
.nav-brand:hover .brand-mark {
    transform: rotate(180deg) scale(1.1);
    color: var(--accent-bright);
}
.brand-name { font-size: 13px; letter-spacing: 1.5px; }
.nav-links { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(100px, 14vw, 140px) 0 80px;
    position: relative;
}
.hero-content { max-width: min(880px, 100%); }

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    transform: scale(0);
    transition: transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}
body:not(.loading) .hero-orb { transform: scale(1); }
.hero-orb-1 {
    width: min(520px, 80vw); height: min(520px, 80vw);
    top: 8%; left: -10%;
    background: radial-gradient(circle, rgba(176, 188, 209, 0.12), transparent 60%);
}
.hero-orb-2 {
    width: min(420px, 70vw); height: min(420px, 70vw);
    bottom: 12%; right: -8%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.10), transparent 60%);
}

.hero-label {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.hero-label::after {
    content: '_';
    color: var(--gold);
    animation: blink 1.1s steps(2) infinite;
    margin-left: 4px;
}
@keyframes blink { 50% { opacity: 0; } }

/* HERO H1 — line slide-up + gold sweep */
.hero-h1 {
    /* Conservative scaling — even longest line "Built to Outperform." stays inside container */
    font-size: clamp(40px, 7.2vw, 104px);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    position: relative;
    /* Allow the word to break if absolutely necessary, never overflow */
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}
.hero-h1 .line { display: block; overflow: hidden; position: relative; }
.hero-h1 .line-inner {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.7s ease;
}
.hero-h1.revealed .line-inner { transform: translateY(0); opacity: 1; }
.hero-h1 .line:nth-child(1) .line-inner { transition-delay: 0.30s; }
.hero-h1 .line:nth-child(2) .line-inner { transition-delay: 0.45s; }
.hero-h1 .line:nth-child(3) .line-inner { transition-delay: 0.60s; }
.hero-h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.hero-h1 .line::after {
    content: "";
    position: absolute;
    top: 0; left: -30%;
    width: 30%; height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 175, 55, 0.45) 40%,
        rgba(212, 175, 55, 0.65) 50%,
        rgba(212, 175, 55, 0.45) 60%,
        transparent);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
    filter: blur(8px);
    will-change: transform, opacity;
}
.hero-h1.revealed .line:nth-child(1)::after { animation: heroSweep 1.4s 0.6s  ease-out forwards; }
.hero-h1.revealed .line:nth-child(2)::after { animation: heroSweep 1.4s 0.75s ease-out forwards; }
.hero-h1.revealed .line:nth-child(3)::after { animation: heroSweep 1.4s 0.9s  ease-out forwards; }
@keyframes heroSweep {
    0%   { transform: translateX(0);    opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateX(450%); opacity: 0; }
}
.hero-h1:hover .line:nth-child(1) .line-inner { transform: translateX(4px);  transition-duration: 0.4s; transition-delay: 0s; }
.hero-h1:hover .line:nth-child(2) .line-inner { transform: translateX(8px);  transition-duration: 0.4s; transition-delay: 0.05s; }
.hero-h1:hover .line:nth-child(3) .line-inner { transform: translateX(12px); transition-duration: 0.4s; transition-delay: 0.1s; }

.hero-bottom { max-width: 640px; }
.hero-description {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ============================================================
   BRIEF SECTION (3 numbered items)
   ============================================================ */
.brief-section {
    padding: 100px 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.brief-section::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: min(80%, 800px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 175, 55, 0.3) 20%,
        rgba(176, 188, 209, 0.3) 50%,
        rgba(212, 175, 55, 0.3) 80%,
        transparent);
    background-size: 200% 100%;
    animation: shimmer-line 6s linear infinite;
}
@keyframes shimmer-line {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.brief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}
.brief-item.tilt {
    position: relative;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255,255,255,0.01);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(0) rotateY(0);
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    will-change: transform;
}
.brief-item.tilt > * {
    position: relative;
    z-index: 2;
    transform: translateZ(20px);
}
.brief-item.tilt:hover { border-color: var(--gold); }
.brief-item.tilt:hover .tilt-glow { opacity: 1; }
.tilt-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(212, 175, 55, 0.10),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateZ(0);
    z-index: 1;
}
.brief-num {
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 16px;
}
.brief-item h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.brief-item p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================================
   CTA / CONTACT SECTION
   ============================================================ */
.cta-section {
    padding: 100px 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.cta-section::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: min(80%, 800px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 175, 55, 0.3) 20%,
        rgba(176, 188, 209, 0.3) 50%,
        rgba(212, 175, 55, 0.3) 80%,
        transparent);
    background-size: 200% 100%;
    animation: shimmer-line 6s linear infinite;
}
.cta-content { text-align: center; }
.cta-main { max-width: 640px; margin: 0 auto; }
.cta-main h2 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.cta-main > p {
    color: var(--text-dim);
    font-size: 16px;
    margin-bottom: 32px;
}

/* ============================================================
   CONTACT FORM (floating labels)
   ============================================================ */
.contact-form {
    margin: 48px auto 0;
    max-width: 520px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.field { position: relative; display: block; }
.field input, .field textarea {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    padding: 22px 0 10px 0;
    outline: none;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.3s ease;
}
.field textarea {
    resize: vertical;
    min-height: 96px;
    padding-top: 28px;
}
.field input:hover, .field textarea:hover { border-color: var(--accent-dim); }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field input:-webkit-autofill, .field textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 9999s ease-in-out 0s;
}
.field label {
    position: absolute;
    left: 0;
    top: 22px;
    color: var(--text-muted);
    font-size: 14px;
    font-family: 'Space Mono', monospace;
    letter-spacing: 1px;
    pointer-events: none;
    transition: top 0.25s ease, font-size 0.25s ease, color 0.25s ease, letter-spacing 0.25s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}
.field-line {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), var(--accent-bright), var(--gold));
    background-size: 200% 100%;
    animation: shimmer-line 4s linear infinite;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
.field input:focus ~ .field-line, .field textarea:focus ~ .field-line {
    width: 100%; left: 0;
}

/* Honeypot — exhaustively hidden */
.field-honeypot, .field-honeypot * {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.form-actions { margin-top: 8px; text-align: center; }
.form-actions .btn { min-width: 220px; }

.contact-form.sending .btn-arrow { display: none; }
.contact-form.sending .btn-label::after { content: "..."; margin-left: 2px; }
.contact-form.sending button[type="submit"] { pointer-events: none; opacity: 0.7; }

.form-status {
    margin-top: 4px;
    text-align: center;
    font-size: 14px;
    min-height: 22px;
    transition: color 0.3s ease;
}
.form-status.error { color: #ff8b7a; }
.form-status.success { color: var(--gold); }

@media (max-width: 600px) { .contact-form { gap: 24px; } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 32px 0;
}
.footer-bottom {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    letter-spacing: 1px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hero-h1 .line-inner,
    [data-reveal],
    .hero-orb,
    .magnetic,
    .brief-item.tilt {
        transition: opacity 0.3s ease !important;
        transform: none !important;
    }
    .particle-canvas,
    .cursor-dot,
    .cursor-ring { display: none; }
    body, a, button, .btn { cursor: auto !important; }
    .hero-h1 .line::after { display: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .brief-section, .cta-section { padding: 80px 0; }
    .nav-links { gap: 12px; }
    .hero-h1 { margin-bottom: 36px; }
    .hero-description { font-size: 16px; }
}
@media (max-width: 480px) {
    .nav-brand .brand-name { display: none; }   /* show only the diamond mark on tiny screens */
    .nav-container { padding: 12px 20px; }
    .brief-grid { grid-template-columns: 1fr; gap: 20px; }
    .brief-item.tilt { padding: 24px; }
}

/* ============================================================
   OPTIMIZATION + A11Y
   ============================================================ */

/* Skip-to-content for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10001;
    padding: 12px 18px;
    background: var(--gold);
    color: #0a0a0a;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    left: 0;
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
}

/* Focus-visible — visible only on keyboard focus, not mouse click */
*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Hint browser to skip painting off-screen sections (perf) */
.brief-section, .cta-section, .site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* Reduce paint layers on scroll for the orbs */
.hero-orb, .particle-canvas { will-change: transform; }
