/* PÄÄTYYLIT */

/* --- SMOOTH SCROLLING (Global Fix) --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

#menu, #lunch, #story, #info {
    scroll-margin-top: 80px;
}

/* --- RESET & BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-brand-cream);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-bar-height) + var(--spacing-md));
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-secondary);
}

img {
  max-width: 100%;
  display: block;
}

/* --- LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* --- SECTION BACKGROUND LOGIC --- */
/* Story Section: Light Pink (Blush White) - Sama kuin Hero */
#story, 
.section-story {
    background-color: var(--color-brand-cream); 
    color: var(--color-text-primary);
    padding: var(--spacing-xl) var(--spacing-md);
    margin-top: 0;
}

/* Varmistetaan että kortit pysyvät valkoisina */
#story .card, 
#info .card {
    background-color: var(--color-surface);
}

/* --- HERO SECTION --- */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  background-color: var(--color-brand-cream); /* Blush White */
  position: relative;
  overflow: hidden; /* Estää animaation pursuamisen ulos */
}

.hero-title {
  display: none; /* Piilotettu, koska logo korvaa tekstin */
}

/* --- LOGO ANIMATION & SIZE --- */

/* 1. Animaation määrittely: Zoom 1.15 -> 1.01 */
@keyframes slowZoom {
  from {
    transform: scale(1.15); /* Aloita hieman ylisuurena */
    opacity: 0; /* Pieni fade-in alkuun */
  }
  15% {
    opacity: 1;
  }
  to {
    transform: scale(1.01); /* Päädy normaaliin kokoon (pieni overlap estää viivat) */
    opacity: 1;
  }
}

.hero-logo-container {
    aspect-ratio: 1960 / 1120;
    
    /* LOGON KOKO: */
    /* Täyttää mobiilissa lähes koko ruudun leveyden (95vw) ja maksimi 1100px */
    width: clamp(340px, 95vw, 1100px);
    
    margin: 0 auto var(--spacing-lg) auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Leikkaa ylisuuren kuvan reunat pois animaation alussa */
    overflow: hidden; 
    z-index: 1; 
}

/* Kohdistetaan animaatio suoraan SVG:hen kontin sisällä */
.hero-logo-container svg {
    width: 100%;
    height: 100%;
    /* Animaatio: 2s kesto, pehmeä liike */
    animation: slowZoom 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: center center;
    display: block; /* Poistaa haamuviivat */
    will-change: transform; 
    outline: 1px solid transparent;
}

/* Desktop säätö logolle */
@media (min-width: 1024px) {
  .hero-logo-container {
    width: clamp(800px, 90vw, 1400px);
    margin-bottom: var(--spacing-xl);
  }
}

/* --- LUNCH/MENU SECTION --- */
.lunch-section, #lunch {
    background-color: var(--color-brand-cream); /* Blush White */
    color: var(--color-text-primary);
    padding: 4rem 1rem;
}

/* Kategoriat ja otsikot valikossa */
.menu-header {
    text-align: center;
    margin: 4rem 0 0.5rem 0; 
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.menu-header .section-title {
    color: var(--color-text-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.menu-subtitle {
    display: block;
    font-family: 'Lato', sans-serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    position: relative;
    display: inline-block;
}

.menu-subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--color-accent);
    margin: 8px auto 0 auto;
}

.lunch-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .lunch-grid {
        grid-template-columns: 1fr 2fr;
        grid-template-rows: auto auto;
        gap: 2rem;
    }
}

.lunch-card {
    background-color: var(--color-surface); /* White cards */
    color: var(--color-text-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- STORY SECTION --- */
.story-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-image-wrapper {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* KORJATTU: height: auto varmistaa että kuva pysyy suhteessa leveyteen */
.story-image {
    width: 100%;
    height: auto; /* FIX: Estää kuvan venymisen mobiilissa */
    max-width: 400px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    box-shadow: 10px 10px 0px rgba(26, 26, 26, 0.1);
    transition: border-radius 0.5s ease-in-out;
}

.story-image:hover {
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
}

.story-content {
    text-align: center;
    max-width: 600px;
}

.story-title {
    margin-bottom: 2rem;
    line-height: 1.2;
}

.story-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.story-signature {
    font-family: 'Brush Script MT', 'Cursive', sans-serif;
    font-size: 3rem;
    margin-top: 2rem;
    color: var(--color-text-primary);
    transform: rotate(-5deg);
}

@media (min-width: 900px) {
    .story-container {
        flex-direction: row;
        gap: 5rem;
        padding: 4rem 0;
    }
    .story-content {
        text-align: left;
        flex: 1;
    }
    .story-signature {
        text-align: left;
        margin-left: 1rem;
    }
    .story-image-wrapper {
        flex: 1;
    }
}

/* --- FOOTER SECTION (T-008 - UPDATED) --- */

#info,
.section-footer {
    /* Pakotetaan tumma tausta (Charcoal) ja vaalea teksti (Blush White) */
    background-color: #1A1A1A !important; 
    color: #F9EBEC !important;
    padding: 4rem 1rem 8rem 1rem; /* Reilu tila alareunaan */
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
        align-items: start; /* Estää venymisen */
    }
}

/* Pakotetaan kaikki footerin otsikot ja tekstit vaaleiksi */
.section-footer h1, 
.section-footer h2, 
.section-footer h3, 
.section-footer h4,
.footer-brand, 
.footer-heading, 
.footer-link, 
.hours-time,
.footer-address,
.copyright {
    color: #F9EBEC !important;
}

.footer-brand {
    font-family: var(--font-heading, sans-serif);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-heading {
    font-family: var(--font-heading, sans-serif);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

/* --- JAKOVIVA (Avoinna-tekstin alle) --- */
.footer-divider {
    width: 40px;
    height: 1px;
    background-color: #EAC8C5; /* Dusty Rose viiva */
    margin: 1.5rem auto 0 auto;
    opacity: 0.7;
}

@media (min-width: 900px) {
    .footer-divider {
        margin: 1.5rem 0 0 0; /* Vasemmalle desktopissa */
    }
}

.footer-link {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
    opacity: 0.9;
}

.footer-link:hover {
    border-color: #F9EBEC;
    opacity: 1;
}

/* --- ACTION NAPPI FOOTERISSA (.btn-nav-reserve) --- */
/* Ylikirjoitetaan footerin sisällä napin tyylit */
.section-footer .btn-nav-reserve {
    display: inline-block;
    background-color: #F9EBEC !important; /* Vaalea tausta */
    color: #1A1A1A !important; /* Tumma teksti */
    font-family: var(--font-heading, sans-serif);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 50px; /* Pillerimuoto */
    text-decoration: none;
    font-size: 0.9rem;
    /* Lisätty marginaalit: reilusti väliä ennen ja jälkeen */
    margin-top: 1rem;
    margin-bottom: 2.5rem; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* Syvä varjo */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    white-space: nowrap;
}

.section-footer .btn-nav-reserve:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    background-color: #ffffff !important;
}

/* --- SOME IKONIT (KORJATTU) --- */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center; /* Keskellä mobiilissa */
    margin-top: 0;
    /* Varmistetaan että ikonit ovat omalla rivillään */
    width: 100%; 
}

@media (min-width: 900px) {
    .social-links {
        justify-content: flex-start;
        /* Desktopissa ei tarvitse täyttää leveyttä */
        width: auto;
    }
}

.social-icon {
    width: 24px;
    height: 24px;
    /* Oletusväri */
    color: #F9EBEC;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: block; /* Varmistaa että ikoni ottaa tilan */
}

/* Varmistetaan että SVG:n sisällä olevat polut tottelevat väriä */
.social-icon path,
.social-icon circle,
.social-icon rect,
.social-icon line {
    stroke: currentColor; /* Jos ikonit käyttävät strokea */
    /* fill: currentColor;  Jos ikonit käyttävät filliä, poista kommentti tarvittaessa */
}

.social-icon:hover {
    opacity: 1;
    transform: scale(1.15); /* Selkeä suurennus */
    color: #EAC8C5; /* Dusty Rose hover */
    /* Lisätään hehku hoverilla */
    filter: drop-shadow(0 0 5px rgba(234, 200, 197, 0.5));
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 2rem;
    display: block;
}

/* --- FLOATING SOCIAL ICONS (KELLUVAT SOME-NAPIT) --- */
.floating-socials {
    position: fixed;
    z-index: 1001; /* Navigaation päällä */
    display: flex;
    gap: 12px;
}

/* Desktop: Oikea reuna, keskitetty pystysuunnassa */
@media (min-width: 900px) {
    .floating-socials {
        flex-direction: column;
        right: 30px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Mobile: Oikea alanurkka, navigaation yläpuolella */
@media (max-width: 899px) {
    .floating-socials {
        flex-direction: column;
        right: 16px;
        bottom: 90px; /* 80px bottom-nav + 10px väli */
    }
}

.float-icon {
    width: 44px;
    height: 44px;
    background-color: var(--color-surface); /* Valkoinen pallo */
    color: var(--color-text-primary); /* Tumma ikoni */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); /* Varjo erottaa taustasta */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.05);
}

.float-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.float-icon:hover {
    background-color: #EAC8C5; /* Dusty Rose */
    color: #1A1A1A;
    transform: scale(1.15) translateX(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* --- NAVIGATION --- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
    z-index: 1000;
    padding: 30px 0;
    display: none; 
}

.top-nav.is-scrolled {
    background-color: rgba(249, 235, 236, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-primary);
}

.nav-logo-svg {
    height: 92px; 
    width: auto; 
    display: block;
    max-width: 250px; 
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .top-nav { display: block; }
    
    .hero {
        padding-top: 110px !important;
    }
}

.top-nav-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

.top-nav-link:hover {
    opacity: 0.7;
}

/* Yleinen nappityyli navigaatiossa */
.btn-nav-reserve {
    background-color: var(--color-accent);
    color: #1A1A1A !important;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-nav-reserve:hover {
    transform: translateY(-2px);
    color: #000000 !important;
    box-shadow: 0 4px 10px rgba(26, 26, 26, 0.2);
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-bar-height);
    background-color: var(--color-surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 0.5rem;
}

@media (min-width: 900px) {
    .bottom-nav { display: none; }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--color-text-primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    stroke-width: 1.5;
    transition: transform 0.2s;
}

.nav-item.active .nav-icon {
    stroke: var(--color-text-primary);
    transform: translateY(-2px);
}

.nav-action-highlight {
    position: relative;
    top: -12px;
}

.nav-action-highlight .action-circle {
    background-color: var(--color-accent);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    color: var(--color-brand-cream);
    box-shadow: 0 4px 10px rgba(26, 26, 26, 0.3);
    transition: transform 0.2s ease;
}

.nav-action-highlight:active .action-circle {
    transform: scale(0.95);
}

/* --- ANIMATIONS (Fade In) --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}