/*
Theme Name: Bamboo Leaks
Theme URI: https://example.com
Author: Dasol
Description: Technical Revolution behind the Bamboo Curtain — magazine-style theme with a card carousel front page.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: bamboo-leaks
*/

:root{
  --ink:#0d0d0d;
  --bamboo:#8fd694;        /* signature accent */
  --bamboo-soft:#e2f4e3;
  --bamboo-deep:#2e7d43;
  --bg:#f2f2f2;
  --card:#ffffff;
  --muted:#4a4a4a;
  --hair:#e3e3e3;
}
*{margin:0;padding:0;box-sizing:border-box;}
body{
  font-family:'Inter','Noto Sans KR',sans-serif;
  color:var(--ink);
  background:#fff;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;cursor:pointer;}
img{max-width:100%;height:auto;display:block;}

/* ============ HEADER ============ */
.site-header{
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;
  padding:14px 44px;
  background:#fff;
  border-bottom:1px solid var(--hair);
}
.site-header.header-compact{padding-top:7px;padding-bottom:7px;}
.site-header.header-compact .site-logo{font-size:18px;}
.site-header.header-compact .site-logo .tagline{display:none;}
.site-header.header-tall{padding-top:28px;padding-bottom:28px;}
.site-header.header-tall .site-logo{font-size:27px;}
.site-logo{
  font-family:'Fraunces','Noto Sans KR',serif;
  font-weight:700;
  font-size:23px;
  line-height:1;
  letter-spacing:-0.01em;
}
.site-logo .accent{color:var(--bamboo-deep);}
.site-logo .tagline{
  display:block;
  font-family:'Inter','Noto Sans KR',sans-serif;
  font-weight:500;
  font-size:11px;
  letter-spacing:.02em;
  color:var(--muted);
  margin-top:4px;
}

.main-nav ul{
  display:flex;align-items:center;gap:36px;
  list-style:none;
}
.main-nav a{
  font-family:'Archivo',sans-serif;
  font-weight:600;font-size:15px;
  letter-spacing:.06em;text-transform:uppercase;
  padding:8px 2px;
  border-bottom:3px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a{
  border-bottom-color:var(--bamboo);
}
.header-actions{display:flex;align-items:center;gap:14px;}
.btn{
  font-family:'Archivo',sans-serif;
  font-weight:800;font-size:12px;letter-spacing:.08em;
  text-transform:uppercase;
  padding:11px 18px;
  border:none;background:none;
  display:inline-block;
}
.btn-mint{background:var(--bamboo);}
.btn-mint:hover{filter:brightness(.95);}
.btn-write{border:2px solid var(--ink);}
.btn-write:hover{background:var(--ink);color:#fff;}

/* search */
.search-toggle{
  width:42px;height:42px;
  display:flex;align-items:center;justify-content:center;
  background:none;border:none;color:var(--ink);
}
.search-toggle:hover{color:var(--bamboo-deep);}
.search-toggle:focus-visible{outline:3px solid var(--ink);outline-offset:2px;}
.search-bar{
  background:#fff;
  border-bottom:1px solid var(--hair);
  padding:18px 44px;
}
.search-bar form{
  display:flex;gap:12px;max-width:720px;margin:0 auto;
}
.search-bar input[type="search"]{
  flex:1;
  font-family:inherit;font-size:17px;
  padding:14px 18px;
  border:2.5px solid var(--ink);
  background:#fff;
}
.search-bar input[type="search"]:focus{outline:none;border-color:var(--bamboo-deep);}

/* ============ HERO (parallax) ============ */
.hero-media{
  position:relative;
  width:100%;
  height:28vh;
  min-height:180px;
  max-height:340px;
  overflow:hidden;
  background-color:#0f2417;
}
.hero-media.parallax{
  background-size:cover;
  background-position:center;
  background-attachment:fixed;   /* 스크롤 시 그림 고정 */
}
/* iOS/모바일은 fixed 미지원 → 일반 스크롤로 폴백 */
@media (hover:none), (max-width:900px){
  .hero-media.parallax{background-attachment:scroll;}
}
.hero-media.has-video video,
.hero-media.has-video img,
.hero-media.has-video iframe{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
}
.hero-media .wp-custom-header{position:absolute;inset:0;}
.hero-media .wp-custom-header video,
.hero-media .wp-custom-header img{
  width:100%;height:100%;object-fit:cover;
}
.hero-media .wp-custom-header-video-button{
  position:absolute;right:16px;bottom:16px;z-index:2;
  font-family:'Archivo',sans-serif;font-size:13px;
  padding:10px 16px;border:none;background:rgba(255,255,255,.9);
  cursor:pointer;
}

/* mobile nav toggle */
.nav-toggle{
  display:none;
  width:34px;height:22px;
  flex-direction:column;justify-content:space-between;
  background:none;border:none;
}
.nav-toggle i{display:block;height:3.5px;background:var(--ink);}

/* ============ FRONT: EDITORIAL GRID ============ */
.front{
  background:#fff;
  padding:52px 44px 88px;
  max-width:1280px;margin:0 auto;
}
.section-label{
  display:flex;align-items:center;gap:14px;
  margin:8px 0 8px;
}
.section-label span{
  width:5px;height:30px;background:var(--bamboo-deep);
  display:inline-block;
}
.section-label h2{
  font-family:'Fraunces','Noto Sans KR',serif;
  font-weight:600;
  font-size:26px;
  letter-spacing:.01em;
}


/* recent posts carousel */
.carousel-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:20px;margin-bottom:26px;
}
.nav-arrows{display:flex;gap:8px;}
.arrow{
  width:46px;height:46px;
  display:flex;align-items:center;justify-content:center;
  font-size:20px;
  background:#fff;color:var(--ink);
  border:1px solid var(--ink);
  border-radius:50%;
  transition:background .15s ease,color .15s ease,opacity .15s ease;
}
.arrow:not(:disabled):hover{background:var(--bamboo-deep);border-color:var(--bamboo-deep);color:#fff;}
.arrow:disabled{opacity:.25;cursor:default;}
.arrow:focus-visible{outline:3px solid var(--bamboo-deep);outline-offset:2px;}
.track{
  display:flex;gap:26px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  padding-bottom:4px;
}
.track::-webkit-scrollbar{display:none;}
.p-card{
  flex:0 0 min(340px,82vw);
  scroll-snap-align:start;
  border:1px solid var(--hair);
  padding:0 0 24px;
  background:#fff;
  transition:border-color .15s ease;
}
.p-card:hover{border-color:var(--bamboo-deep);}
.p-card .thumb{
  width:100%;aspect-ratio:16/10;object-fit:cover;display:block;
  background:#e8efe9;margin-bottom:22px;
}
.p-card .thumb.placeholder{
  display:flex;align-items:center;justify-content:center;
  color:var(--bamboo-deep);
  font-family:'Fraunces',serif;font-weight:600;font-size:19px;
}
.p-card .inner{padding:0 24px;}
.p-card .cat{
  font-size:12px;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;
  color:var(--bamboo-deep);
  margin-bottom:10px;
}
.p-card h3{
  font-family:'Fraunces','Noto Sans KR',serif;
  font-weight:600;font-size:21px;line-height:1.25;
  margin-bottom:10px;
}
.p-card h3 a:hover{color:var(--bamboo-deep);text-decoration:underline;text-underline-offset:4px;}
.p-card .excerpt{font-size:15px;line-height:1.6;color:#3a3a3a;margin-bottom:14px;}

/* featured */
.featured{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:56px;
  align-items:center;
  padding-bottom:52px;
  margin-bottom:36px;
  border-bottom:1px solid var(--hair);
}
.featured .thumb{
  width:100%;aspect-ratio:16/10;object-fit:cover;display:block;background:#e8efe9;
}
.featured .thumb.placeholder{
  display:flex;align-items:center;justify-content:center;
  color:var(--bamboo-deep);
  font-family:'Fraunces',serif;font-weight:600;font-size:24px;
}
.kicker{
  display:flex;align-items:center;gap:10px;
  font-family:'Inter',sans-serif;
  font-size:13px;font-weight:600;
  letter-spacing:.16em;text-transform:uppercase;
  color:var(--bamboo-deep);
  margin-bottom:18px;
}
.kicker span{width:26px;height:3px;background:var(--bamboo-deep);display:inline-block;}
.featured h2{
  font-family:'Fraunces','Noto Sans KR',serif;
  font-weight:600;
  font-size:clamp(30px,3.4vw,44px);
  line-height:1.12;
  letter-spacing:-0.01em;
  margin-bottom:20px;
}
.featured h2 a:hover{color:var(--bamboo-deep);}
.featured .dek{
  font-size:18px;line-height:1.6;color:#3a3a3a;margin-bottom:18px;
}
.meta{font-size:14px;color:var(--muted);}

/* bamboo-slat grid */
.post-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--hair);
}
.post-item{
  position:relative;
  padding:34px 30px 30px;
  border-bottom:1px solid var(--hair);
  border-left:1px solid var(--hair);
}
.post-item:nth-child(3n+1){border-left:none;padding-left:0;}
.post-item:hover{background:#fafcf9;}
.post-item .cat{
  font-size:12.5px;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);
  margin-bottom:12px;
}
.post-item h3{
  font-family:'Fraunces','Noto Sans KR',serif;
  font-weight:600;font-size:22px;line-height:1.25;
  margin-bottom:12px;
}
.post-item h3 a:hover{color:var(--bamboo-deep);text-decoration:underline;text-underline-offset:4px;}
.post-item .excerpt{
  font-size:15.5px;line-height:1.6;color:#3a3a3a;margin-bottom:16px;
}
.empty{padding:60px 0;font-size:17px;color:var(--muted);}
.pagination-wrap{margin-top:40px;font-family:'Inter',sans-serif;}

/* ============ SINGLE / PAGE ============ */
.entry{
  max-width:760px;margin:0 auto;
  padding:56px 24px 80px;
}
.entry .cat{color:var(--bamboo-deep);font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:14px;}
.entry h1{
  font-family:'Archivo','Noto Sans KR',sans-serif;
  font-weight:900;font-size:clamp(30px,4vw,44px);
  line-height:1.15;margin-bottom:16px;
}
.entry .meta{color:var(--muted);font-size:15px;margin-bottom:36px;}
.entry .entry-thumb{margin-bottom:36px;}
.entry-content{font-size:18px;line-height:1.75;}
.entry-content p{margin-bottom:1.4em;}
.entry-content h2,.entry-content h3{
  font-family:'Archivo','Noto Sans KR',sans-serif;
  margin:1.6em 0 .7em;line-height:1.25;
}
.entry-content a{color:var(--bamboo-deep);text-decoration:underline;text-underline-offset:3px;}
.entry-content blockquote{
  border-left:4px solid var(--bamboo);
  padding:4px 0 4px 20px;margin:1.4em 0;color:#333;
}

/* ============ NEWSLETTER BAND ============ */
.newsletter{
  background:var(--bamboo);
  margin:0 44px 56px;
  padding:52px 56px;
}
.newsletter-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:48px;max-width:1280px;margin:0 auto;
}
.newsletter h2{
  font-family:'Archivo','Noto Sans KR',sans-serif;
  font-weight:800;
  font-size:clamp(22px,2.6vw,32px);
  line-height:1.2;
  letter-spacing:-0.01em;
  max-width:20em;
}
.newsletter form{
  flex:1;max-width:560px;
  display:flex;
}
.newsletter input[type="email"]{
  flex:1;
  font-family:inherit;font-size:17px;
  padding:16px 18px;
  border:2px solid var(--ink);
  background:transparent;
}
.newsletter input[type="email"]::placeholder{color:#1e3a28;font-weight:600;}
.newsletter input[type="email"]:focus{outline:none;background:rgba(255,255,255,.35);}
.newsletter button{
  font-family:'Archivo',sans-serif;
  font-weight:800;font-size:15px;letter-spacing:.04em;
  padding:0 28px;
  border:2px solid var(--ink);border-left:none;
  background:var(--ink);color:#fff;
}
.newsletter button:hover{background:#000;}
.newsletter-thanks{
  font-size:18px;font-weight:600;
}

/* ============ FOOTER ============ */
.site-footer{
  background:var(--ink);
  color:#eaeaea;
  padding:56px 44px 40px;
}
.footer-grid{
  display:flex;justify-content:space-between;gap:40px;flex-wrap:wrap;
  margin-bottom:40px;
}
.footer-brand .site-logo{color:#fff;font-size:22px;}
.footer-brand .tagline{color:#9c9c9c;}
.footer-nav ul{list-style:none;display:flex;gap:28px;flex-wrap:wrap;}
.footer-nav a{
  font-family:'Archivo',sans-serif;font-weight:600;font-size:14px;
  letter-spacing:.06em;text-transform:uppercase;color:#eaeaea;
}
.footer-nav a:hover{color:var(--bamboo);}
.footer-bottom{
  border-top:1px solid #2c2c2c;
  padding-top:22px;
  font-size:13px;color:#8b8b8b;
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
}

/* ============ RESPONSIVE ============ */
@media (max-width:900px){
  .site-header{padding:16px 20px;flex-wrap:wrap;}
  .nav-toggle{display:flex;}
  .main-nav{display:none;width:100%;order:3;}
  .main-nav.open{display:block;}
  .main-nav ul{flex-direction:column;align-items:flex-start;gap:0;padding:12px 0;}
  .main-nav li{width:100%;border-top:1px solid var(--hair);}
  .main-nav a{display:block;padding:14px 4px;border-bottom:none;}
  .front{padding:34px 20px 60px;}
  .featured{grid-template-columns:1fr;gap:26px;padding-bottom:36px;}
  .post-grid{grid-template-columns:1fr;}
  .post-item{border-left:none;padding-left:0;padding-right:0;}
  .site-footer{padding:44px 20px 32px;}
  .search-bar{padding:14px 20px;}
  .hero-media{height:20vh;min-height:140px;}
  .arrow{width:40px;height:40px;}
  .newsletter{margin:0 20px 40px;padding:32px 24px;}
  .newsletter-inner{flex-direction:column;align-items:flex-start;gap:22px;}
  .newsletter form{width:100%;max-width:none;}
}

/* ============ CONTACT FORM ============ */
.contact-form{margin-top:12px;}
.contact-form .field{margin-bottom:22px;}
.contact-form label{
  display:block;
  font-family:'Archivo',sans-serif;font-weight:600;font-size:14px;
  letter-spacing:.04em;text-transform:uppercase;
  margin-bottom:8px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea{
  width:100%;
  font-family:inherit;font-size:17px;
  padding:14px 16px;
  border:2px solid var(--ink);
  background:#fff;
}
.contact-form input:focus,
.contact-form textarea:focus{outline:none;border-color:var(--bamboo-deep);}
.contact-form textarea{min-height:180px;resize:vertical;}
.hp-field{position:absolute;left:-9999px;opacity:0;height:0;overflow:hidden;}
.form-notice{
  padding:16px 20px;margin-bottom:26px;
  font-size:16px;
  border-left:4px solid var(--bamboo-deep);
  background:var(--bamboo-soft);
}
.form-notice.error{border-left-color:#c03b2b;background:#fbe9e6;}
@media (prefers-reduced-motion:reduce){
  .track{scroll-behavior:auto;}
}
