/*
Theme Name:   Legends Media
Theme URI:    https://www.legendsmedia.in/
Description:  Legends Media child theme. Change "Template" below to match your
              parent theme's exact folder name. Common ones: astra, hello-elementor,
              generatepress, twentytwentyfour, twentytwentythree
Template:     astra
Version:      1.0
Author:       Legends Media
*/

/* ============================================================
   DESIGN TOKENS — edit these to retheme the whole site
   ============================================================ */
:root {
  --bg:             #fdfbf7;
  --text:           #2d2724;
  --orange:         #e3662c;
  --card-bg:        #ffffff;
  --warm-tint:      #fdf6e2;
  --peach-footer:   #eddccb;

  --status-active:   #4caf50;
  --status-done:     #2196f3;
  --status-rip:      #9e9e9e;

  --border:          3px solid #2d2724;
  --shadow:          6px 6px 0px #2d2724;
  --shadow-lg:       8px 8px 0px #2d2724;
  --radius:          16px;
  --radius-sm:       10px;

  --font-display:    'Fredoka', sans-serif;
  --font-body:       'Lato', sans-serif;
  --font-code:       'Fira Code', 'Courier New', monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  padding: 0 10px;
}

/* Hide default WP/theme header and footer — we draw our own */
.site-header,
.site-footer,
.ast-above-header,
.ast-below-header,
.footer-widget-area,
#ast-fixed-footer,
header.entry-header,
.wp-block-template-part[data-slug="header"],
.wp-block-template-part[data-slug="footer"] {
  display: none !important;
}

/* Kill default theme body padding / max-width constraints */
.ast-container,
.ast-page-builder-template .ast-content-area,
.site-content,
.content-area,
.entry-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

h1, h2, h3, h4 {
  font-family: var(--font-display) !important;
  font-weight: 600;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   NAV
   ============================================================ */
#lm-nav nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

#lm-nav .logo          { display: flex; align-items: center; gap: 12px; }
#lm-nav .logo-icon     { height: 60px; padding: 5px; background: var(--text); border-radius: 50%; }
#lm-nav .logo-text     { font-family: var(--font-display); font-size: 22px; color: var(--text); }

#lm-nav .nav-link ul li              { list-style: none; display: inline-block; margin-left: 20px; }
#lm-nav .nav-link ul li a            { font-family: var(--font-display); font-size: 18px; color: var(--text); transition: color 0.2s; }
#lm-nav .nav-link ul li a:hover      { color: var(--orange); }
#lm-nav nav .fa                      { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.lm-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px 40px;
  text-align: center;
}
.lm-hero h1           { font-size: 52px; line-height: 1.2; margin-bottom: 20px; }
.lm-hero p            { font-size: 22px; line-height: 1.6; margin-bottom: 35px; font-weight: 300; }
.lm-highlight         { color: var(--orange); }

/* ============================================================
   BUTTON
   ============================================================ */
.lm-btn {
  display: inline-block;
  background: #ffd166;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  padding: 15px 35px;
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.lm-btn:hover  { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); background: var(--orange); color: #fff; }
.lm-btn:active { transform: translate(4px,4px); box-shadow: 2px 2px 0 var(--text); }

/* ============================================================
   SECTIONS
   ============================================================ */
.lm-section {
  max-width: 1100px;
  margin: 80px auto 0;
  padding: 40px 20px;
}
.lm-section-title { font-size: 38px; text-align: center; margin-bottom: 10px; }
.lm-section-sub   { text-align: center; margin-bottom: 40px; color: #666; font-size: 17px; }

/* ============================================================
   ABOUT PANEL
   ============================================================ */
.lm-bio-panel {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.lm-bio-panel h3 { font-size: 28px; color: var(--orange); margin-bottom: 18px; }
.lm-bio-panel p  { font-size: 18px; line-height: 1.65; margin-bottom: 14px; }

/* ============================================================
   PROJECT / BLOG CARDS
   ============================================================ */
.lm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
  margin-top: 40px;
}
.lm-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.lm-card:hover      { transform: translateY(-4px); }
.lm-card-icon       { font-size: 40px; margin-bottom: 15px; line-height: 1; }
.lm-card h3         { font-size: 24px; margin-bottom: 10px; }
.lm-card p          { font-size: 15px; line-height: 1.55; margin-bottom: 22px; color: #555; }
.lm-card-btn        { font-family: var(--font-display); color: var(--orange); font-weight: 600; font-size: 16px; }
.lm-card-btn:hover  { text-decoration: underline; }

.lm-badge {
  position: absolute;
  top: -15px; right: 20px;
  padding: 5px 14px;
  border: var(--border);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 14px;
  color: #fff;
}
.lm-badge-active    { background: var(--status-active); }
.lm-badge-done      { background: var(--status-done); }
.lm-badge-rip       { background: var(--status-rip); }

/* ============================================================
   THE JOURNEY (TIMELINE LAYOUT)
   ============================================================ */
.lm-timeline { 
  position: relative; 
  max-width: 900px; 
  margin: 50px auto 0; 
  padding: 20px 0; 
}

/* Vertical line down the center */
.lm-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; 
  bottom: 0;
  width: 3px;
  background: var(--text);
  transform: translateX(-50%);
}

.lm-era {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 36px);
  margin-bottom: 50px;
  position: relative;
}

/* Alternating cards to the right side */
.lm-era:nth-child(even) {
  display: flex;
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 36px);
}

/* Interactive status node sitting directly on the line */
.lm-era::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 28px;
  width: 18px; 
  height: 18px;
  background: var(--orange);
  border: var(--border);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Compressed Neobrutalist Cards */
.lm-era-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 380px;
  transition: transform 0.2s ease;
}

.lm-era-card:hover {
  transform: translateY(-2px);
}

.lm-era-card .lm-era-year {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--orange);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lm-era-card h3 { 
  font-size: 22px; 
  margin-bottom: 8px; 
}

.lm-era-card p { 
  font-size: 15px; 
  line-height: 1.6; 
  color: #444; 
  margin-bottom: 12px;
}

.lm-era-emoji { 
  font-size: 32px; 
  margin-bottom: 6px; 
  display: inline-block;
}

/* Content subblocks inside the expanded card container */
.lm-era-card .lm-era-subblock {
  margin-top: 18px;
  padding: 16px;
  background: #f7f3ed;
  border: 2px solid #e0d8cf;
  border-radius: var(--radius-sm);
}

.lm-era-card .lm-era-subblock h4 {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--orange);
  margin-bottom: 6px;
}

.lm-era-card .lm-era-quote {
  border-left: 4px solid var(--orange);
  padding: 10px 14px;
  background: var(--warm-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

/* ── COMPRESSED INLINE EXPANSION (UPGRADED UX) ── */
.lm-story-details {
  display: block;
  margin-top: 15px;
}

/* Style the summary to look like a clickable pill button */
.lm-story-details summary {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: var(--warm-tint);
  border: 2px solid var(--text);
  border-radius: 20px;
  transition: all 0.2s ease;
  user-select: none;
}

.lm-story-details summary:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0px var(--text);
}

.lm-story-details summary:active {
  transform: translateY(0);
  box-shadow: 0px 0px 0px var(--text);
}

.lm-story-details summary::-webkit-details-marker {
  display: none;
}

/* CSS-Only text toggle behavior */
.lm-story-details summary .toggle-less { display: none; }
.lm-story-details[open] summary .toggle-more { display: none; }
.lm-story-details[open] summary .toggle-less { display: inline; }

/* The expanded content area */
.lm-story-details .lm-extended-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed rgba(45, 39, 36, 0.15); /* Clean separator */
  animation: lmSlideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lmSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Next Chapter Card variant adjustments */
.lm-era-next-card {
  border-style: dashed;
  box-shadow: none;
  background: var(--warm-tint);
}

/* ── RESPONSIVE MOBILE CONSTRAINTS ── */
@media (max-width: 768px) {
  .lm-timeline::before {
    left: 20px;
    transform: none;
  }
  
  .lm-era, .lm-era:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 54px;
    margin-bottom: 35px;
  }
  
  .lm-era::after {
    left: 20px;
    transform: translateX(-50%);
    top: 24px;
  }
  
  .lm-era-card {
    max-width: 100%;
  }
}

/* ============================================================
   MUSIC
   ============================================================ */
.lm-soundcloud {
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.lm-music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 28px;
}
.lm-track-card {
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  transition: transform 0.2s;
}
.lm-track-card:hover { transform: translateY(-3px); }
.lm-track-card iframe { display: block; width: 100%; }

/* ============================================================
   EMBED PAGES  (itch.io / games / tools)
   ============================================================ */
.lm-embed-wrap {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 110px);
}
.lm-embed-header {
  max-width: 1100px;
  margin: 16px auto 12px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lm-embed-header h1   { font-size: 30px; }
.lm-embed-header .lm-badge { position: static; }
.lm-back-link {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  transition: color 0.2s;
}
.lm-back-link:hover   { color: var(--orange); }
.lm-embed-frame {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 30px;
  padding: 0 50px;
  box-sizing: border-box;
}
.lm-embed-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 620px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ============================================================
   BLOG / DEVLOG PAGES
   ============================================================ */
.lm-blog-wrap {
  max-width: 760px;
  margin: 40px auto 80px;
  padding: 0 20px;
}
.lm-blog-header {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: var(--border);
}
.lm-blog-header .lm-badge { position: static; display: inline-block; margin-bottom: 16px; }
.lm-blog-header h1         { font-size: 44px; line-height: 1.2; margin-bottom: 12px; }
.lm-blog-header .lm-sub    { font-size: 18px; color: #666; }

.lm-blog-body h2   { font-size: 28px; margin: 48px 0 14px; }
.lm-blog-body h3   { font-size: 22px; margin: 36px 0 10px; color: var(--orange); }
.lm-blog-body p    { font-size: 17px; line-height: 1.75; margin-bottom: 20px; color: #3a3530; }
.lm-blog-body ul,
.lm-blog-body ol   { margin: 0 0 20px 28px; }
.lm-blog-body li   { font-size: 17px; line-height: 1.7; margin-bottom: 6px; }
.lm-blog-body code {
  background: #f0ebe3;
  border: 1.5px solid #ccc;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: var(--font-code);
  font-size: 15px;
}
.lm-blog-body pre {
  background: #2d2724;
  color: #fdf6e2;
  padding: 22px;
  border-radius: var(--radius-sm);
  border: var(--border);
  overflow-x: auto;
  margin-bottom: 24px;
}
.lm-blog-body pre code     { background: none; border: none; color: inherit; font-size: 14px; }
.lm-blog-body img          { width: 100%; border: var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin: 10px 0 24px; }
.lm-blog-body blockquote   {
  border-left: 5px solid var(--orange);
  padding: 14px 20px;
  background: var(--warm-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  font-style: italic;
  font-size: 18px;
}
.lm-tech-tags              { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; justify-content: center; }
.lm-tech-tags li {
  background: #e3662c1a;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-display);
}

/* ============================================================
   FOOTER
   ============================================================ */
#lm-footer footer {
  text-align: center;
  padding: 60px 20px;
  background: var(--peach-footer);
  border-top: var(--border);
  margin-top: 100px;
}
#lm-footer footer h2    { font-size: 28px; margin-bottom: 6px; }
#lm-footer .lm-socials  { margin: 20px 0; }
#lm-footer .lm-socials a {
  font-size: 35px;
  color: var(--text);
  margin: 0 15px;
  display: inline-block;
  transition: color 0.2s, transform 0.2s;
}
#lm-footer .lm-socials a:hover { color: var(--orange); transform: scale(1.15); }
#lm-footer .lm-credit  { font-size: 16px; opacity: 0.7; }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .lm-hero h1  { font-size: 36px; }
  .lm-hero p   { font-size: 18px; }

  #lm-nav nav .fa { display: block; font-size: 24px; cursor: pointer; }

  #lm-nav .nav-link {
    position: fixed;
    background: var(--bg);
    border-left: var(--border);
    height: 100vh;
    width: 250px;
    top: 0; right: -300px;
    z-index: 9999;
    padding: 40px;
    transition: right 0.3s ease;
  }
  #lm-nav .nav-link ul li    { display: block; margin: 25px 0; }
  #lm-nav .nav-link .fa-times { position: absolute; top: 25px; right: 25px; cursor: pointer; }

  .lm-timeline::before { left: 20px; transform: none; }
  .lm-era,
  .lm-era:nth-child(even) {
    justify-content: flex-start;
    padding-left: 54px;
    padding-right: 0;
  }
  .lm-era::after,
  .lm-era:nth-child(even)::after { left: 20px; transform: translateX(-50%); }

  .lm-embed-frame iframe { min-height: 400px; }
}