/* ==========================================================
   Cafelito Robot Cafe — TIMELINE (Full, self-contained CSS)
   Includes: global tokens, navbar (desktop + mobile),
             dropdown, hero, timeline image card, footer,
             animations, and responsive rules.
   ========================================================== */

/* -----------------------
   Theme tokens
   ----------------------- */
:root {
  --nav-height: 90px;
  --brand-blue: #f2e4d5;      /* light roast */
  --brand-dark: #1d1b1a;      /* deep brown text */
  --accent: #d29f71;          /* caramel/copper accent */
  --white: #ffffff;
  --divider: rgba(0,0,0,0.12);
  --bg: #fefaf6;              /* coffee-cream page background */

  --shadow-xs: 0 1px 6px rgba(0,0,0,.04);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 10px 28px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 44px rgba(0,0,0,.12);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --transition-fast: 0.16s ease;
  --transition-med: 0.24s ease;
}

/* -----------------------
   Base / reset
   ----------------------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--brand-dark);
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; }

/* Improve text rendering */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* -----------------------
   NAVBAR (matches index)
   ----------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: var(--nav-height);
  background: var(--brand-blue);
  z-index: 1000;
  padding: 0 1vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

/* Logo */
.logo-link { display: flex; align-items: center; height: 75px; }
.logo-img  { height: 75px; width: 75px; border-radius: 50%; object-fit: contain; }

/* Nav layout */
.navbar-left  { flex: 1; display: flex; align-items: center; }
.navbar-right { flex: 1; }

.navbar-center {
  flex: 2;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.navbar-center li { display: inline-block; }

.navbar-center a {
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--brand-dark);
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition-fast), border var(--transition-fast);
  padding: 5px 6px 3px 6px;
  min-height: 32px;
  display: inline-block;
  letter-spacing: 0.01em;
}
.navbar-center a:hover,
.navbar-center a.active {
  color: var(--accent);
  border-bottom: 2.5px solid var(--accent);
}

/* --- Dropdown (centered, shrink-wrap) --- */
.more-dropdown { position: relative; display: inline-block; }
.more-link { cursor: pointer; }
.chevron  { font-size: 0.85em; vertical-align: middle; color: #a2886c; }

.more-dropdown .dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--brand-blue);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0.5rem 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  text-align: center;
  white-space: nowrap; /* prevent wrapping and auto-fit width */
}
.more-dropdown:hover .dropdown-content,
.more-dropdown:focus-within .dropdown-content {
  display: block;
}
.dropdown-content li { list-style: none; }
.dropdown-content a {
  color: var(--brand-dark);
  padding: 0.5rem 1.2rem;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.dropdown-content a:hover { background: var(--menu-card-hover, #f2e4d5); color: var(--accent); }

/* --- Mobile nav --- */
.navbar-mobile-menu { display: none; }
.hamburger {
  display: none;
  font-size: 2.2rem;
  cursor: pointer;
  padding: 12px 20px;
  color: var(--brand-dark);
  background: none; border: none; outline: none;
  z-index: 1200;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.hamburger:active, .hamburger:focus { color: var(--accent); }

.mobile-nav-links {
  display: none;
  flex-direction: column;
  background: var(--brand-blue);
  position: absolute;
  top: var(--nav-height);
  right: 0;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 1200;
  border-top: 2px solid var(--accent);
  padding: 0.5rem 0 1rem 0;
  animation: fadeInDown 0.24s ease both;
}
.mobile-nav-links a {
  padding: 1.1rem 1.7rem;
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.11rem;
  border-bottom: 1px solid var(--divider);
  letter-spacing: 0.01em;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.mobile-nav-links a:last-child { border-bottom: none; }
.mobile-nav-links a:hover, .mobile-nav-links a:focus {
  background: #f2e4d5;
  color: var(--accent);
  border-radius: 12px;
}

/* --- Navbar responsiveness --- */
@media (max-width: 950px) {
  .navbar { padding: 0 2vw; justify-content: space-between; }
  .navbar-center, .navbar-right { display: none !important; }

  .navbar-mobile-menu {
    display: flex; align-items: center; justify-content: flex-end;
    width: auto; height: var(--nav-height); position: relative; flex: 1; z-index: 1300;
  }
  .hamburger {
    display: block; font-size: 2.8rem;
    padding: 18px 20px 18px 18px; margin-right: 8px;
    color: var(--brand-dark);
    border-radius: 14px;
  }
  .hamburger:active, .hamburger:focus { background: #fefaf6; color: var(--accent); }

  /* Hide desktop dropdown on mobile; use the mobile menu instead */
  .more-dropdown { display: none !important; }
}
@media (min-width: 951px) {
  .navbar-mobile-menu { display: none !important; }
  .hamburger { display: none !important; }
}

/* Simple dropdown animation */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------
   HERO
   ----------------------- */
.timeline-hero {
  margin-top: var(--nav-height);
  text-align: center;
  padding: 2.6rem 1rem 1.2rem;
  position: relative;
  isolation: isolate;
}
.timeline-hero::before {
  /* soft decorative glow behind the heading */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(650px 240px at 15% -10%, rgba(242,228,213,.45), transparent 60%),
    radial-gradient(700px 230px at 85% 0%, rgba(210,159,113,.22), transparent 60%);
  z-index: -1; pointer-events: none;
}
.timeline-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 .5rem 0;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 #fff;
}
.timeline-subtitle {
  margin: 0 auto;
  max-width: 820px;
  font-size: 1.06rem;
  opacity: .9;
}

/* -----------------------
   TIMELINE IMAGE CARD
   ----------------------- */
.timeline-image-section {
  display: grid;
  place-items: center;
  padding: 0 1rem 3rem;
}
.timeline-figure {
  width: min(1200px, 95vw);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.5s ease both;
}
.timeline-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}
.timeline-image:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.timeline-caption {
  text-align: center;
  font-size: 0.98rem;
  opacity: .85;
  margin-top: .7rem;
}

/* Subtle entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------
   FOOTER
   ----------------------- */
footer {
  background: var(--brand-blue);
  color: var(--brand-dark);
  text-align: center;
  padding: 1.5rem 0 1.1rem 0;
  font-size: 1rem;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  margin-top: 2rem;
  box-shadow: var(--shadow-xs) inset;
}
.footer-content p { margin: 0.25rem 0; line-height: 1.6; }

/* -----------------------
   Responsive tweaks
   ----------------------- */
@media (max-width: 720px) {
  .timeline-hero h1 { font-size: 1.7rem; }
  .timeline-caption { font-size: 0.95rem; }
}

@media (max-width: 600px) {
  .navbar { padding: 0 0.4rem; }
  .timeline-figure { padding: 0.8rem 0.6rem 0.7rem; }
}
