/* ==========================================================================
   PLOTTEN PAGE – CUTTING ANIMATION & ENHANCED DESIGN
   ========================================================================== */

/* ---- HERO SECTION ---- */
.plotter-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    min-height: 90vh;
    background-color: #1a1210;
    color: var(--light-color);
    overflow: hidden;
    position: relative;
    padding: 80px 5%;
}

/* Cutting Mat Background */
.plotter-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.plotter-grid {
    position: absolute;
    inset: -20px;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridFade 5s ease-in-out infinite;
}

@keyframes gridFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Moving cut lines across background */
.cut-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    height: 1px;
    opacity: 0;
    animation: cutLineSweep 8s ease-in-out infinite;
}

.cut-line-1 { top: 25%; left: -100%; width: 100%; animation-delay: 0s; }
.cut-line-2 { top: 55%; left: -100%; width: 70%; animation-delay: 3s; height: 1px; }
.cut-line-3 { top: 78%; left: -100%; width: 85%; animation-delay: 6s; }

@keyframes cutLineSweep {
    0%   { left: -100%; opacity: 0; }
    10%  { opacity: 1; }
    55%  { left: 100%; opacity: 1; }
    65%  { opacity: 0; }
    100% { left: 100%; opacity: 0; }
}

/* Floating Glow Orbs */
.hero-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orbFloat 15s ease-in-out infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
    top: -10%;
    left: -5%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(218, 71, 50, 0.3), transparent 70%);
    bottom: -10%;
    right: -5%;
    animation-delay: -7s;
}

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -50px) scale(1.15); }
    66%  { transform: translate(-30px, 30px) scale(0.9); }
    100% { transform: translate(20px, -20px) scale(1.05); }
}

/* Background particles */
.plotter-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.plotter-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    opacity: 0;
    animation: scrapRise 4s ease-in-out infinite;
}

@keyframes scrapRise {
    0%   { transform: translateY(0) rotate(0deg) scale(0); opacity: 0; }
    15%  { opacity: 0.6; transform: scale(1); }
    100% { transform: translateY(-100px) rotate(180deg) scale(0); opacity: 0; }
}

/* ---- HERO CONTENT ---- */
.plotter-hero-content {
    flex: 0 1 auto;
    width: auto;
    max-width: 600px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.plotter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: var(--light-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeSlideUpP 0.8s ease forwards 0.3s;
}

.badge-dot-p {
    width: 8px;
    height: 8px;
    background: var(--light-color);
    border-radius: 1px;
    display: inline-block;
    transform: rotate(45deg);
    animation: dotPulseP 2s ease-in-out infinite;
}

@keyframes dotPulseP {
    0%, 100% { opacity: 1; transform: rotate(45deg) scale(1); }
    50%       { opacity: 0.6; transform: rotate(45deg) scale(1.4); }
}

/* Title */
.plotter-title {
    font-size: 4.2rem;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    font-weight: 800;
    overflow: hidden;
}

.title-line { display: block; overflow: hidden; }

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: titleRevealP 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-line-1 .title-word:nth-child(1) { animation-delay: 0.4s; }
.title-line-1 .title-word:nth-child(2) { animation-delay: 0.5s; }
.title-line-1 .title-word:nth-child(3) { animation-delay: 0.6s; }
.title-line-2 .title-word:nth-child(1) { animation-delay: 0.7s; }
.title-line-2 .title-word:nth-child(2) { animation-delay: 0.8s; }

@keyframes titleRevealP {
    to { opacity: 1; transform: translateY(0); }
}

.title-word + .title-word { margin-left: 0.3em; }

/* Description */
.hero-description {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
    opacity: 0;
    color: rgba(250, 247, 246, 0.8);
    animation: fadeSlideUpP 0.8s ease forwards 0.9s;
    line-height: 1.7;
}

@keyframes fadeSlideUpP {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Stats Row */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeSlideUpP 0.8s ease forwards 1.1s;
}

.stat-item  { display: flex; flex-direction: column; }
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--light-color);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-unit  { font-size: 1.2rem; font-weight: 700; color: var(--light-color); }
.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Scroll CTA */
.scroll-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--light-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    animation: fadeSlideUpP 0.8s ease forwards 1.3s;
    transition: all 0.3s ease;
}

.scroll-cta:hover { color: rgba(255,255,255,0.7); gap: 14px; }

.scroll-arrow {
    display: flex;
    animation: bounceDownP 2s ease-in-out infinite;
}

@keyframes bounceDownP {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* ---- HERO IMAGE / CUT AREA ---- */
.plotter-hero-image {
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
}

.cut-svg-wrapper {
    position: relative;
    width: 420px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.cut-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Cut paths – same color as background = completely invisible before cut */
.cut-path {
    fill: #1a1210;
    stroke: transparent;
    stroke-width: 0.8;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

/* When cut is complete – shape stays dark, only the cut line remains faint */
.cut-path.cut-done {
    fill: #1a1210;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.6;
    transition: stroke 0.8s ease, stroke-width 0.6s ease;
}

/* Cutter point – sharp crosshair (no glow) */
.cutter-point {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
}

.cutter-point::before,
.cutter-point::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
}

.cutter-point::before {
    width: 1px;
    height: 18px;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
}

.cutter-point::after {
    width: 18px;
    height: 1px;
    top: 50%;
    left: -2px;
    transform: translateY(-50%);
}

/* Center diamond of cutter */
.cutter-point-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 0;
    transform: translate(-50%, -50%) rotate(45deg);
    top: 50%;
    left: 50%;
}

.cutter-point.active { opacity: 1; }

/* Material scraps flying off */
.cut-scraps {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 15;
}

.cut-scrap {
    position: absolute;
    width: 5px;
    height: 2px;
    border-radius: 1px;
    opacity: 0;
}

.cut-scrap.active {
    animation: scrapFly 0.55s ease-out forwards;
}

@keyframes scrapFly {
    0%   { opacity: 0.9; transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { opacity: 0;   transform: translate(var(--scrap-x, 18px), var(--scrap-y, -18px)) rotate(var(--scrap-r, 90deg)) scale(0); }
}


/* ---- FEATURES BAR ---- */
.features-bar {
    background-color: var(--primary-color);
    color: var(--dark-color);
    display: flex;
    justify-content: space-around;
    padding: 4rem 5%;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.features-bar .feature-item {
    text-align: center;
    max-width: 300px;
    position: relative;
    padding-bottom: 1rem;
    cursor: default;
}

.features-bar .feature-item .icon-box {
    width: 64px;
    height: 64px;
    background-color: var(--dark-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.features-bar .feature-item:hover .icon-box {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(69, 53, 50, 0.3);
}

.feature-hover-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--dark-color);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover .feature-hover-line { width: 60px; }


/* ---- MATERIAL SECTION ---- */
.material-section {
    padding: 100px 5%;
    background-color: #fff;
    position: relative;
}

.section-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding: 4px 16px;
    border: 1px solid rgba(218, 71, 50, 0.2);
    border-radius: 50px;
}

.section-intro h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-intro p { color: #888; font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.material-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.material-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 25px 50px rgba(69, 53, 50, 0.18);
}

.card-glow {
    position: absolute;
    inset: -2px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.material-card:hover .card-glow { opacity: 0.3; }

.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.material-card:hover .card-content h3 { color: var(--secondary-color); }
.card-content p { color: #666; font-size: 0.95rem; margin-bottom: 1rem; flex-grow: 1; }


/* ---- PROCESS / TIMELINE ---- */
.process-section {
    background-color: var(--light-color);
    padding: 100px 5%;
    overflow: hidden;
    position: relative;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: space-between;
}

.timeline-progress-track {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ddd;
    z-index: 0;
    border-radius: 2px;
    overflow: hidden;
}

.timeline-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(255, 201, 52, 0.4);
}

.timeline-step {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-step.visible { opacity: 1; transform: translateY(0); }
.timeline-step[data-step="2"] { transition-delay: 0.2s; }
.timeline-step[data-step="3"] { transition-delay: 0.4s; }

.step-circle {
    width: 60px;
    height: 60px;
    background-color: var(--dark-color);
    color: var(--light-color);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 4px solid var(--light-color);
    box-shadow: 0 0 0 4px var(--primary-color);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.step-number { font-size: 1.15rem; font-weight: 700; z-index: 2; }

.step-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    animation: stepPulseP 2.5s ease-in-out infinite;
}

.timeline-step[data-step="2"] .step-pulse { animation-delay: 0.8s; }
.timeline-step[data-step="3"] .step-pulse { animation-delay: 1.6s; }

@keyframes stepPulseP {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

.timeline-step:hover .step-circle {
    transform: scale(1.15);
    background-color: var(--secondary-color);
    box-shadow: 0 0 0 4px var(--secondary-color), 0 10px 25px rgba(218, 71, 50, 0.3);
}

.step-content {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
    min-height: 220px;
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255, 201, 52, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-step:hover .step-content { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.timeline-step:hover .step-content::before { opacity: 1; }

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 201, 52, 0.1);
    border-radius: 12px;
    margin: 0 auto 1rem auto;
    color: var(--primary-color);
    transition: all 0.4s ease;
}

.timeline-step:hover .step-icon { background: rgba(218, 71, 50, 0.1); color: var(--secondary-color); transform: scale(1.1) rotate(5deg); }

.step-content h4 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--dark-color); }
.step-content p  { font-size: 0.95rem; color: #666; line-height: 1.6; }


/* ---- CTA SECTION ---- */
.plotter-cta { position: relative; overflow: hidden; }

.cta-floating-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.cta-particle {
    position: absolute;
    border-radius: 1px;
    opacity: 0;
    animation: ctaScrapRise 5s ease-in-out infinite;
}

@keyframes ctaScrapRise {
    0%   { transform: translateY(0) rotate(0deg) scale(0); opacity: 0; }
    10%  { opacity: 0.7; transform: scale(1); }
    100% { transform: translateY(-200px) translateX(20px) rotate(180deg) scale(0); opacity: 0; }
}

.cta-tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.final-cta-section .cta-content { position: relative; z-index: 2; }
.final-cta-section .cta-content h2 { font-size: 3rem; margin-bottom: 1rem; font-weight: 700; }

.text-shimmer {
    background: linear-gradient(90deg,
        var(--light-color) 0%, var(--primary-color) 25%,
        var(--light-color) 50%, var(--primary-color) 75%,
        var(--light-color) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerP 3s ease-in-out infinite;
}

@keyframes shimmerP {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.cta-glow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease !important;
}

.cta-glow::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.cta-glow:hover::before { left: 100%; }
.cta-glow:hover { transform: translateY(-3px) scale(1.05) !important; box-shadow: 0 10px 30px rgba(255, 201, 52, 0.4) !important; }
.cta-glow svg { transition: transform 0.3s ease; }
.cta-glow:hover svg { transform: translateX(4px); }


/* ---- SCROLL REVEAL ---- */
.material-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.material-card.visible      { opacity: 1; transform: translateY(0); }
.material-card:nth-child(1) { transition-delay: 0s; }
.material-card:nth-child(2) { transition-delay: 0.1s; }
.material-card:nth-child(3) { transition-delay: 0.2s; }
.material-card:nth-child(4) { transition-delay: 0.3s; }

.section-intro {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.section-intro.visible { opacity: 1; transform: translateY(0); }

.feature-item {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.feature-item.visible      { opacity: 1; transform: translateY(0); }
.feature-item:nth-child(1) { transition-delay: 0.1s; }
.feature-item:nth-child(2) { transition-delay: 0.2s; }
.feature-item:nth-child(3) { transition-delay: 0.3s; }

.final-cta-section .cta-content {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.final-cta-section .cta-content.visible { opacity: 1; transform: translateY(0) scale(1); }


/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .plotter-hero {
        flex-direction: column;
        min-height: auto;
        gap: 1.5rem;
        padding: 40px 5% 30px;
        align-items: flex-start;
    }

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

    .plotter-title { font-size: 2.6rem; margin-bottom: 1rem; }

    .hero-description { font-size: 1.1rem; margin-bottom: 1.5rem; }

    .hero-stats { flex-direction: row; gap: 1.2rem; margin-bottom: 1.5rem; width: 100%; }
    .stat-item  { flex: 1; min-width: 0; }
    .stat-number { font-size: 1.8rem; }
    .stat-unit   { font-size: 0.9rem; }
    .stat-label  { font-size: 0.65rem; letter-spacing: 1px; }
    .stat-divider { width: 1px; height: 40px; }

    .plotter-hero-image { width: 100%; justify-content: center; order: -1; }
    .cut-svg-wrapper { width: 260px; }

    .scroll-cta { margin-top: 0.5rem; }

    .features-bar { padding: 2rem 5%; }
    .feature-item { padding: 1.2rem; }

    .timeline-container { flex-direction: column; gap: 2rem; }
    .timeline-progress-track { display: none; }
    .timeline-step { padding: 0; }

    .final-cta-section .cta-content h2 { font-size: 2rem; }
    .final-cta-section { padding: 3rem 5%; }
}

@media (max-width: 600px) {
    .plotter-hero { padding: 30px 4% 20px; gap: 1rem; }
    .plotter-title { font-size: 2rem; margin-bottom: 0.8rem; }
    .hero-description { font-size: 1rem; margin-bottom: 1rem; }

    .hero-stats  { flex-direction: row; gap: 0.8rem; margin-bottom: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-unit   { font-size: 0.8rem; }
    .stat-label  { font-size: 0.6rem; letter-spacing: 0.5px; }
    .stat-divider { height: 30px; }

    .cut-svg-wrapper { width: 200px; }

    .section-intro h2 { font-size: 2rem; }
    .plotter-badge { font-size: 0.7rem; }
}
