/* =========================
   Home Page Styles
   File: static/css/home.css
   Mirror screenshot layout
   ========================= */

.home-content .container{
  padding-top: 10px;
}

/* HERO */
.hero-section{
  margin-top: 6px;
  margin-bottom: 48px;
}

.hero-title,
.hero-subtitle,
.hero-description{ display: none; }

.hero-slogan {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  letter-spacing: 0.01em;
}

.video-placeholder{
  width: 520px;
  max-width: 100%;
  height: 160px;
  border: 1px solid var(--rule);
  background: transparent;
  display:flex;
  align-items:center;
  justify-content:center;
}

.play-button{
  background:none;
  border:none;
  color: rgba(11,11,11,.35);
  cursor:pointer;
}
.play-button svg{
  opacity: .65;
}

/* Marquee banner (two rows, opposite directions) */
.marquee-frame{
  position: relative;
  padding: 14px 0;
  margin: 0 calc(-1 * var(--page-pad-x)) 18px calc(-1 * var(--page-pad-x));
}

.marquee-banner{
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg);
  mask-image: linear-gradient(to right, transparent, rgba(0,0,0,0.95) 8%, rgba(0,0,0,0.95) 92%, transparent);
  animation: fadeInBase 0.8s ease both;
  opacity: 0.95;
}

.marquee-row{
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  will-change: transform;
}

.marquee-row--top .marquee-group{
  animation: marquee-left 50s linear infinite;
}
.marquee-row--bottom .marquee-group{
  animation: marquee-right 52s linear infinite;
}

.marquee-group{
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.marquee-card{
  flex: 0 0 320px;
  height: 200px;
  padding-right: 12px;
}

.marquee-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-works{
  margin: 16px 0 28px;
}

.about-works__body{
  margin: 0 0 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--muted);
  text-align: left;
}

.about-works__line{
  height: 2px;
  background: var(--rule);
}

@keyframes marquee-left{
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@keyframes marquee-right{
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* WORKS */
.works-section{
  margin-top: 24px;
  margin-bottom: 40px;
}

/* WORKS SECTION IMPROVEMENTS */
.works-section{
  margin-top: 48px;
  margin-bottom: 32px;
}

.section-header-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

/* Browse Bar */
.browse-bar{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box{
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-box input{
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.search-box input:focus{
  outline: none;
  border-color: var(--ink);
}

.search-icon{
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.sort-dropdown{
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sort-dropdown:hover,
.sort-dropdown:focus{
  outline: none;
  border-color: var(--ink);
}

.filter-chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip{
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover{
  border-color: var(--ink);
  background: rgba(11,11,11,.04);
}

.filter-chip.active{
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.view-all-btn{
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s ease;
}

.view-all-btn:hover{
  opacity: 0.7;
}

.view-all-btn span{
  display: inline-block;
  transition: transform 0.2s ease;
}

.view-all-btn:hover span{
  transform: translateX(2px);
}

.section-title{
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.02em;
  font-style: normal;
}

.works-grid{
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid var(--rule);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  background: var(--bg);
  scrollbar-width: none;
}
.works-grid::-webkit-scrollbar{ display:none; }

.work-card{
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 420px;
  max-width: 420px;
  background: var(--bg);
  border-right: 1px solid var(--rule);
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.work-card:last-child{
  border-right: 0;
}

.work-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1;
}

.work-card:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.work-image{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: transparent;
  overflow: hidden;
}

.work-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.work-card:hover .work-image img{
  transform: scale(1.05);
}

.view-overlay{
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

.work-card:hover .view-overlay{
  opacity: 1;
}

.view-arrow{
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.9);
  padding: 8px 16px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="dark"] .view-arrow{
  color: var(--bg);
  background: rgba(255,255,255,0.95);
}

.work-info{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-card:hover .work-info{
  opacity: 1;
  transform: translateY(0);
}

.work-title{
  margin: 0 0 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-tags{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-pill{
  display: inline-block;
  padding: 5px 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg);
  outline: 1px solid rgb(from var(--ink) r g b / 0.2);
}

[data-theme="dark"] .work-card{
  background: var(--bg);
}

[data-theme="dark"] .work-info{
  background: rgba(30,30,30,0.95);
}

[data-theme="dark"] .work-title{
  color: var(--ink);
}

[data-theme="dark"] .filter-chip:hover{
  background: rgba(255,255,255,.08);
}

[data-theme="dark"] .filter-chip.active{
  background: var(--ink);
  color: var(--bg);
}

/* FEATURED ARTICLES (vertical list, like screenshot) */
.articles-section{
  margin-top: 48px;
}

.article-filters{
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}

/* List container border like screenshot */
.article-list{
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Each row - now fully clickable */
.article-row{
  display: grid;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  cursor: pointer;
}

.article-row:first-child{
  border-top: 0;
}

.article-row:hover{
  background: rgba(11,11,11,.02);
  transform: translateX(4px);
}

.article-row:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

[data-theme="dark"] .article-row:hover{
  background: rgba(255,255,255,.02);
}

.article-thumbnail{
  width: 140px;
  height: 90px;
  border: 1px solid var(--rule);
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.article-thumbnail img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-row:hover .article-thumbnail img{
  transform: scale(1.05);
}

.article-content{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.article-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  margin-top: 2px; 
}

/* Article headers MUST be 72pt DM Serif Display Regular (responsive clamp) */
.article-title{
  margin: 0;
  font-size: 1.1rem; 
  line-height: 1.3;
  color: var(--ink);
}

/* Article body text MUST be 24pt DM Sans Medium */
.article-excerpt{
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.article-date,
.article-reading-time{
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}

.article-reading-time::before{
  content: '•';
  margin-right: 10px;
  color: var(--muted);
}
.feature-btn{
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  padding: 6px 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.article-row.is-hidden{
  opacity: 0.3;
  transform: translateX(10px);
  display: none;
}

/* View More centered, CTA font enforced */
.view-more-wrap{
  display:flex;
  justify-content:center;
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--rule);
}

.view-more-btn{
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--type-24pt);
  color: var(--ink);
  text-decoration:none;
}

.view-more-btn:hover{
  text-decoration: underline;
  text-underline-offset: 10px;
}

/* Responsive */
@media (max-width: 980px){
  .works-grid{
    gap: 0;
  }
  .work-card{
    min-width: 210px;
    max-width: 210px;
  }

  .article-row{
    grid-template-columns: 1fr;
  }
  .article-image{
    width: 100%;
    height: 140px;
  }
}
