:root {
    --c-base: #FFFAF0;
    /* Floral White */
    --c-main: #8D6E63;
    /* Brown */
    --c-accent: #F4A460;
    /* Orange */
    --c-white: #FFFFFF;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    --shadow-soft: 0 8px 24px rgba(141, 110, 99, 0.1);

    --font-main: 'Zen Maru Gothic', sans-serif;
    --transition-speed: 0.6s;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--c-base);
    color: var(--c-main);
    line-height: 1.8;
    overflow-x: hidden;
    margin: 0;
}

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

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: var(--c-main);
}

/* Utilities */
.section-padding {
    padding: 5rem 1.5rem;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: table;
    /* To allow centering with auto margins */
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--c-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.badge {
    background-color: var(--c-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Header */
.site-header {
    text-align: center;
    padding: 3rem 1rem;
}

.logo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.9rem;
    color: var(--c-accent);
    letter-spacing: 0.1em;
}

/* Hero Section */
.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 4rem 1rem 2rem;
    background: radial-gradient(circle at center, #fff 0%, var(--c-base) 70%);
}

.hero-content {
    margin-bottom: 2rem;
}

.main-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-text {
    font-size: 1.1rem;
    color: #666;
    letter-spacing: 0.05em;
}

.hero-visual {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* Intro Section */
.intro-section {
    background-color: #fff;
    padding: 5rem 1.5rem;
}

.intro-heading {
    font-size: 1.6rem;
    color: var(--c-main);
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.05rem;
    line-height: 2;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

/* Concept Section */
.bg-warm {
    background-color: var(--c-base);
}

.concept-lead {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 3rem;
}

/* Sensor Visualizer (Preserved) */
.sensor-visualizer {
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sensor-box {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sensor-box.full-frame {
    width: 360px;
    height: 240px;
    background-color: var(--c-white);
    border: 2px solid var(--c-main);
    z-index: 1;
}

/* Animations */
@keyframes pulse-alert {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 100, 100, 0.7);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 100, 100, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 100, 100, 0);
        transform: scale(1);
    }
}

.sensor-box.smartphone {
    width: 61.6px;
    height: 46.2px;
    background-color: var(--c-accent);
    color: white;
    font-size: 0.6rem;
    z-index: 2;
    text-align: center;
    line-height: 1.1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse-alert 2s infinite;
}

/* Fallback Placeholders */
.placeholder-dull {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a89f91 0%, #8c8273 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eee;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.placeholder-vivid {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #feada6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* Responsive */
@media (max-width: 768px) {

    .case-study,
    .case-study.right-layout {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    /* Fix Case 01 Mobile Layout */
    .case-study .comparison-grid.tight {
        display: flex;
        flex-direction: column;
    }

    .case-study .comparison-grid.tight .compare-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .comparison-grid.tight {
        gap: 0.5rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .comparison-table {
        flex-direction: column;
    }

    .comp-col.camera {
        transform: scale(1);
    }

    .sensor-box.full-frame {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 3/2;
    }
}

.label-text {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--c-main);
}

/* Animation for Visualizer */
@keyframes expandSensor {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.sensor-visualizer.visible .sensor-box.full-frame {
    animation: expandSensor 1.5s forwards;
}

.concept-text {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.1rem;
}

/* Feature Section (Zig-Zag Layout) */
.mb-large {
    margin-bottom: 4rem;
}

.case-study {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    margin-bottom: 4rem;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.case-study.right-layout {
    flex-direction: row-reverse;
}

.c-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

.c-visual {
    flex: 1.1;
}

.case-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--c-accent);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.case-study h4 {
    font-size: 1.4rem;
    color: var(--c-main);
    margin-bottom: 1rem;
}

.case-study p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

/* Comparison Grid Tight */
.comparison-grid.tight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.compare-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.compare-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.compare-item:hover img {
    transform: scale(1.05);
}

.c-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 4px 0;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
}

.c-label.bad {
    background: rgba(80, 80, 80, 0.85);
}

.c-label.good {
    background: rgba(244, 164, 96, 0.9);
}

/* Gallery Section */
.gallery-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 2rem;
}

.polaroid {
    background: white;
    padding: 1rem 1rem 3rem 1rem;
    box-shadow: var(--shadow-soft);
    border-radius: 2px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    width: 260px;
}

.polaroid:nth-child(2) {
    transform: rotate(2deg);
    margin-top: 2rem;
}

.polaroid:nth-child(3) {
    transform: rotate(-1deg);
}

.polaroid:hover {
    transform: rotate(0) scale(1.05);
    z-index: 10;
}

.polaroid .photo {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #eee;
    margin-bottom: 0.5rem;
}

.polaroid .caption {
    text-align: center;
    color: #666;
    margin-top: 0.5rem;
}

/* Comparison Table Section */
.comparison-table {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.comp-col {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid #eee;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.comp-col.camera {
    border: 2px solid var(--c-accent);
    background: #fffaf0;
    transform: scale(1.02);
}

.tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-accent);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.comp-col h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--c-main);
}

.comp-col .price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--c-main);
    margin-bottom: 2rem;
}

.comp-col ul {
    list-style: none;
    text-align: left;
    margin: 0 auto;
    display: inline-block;
}

.comp-col ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: #666;
}

.comp-col ul li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: var(--c-accent);
    font-size: 0.8rem;
}

.comp-col.phone ul li::before {
    color: #ccc;
}

/* CTA */
.cta-area {
    margin-top: 4rem;
}

.final-msg {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--c-main);
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background-color: var(--c-accent);
    color: #fff;
    padding: 1.2rem 4rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(244, 164, 96, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(244, 164, 96, 0.5);
}

/* Footer */
.footer {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--c-main);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5rem;
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* Responsive */
@media (max-width: 768px) {

    .case-study,
    .case-study.right-layout {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .comparison-grid.tight {
        gap: 0.5rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .comparison-table {
        flex-direction: column;
    }

    .comp-col.camera {
        transform: scale(1);
    }
}