/* ============================================
   Mikaiyo Tech — Shared Styles
   ============================================ */

/* --- Base --- */
body {
    background-color: #fff8f5;
    color: #4a4643;
    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.page-visible  { opacity: 1; }
body.page-leaving  { opacity: 0; transition: opacity 0.12s ease; }

::selection {
    background-color: #f9d9c8;
    color: #755e50;
}

/* --- Typography --- */
.hero-h1 {
    font-family: 'Noto Serif', serif;
    font-size: clamp(2.75rem, 5vw + 1rem, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #1e1b19;
}

.section-h2 {
    font-family: 'Noto Serif', serif;
    font-size: clamp(2rem, 3vw + 0.5rem, 2.5rem);
    line-height: 1.2;
    color: #1e1b19;
}

.item-h3 {
    font-family: 'Noto Serif', serif;
    font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
    line-height: 1.3;
    color: #1e1b19;
}

.body-main {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4a4643;
}

.label-caps {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #715a4c;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: #4a4643;
    color: #ffffff;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    transition: opacity 0.3s ease, transform 0.4s ease;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: #efe7e2;
    color: #4a4643;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    transition: opacity 0.3s ease, transform 0.4s ease;
    cursor: pointer;
    border: none;
}

.btn-secondary:hover {
    opacity: 0.85;
}

.btn-secondary:active {
    transform: scale(0.97);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a4643;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: gap 0.3s ease;
}

.btn-text:hover {
    gap: 0.75rem;
}

/* --- Cards --- */
.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 3rem;
    transition: background-color 0.4s ease, transform 0.4s ease;
}

.card:hover {
    background-color: #e9e1dd;
}

.card-dark {
    background-color: #4a4643;
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 3rem;
}

.card-surface {
    background-color: #f4ece8;
    border-radius: 0.75rem;
    padding: 3rem;
}

.card-elevated {
    background-color: #efe7e2;
    border-radius: 0.75rem;
    padding: 3rem;
}

/* --- Form Inputs --- */
.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: #faf2ee;
    border: 1px solid #d0c4bd;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: #1e1b19;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-field:focus {
    border-color: #715a4c;
    box-shadow: 0 0 0 3px rgba(113, 90, 76, 0.12);
}

.input-field::placeholder {
    color: #7e756f;
}

/* --- Navigation --- */
.nav-scrolled {
    background-color: rgba(255, 248, 245, 0.95) !important;
    box-shadow: 0 1px 0 rgba(208, 196, 189, 0.3);
}

.nav-link {
    color: #715a4c;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #4a4643;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #4a4643;
}

/* --- Mobile Nav --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: rgba(255, 248, 245, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu a {
    font-family: 'Noto Serif', serif;
    font-size: 2rem;
    color: #1e1b19;
    transition: opacity 0.3s ease;
}

.mobile-menu a:hover {
    opacity: 0.6;
}

/* --- Material Symbols --- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.stagger-1 { transition-delay: 0.1s; }
.animate-on-scroll.stagger-2 { transition-delay: 0.2s; }
.animate-on-scroll.stagger-3 { transition-delay: 0.3s; }
.animate-on-scroll.stagger-4 { transition-delay: 0.4s; }

/* --- Hero Load Animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-animate-delay-1 {
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-animate-delay-2 {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-animate-delay-3 {
    animation: fadeInUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-animate,
    .hero-animate-delay-1,
    .hero-animate-delay-2,
    .hero-animate-delay-3 {
        animation: none;
        opacity: 1;
    }
}

/* --- Utility --- */
.max-w-prose {
    max-width: 70ch;
}

.section-spacing {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* --- Hamburger Icon --- */
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #4a4643;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
