/* ==========================================
   LIFESTYLE MAGAZINE — Style
   ========================================== */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  color: #222222;
  background: #FFFFFF;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Variables ── */
:root {
  --surf:   #1AB6B6;
  --food:   #FF8A3D;
  --travel: #3D7DFF;
  --work:   #243B5E;
  --life:   #3FAF72;
  --base:   #FFFFFF;
  --light:  #F8F8F8;
  --dark:   #222222;
  --mid:    #666666;
  --border: #EBEBEB;
  --font-h: 'Playfair Display', Georgia, serif;
  --font-b: 'Inter', 'Noto Sans JP', sans-serif;
  --max-w:  1280px;
  --pad:    clamp(16px, 4vw, 48px);
  --radius: 8px;
  --card-w: 320px;
}

/* ── Fade-in ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── Section helpers ── */
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 72px var(--pad); }
.section-header { margin-bottom: 40px; }
.section-label { font-size: 11px; letter-spacing: 0.2em; color: var(--mid); text-transform: uppercase; display: block; margin-bottom: 8px; }
.section-title { font-family: var(--font-h); font-size: clamp(26px, 3vw, 38px); color: var(--dark); }

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-logo {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  margin-right: auto;
}
.logo-main { font-family: var(--font-h); font-size: 18px; font-weight: 700; letter-spacing: 0.04em; color: var(--dark); }
.logo-sub  { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mid); margin-top: 2px; }
.header-nav { display: flex; gap: 28px; }
.nav-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--mid);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-cat::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cat-color, var(--dark));
  transition: width 0.25s ease;
}
.nav-cat:hover { color: var(--cat-color, var(--dark)); }
.nav-cat:hover::after { width: 100%; }
.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 1px; transition: 0.3s; }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--base);
  z-index: 190;
  padding: 32px var(--pad);
  flex-direction: column;
  gap: 24px;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-cat { font-size: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ==========================================
   PROFILE SECTION
   ========================================== */
.profile-section { padding: 0; }
.profile-section .section-inner { padding-top: 48px; padding-bottom: 48px; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 720px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--border);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-family: var(--font-h); font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.profile-tagline { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid); margin-bottom: 10px; }
.profile-bio { font-size: 14px; color: var(--mid); line-height: 1.75; margin-bottom: 14px; }
.profile-links { display: flex; gap: 10px; }
.profile-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid currentColor;
  transition: opacity 0.2s;
  text-decoration: none;
}
.profile-link:hover { opacity: 0.7; }
.profile-link--ig { color: #C13584; }
.profile-link--x  { color: var(--dark); }

/* Author card (post page) */
.author-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 800px;
  margin: 56px auto 0;
  padding: 28px 32px;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-family: var(--font-h); font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.author-tagline { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid); margin-bottom: 8px; }
.author-bio { font-size: 13px; color: var(--mid); line-height: 1.7; margin-bottom: 12px; }

@media (max-width: 600px) {
  .profile-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .author-card  { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section { height: 80vh; min-height: 520px; max-height: 860px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: 100%;
}

/* Featured article */
.hero-main { position: relative; overflow: hidden; }
.hero-featured { display: block; height: 100%; position: relative; }
.hero-img-wrap { position: relative; height: 100%; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.hero-featured:hover .hero-img-wrap img { transform: scale(1.04); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
}
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 44px;
  color: #fff;
}
.hero-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 16px;
  color: #fff;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-h);
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 600px;
}
.hero-excerpt { font-size: 14px; opacity: 0.82; max-width: 480px; line-height: 1.7; }

/* Sidebar articles */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--base);
  overflow: hidden;
}
.hero-side-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex: 1;
  transition: background 0.2s;
}
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item:hover { background: var(--light); }
.hero-side-img { width: 88px; height: 62px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.hero-side-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.18em; display: block; margin-bottom: 5px; text-transform: uppercase; }
.hero-side-title { font-family: var(--font-h); font-size: 14px; line-height: 1.45; color: var(--dark); }

/* ==========================================
   CATEGORY NAV BAR
   ========================================== */
.category-nav-bar {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 100;
}
.category-nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.category-nav-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav-list::-webkit-scrollbar { display: none; }
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--mid);
  white-space: nowrap;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}
.cat-nav-item:hover { color: var(--dark); border-bottom-color: var(--dark); }
.cat-nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ==========================================
   CARDS
   ========================================== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--base);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.09); }
.card-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.card:hover .card-img-wrap img { transform: scale(1.05); }
.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 3px 8px;
  border-radius: 2px;
  color: #fff;
  text-transform: uppercase;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-family: var(--font-h); font-size: 17px; line-height: 1.45; margin-bottom: 10px; color: var(--dark); flex: 1; }
.card-excerpt { font-size: 13px; color: var(--mid); line-height: 1.65; margin-bottom: 14px; }
.card-date { font-size: 11px; color: #aaa; letter-spacing: 0.04em; margin-top: auto; }

/* ==========================================
   LATEST STORIES
   ========================================== */
.latest-section { background: var(--base); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ==========================================
   CATEGORY SECTIONS
   ========================================== */
.cat-section { padding: 0; }
.cat-section:nth-child(odd) { background: var(--light); }
.cat-section:nth-child(even) { background: var(--base); }
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cat-section-title-wrap { display: flex; align-items: center; gap: 12px; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cat-section-title { font-family: var(--font-h); font-size: 28px; color: var(--dark); }
.cat-section-more { font-size: 12px; color: var(--mid); letter-spacing: 0.1em; transition: color 0.2s; }
.cat-section-more:hover { color: var(--dark); }
.h-scroll-wrap { overflow: hidden; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px; }
.h-scroll-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding-bottom: 12px;
}
.h-scroll-track::-webkit-scrollbar { height: 4px; }
.h-scroll-track::-webkit-scrollbar-track { background: transparent; }
.h-scroll-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.h-scroll-track .card { flex: 0 0 var(--card-w); scroll-snap-align: start; }

/* ==========================================
   POPULAR ARTICLES
   ========================================== */
.popular-section { background: var(--base); }
.popular-list { display: flex; flex-direction: column; max-width: 720px; }
.popular-item {
  display: grid;
  grid-template-columns: 52px 1fr 88px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { opacity: 0.75; }
.popular-rank { font-family: var(--font-h); font-size: 30px; font-weight: 700; line-height: 1; }
.popular-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.18em; display: block; margin-bottom: 5px; text-transform: uppercase; }
.popular-title { font-family: var(--font-h); font-size: 16px; line-height: 1.4; color: var(--dark); }
.popular-thumb { width: 88px; height: 60px; object-fit: cover; border-radius: var(--radius); }

/* ==========================================
   NEWSLETTER
   ========================================== */
.newsletter-section { background: var(--dark); padding: 88px var(--pad); text-align: center; color: #fff; }
.newsletter-inner { max-width: 520px; margin: 0 auto; }
.newsletter-label { font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; opacity: 0.45; margin-bottom: 20px; display: block; }
.newsletter-title { font-family: var(--font-h); font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 16px; }
.newsletter-desc { font-size: 14px; opacity: 0.6; margin-bottom: 36px; line-height: 1.85; }
.newsletter-form { display: flex; gap: 12px; max-width: 400px; margin: 0 auto; }
.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-b);
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-input::placeholder { opacity: 0.38; }
.newsletter-input:focus { border-color: rgba(255,255,255,0.45); }
.newsletter-btn {
  padding: 12px 22px;
  background: #fff;
  color: var(--dark);
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-b);
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.newsletter-btn:hover { opacity: 0.82; }

/* ==========================================
   FOOTER
   ========================================== */
.site-footer { background: var(--light); border-top: 1px solid var(--border); }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 44px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.footer-nav a { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; opacity: 0.75; transition: opacity 0.2s; }
.footer-nav a:hover { opacity: 1; }
.footer-copy { font-size: 11px; color: var(--mid); grid-column: 1 / -1; text-align: center; }

/* ==========================================
   POST PAGE
   ========================================== */
.post-hero { position: relative; height: 68vh; min-height: 400px; overflow: hidden; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 60%, transparent 100%);
}
.post-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px;
  max-width: 900px;
  margin: 0 auto;
  color: #fff;
}
.post-category-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 4px 10px;
  border-radius: 2px;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.post-title {
  font-family: var(--font-h);
  font-size: clamp(24px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  max-width: 720px;
}
.post-meta {
  max-width: 800px;
  margin: 36px auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--mid);
}
.post-meta-cat { font-weight: 600; letter-spacing: 0.1em; font-size: 11px; text-transform: uppercase; }
.post-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--pad) 80px;
  font-size: 17px;
  line-height: 1.9;
  color: #333;
}
.post-body p { margin-bottom: 1.6em; }
.post-body h2 { font-family: var(--font-h); font-size: 26px; color: var(--dark); margin: 2em 0 0.8em; }
.post-body h3 { font-family: var(--font-h); font-size: 20px; color: var(--dark); margin: 1.8em 0 0.6em; }
.post-body img { width: 100%; border-radius: var(--radius); margin: 2em 0; }
.post-body h2 { font-family: var(--font-h); font-size: 22px; font-weight: 700; color: var(--dark); margin: 2.4em 0 0.8em; line-height: 1.4; }
.post-body h3 { font-family: var(--font-h); font-size: 18px; font-weight: 700; color: var(--dark); margin: 2em 0 0.6em; padding-left: 12px; border-left: 3px solid currentColor; line-height: 1.4; }
.post-body a { color: var(--travel); border-bottom: 1px solid currentColor; }

/* Quote block */
.post-body blockquote,
.post-body .quote-block {
  border-left: 3px solid var(--dark);
  margin: 2em 0;
  padding: 20px 28px;
  background: var(--light);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p,
.post-body .quote-block p {
  font-family: var(--font-h);
  font-size: 20px;
  line-height: 1.65;
  color: var(--dark);
  margin: 0;
  font-style: italic;
}

/* Info box */
.post-body .info-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 2em 0;
  font-size: 15px;
}
.post-body .info-box strong { display: block; margin-bottom: 12px; font-size: 14px; letter-spacing: 0.05em; }
.post-body .info-box ul { padding-left: 20px; list-style: disc; }
.post-body .info-box li { margin-bottom: 6px; }

/* Gallery block */
.post-body .gallery-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 2em 0;
}
.post-body .gallery-block img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; margin: 0; }

/* Post navigation */
.post-nav {
  max-width: 800px;
  margin: 0 auto 64px;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-nav-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--mid);
  transition: background 0.2s;
}
.post-nav-item:hover { background: var(--light); }
.post-nav-item span { display: block; font-family: var(--font-h); font-size: 16px; color: var(--dark); margin-top: 6px; line-height: 1.4; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 300px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-section { height: auto; min-height: auto; max-height: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { height: 56vw; min-height: 260px; }
  .hero-sidebar { flex-direction: row; overflow-x: auto; height: auto; border-left: none; border-top: 1px solid var(--border); }
  .hero-side-item { flex: 0 0 220px; border-bottom: none; border-right: 1px solid var(--border); padding: 14px 16px; }
  .hero-content { padding: 28px 20px; }
  .hero-excerpt { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .menu-btn { display: flex; }
  .popular-item { grid-template-columns: 40px 1fr; }
  .popular-thumb { display: none; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
  .post-hero-content { padding: 24px 20px; }
  .post-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-body .gallery-block { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  :root { --card-w: 280px; }
  .section-inner { padding: 48px var(--pad); }
}
