/*
Theme Name: À la Table en Vie
Theme URI: https://earjapan.com
Author: Tsukasa Watanabe
Author URI: https://earjapan.com
Description: Personal brand theme for earjapan.com — Sommelier & Service, スタイリッシュ・モダン、スマホ完全対応
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altv
Tags: blog, personal, responsive
*/

/* ─────────────────────────────────────────
   CSS Variables
───────────────────────────────────────── */
:root {
  --black:      #080806;
  --offwhite:   #f2ede6;
  --gold:       #b89a5e;
  --gold-light: #d4b87a;
  --gray:       #7a7670;
  --warm:       #1c1a16;
  --warm2:      #242118;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans:  'Noto Sans JP', sans-serif;
  --font-mono:  'DM Mono', monospace;
}

/* ─────────────────────────────────────────
   Reset & Base
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--offwhite);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; }

/* ─────────────────────────────────────────
   Custom Cursor
───────────────────────────────────────── */
.cursor {
  position: fixed; width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid rgba(184,154,94,.45); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform .15s ease, border-color .15s ease;
}
@media (hover: none) {
  .cursor, .cursor-ring { display: none; }
  body { cursor: auto; }
}

/* ─────────────────────────────────────────
   Navigation
───────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 28px 56px;
  display: flex; justify-content: space-between; align-items: center;
}
.site-header::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,6,.88) 0%, transparent 100%);
  pointer-events: none;
}
.site-branding {
  position: relative; z-index: 1;
}
.site-title {
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 400; letter-spacing: .25em;
  color: var(--offwhite); line-height: 1.4;
  display: block;
}
.site-title:hover { color: var(--offwhite); }
.site-tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: .52rem; letter-spacing: .2em;
  color: var(--gold); font-weight: 300; margin-top: 2px;
}

/* Primary nav */
.primary-navigation { position: relative; z-index: 1; }
.primary-navigation ul { display: flex; gap: 40px; }
.primary-navigation a {
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gray); transition: color .3s;
}
.primary-navigation a:hover { color: var(--gold); }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  position: relative; z-index: 1; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1px;
  background: var(--offwhite); transition: all .3s;
}
.nav-toggle.is-active span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--black); z-index: 150;
  flex-direction: column; align-items: center; justify-content: center; gap: 52px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-family: var(--font-serif); font-size: 2.8rem;
  font-weight: 300; color: var(--offwhite);
  letter-spacing: .08em; transition: color .3s;
}
.mobile-menu a:hover { color: var(--gold); }

/* ─────────────────────────────────────────
   Hero Section
───────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: 1fr 1fr;
  position: relative; overflow: hidden;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 72px 88px 56px;
  position: relative; z-index: 2;
}
.hero-role {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
  opacity: 0; animation: fadeUp .8s .3s forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5.5vw, 6.4rem);
  font-weight: 300; line-height: 1.0; letter-spacing: -.01em; margin-bottom: 12px;
  opacity: 0; animation: fadeUp .8s .5s forwards;
}
.hero-title em { font-style: italic; color: var(--gold-light); }
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  font-weight: 300; font-style: italic;
  color: var(--gray); letter-spacing: .06em; margin-bottom: 40px;
  opacity: 0; animation: fadeUp .8s .65s forwards;
}
.hero-name-block {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px;
  opacity: 0; animation: fadeUp .8s .75s forwards;
}
.hero-name-jp { font-size: .75rem; letter-spacing: .25em; color: var(--offwhite); }
.hero-name-en {
  font-family: var(--font-serif);
  font-size: 1.05rem; letter-spacing: .18em; color: var(--gray);
}
.hero-achievement {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .18em; color: var(--gold);
  padding: 10px 0; border-top: 1px solid rgba(184,154,94,.25); margin-bottom: 52px;
  opacity: 0; animation: fadeUp .8s .85s forwards;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--offwhite); transition: gap .3s, color .3s;
  opacity: 0; animation: fadeUp .8s .95s forwards;
}
.hero-cta:hover { gap: 26px; color: var(--gold); }
.hero-cta::after { content: '→'; font-size: .95rem; }

.hero-right { position: relative; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  filter: grayscale(10%) contrast(1.02);
  opacity: 0; animation: fadeIn 1.4s .15s forwards;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--black) 0%, rgba(8,8,6,.15) 40%, transparent 100%);
  z-index: 1;
}
.hero-overlay2 {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(to top, rgba(8,8,6,.6), transparent); z-index: 1;
}
.hero-bg-text {
  position: absolute; bottom: 60px; right: 40px;
  font-family: var(--font-serif); font-size: 11rem; line-height: 1; font-weight: 300;
  color: rgba(184,154,94,.06); z-index: 2; pointer-events: none;
}
.hero-scroll-indicator {
  position: absolute; bottom: 44px; left: 56px; z-index: 10;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
.scroll-text {
  font-family: var(--font-mono); font-size: .52rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--gray);
}

/* ─────────────────────────────────────────
   Marquee
───────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 18px 0; background: var(--warm);
}
.marquee-track {
  display: flex; white-space: nowrap;
  animation: marquee 24s linear infinite;
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 36px; padding: 0 36px;
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gray);
}
.marquee-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ─────────────────────────────────────────
   Shared Section Styles
───────────────────────────────────────── */
.site-section { padding: 130px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 56px; }

.section-label {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .35em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 18px; margin-bottom: 60px;
}
.section-label::before { content: ''; width: 36px; height: 1px; background: var(--gold); }

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3.6rem); font-weight: 300; line-height: 1.1;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .22s; }

/* ─────────────────────────────────────────
   Posts Section
───────────────────────────────────────── */
.posts-section { background: var(--black); }
.posts-header {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px;
}
.view-all-link {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gray); transition: color .3s; white-space: nowrap;
}
.view-all-link:hover { color: var(--gold); }

/* Main grid */
.posts-grid {
  display: grid; grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto; gap: 3px;
}
.post-card {
  position: relative; overflow: hidden; background: var(--warm2); display: block;
}
.post-card--large { grid-row: span 2; aspect-ratio: 3/4.2; }
.post-card--sm    { aspect-ratio: 4/3; }

.post-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .65s ease, filter .65s ease; filter: grayscale(15%);
}
.post-card:hover .post-card-img { transform: scale(1.04); filter: grayscale(0%); }

.post-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,6,.92) 0%, rgba(8,8,6,.1) 55%, transparent 100%);
}
.post-card-content {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 28px;
}
.post-card--large .post-card-content { padding: 36px; }

.post-card-cat {
  font-family: var(--font-mono); font-size: .55rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.post-card-title {
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 300; line-height: 1.5;
  color: var(--offwhite);
}
.post-card--large .post-card-title { font-size: 1.7rem; }
.post-card-date {
  font-family: var(--font-mono); font-size: .55rem; color: var(--gray); margin-top: 14px;
}

/* More posts row */
.posts-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 3px; }
.post-card--list { aspect-ratio: 3/2; }

/* ─────────────────────────────────────────
   Profile Section
───────────────────────────────────────── */
.profile-section { background: var(--warm); }
.profile-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 88px; align-items: center; }
.profile-img-wrap { position: relative; }
.profile-photo {
  width: 100%; aspect-ratio: 3/4.2; object-fit: cover;
  display: block; filter: grayscale(10%) contrast(1.04);
}
.profile-frame {
  position: absolute; top: 18px; left: 18px; right: -18px; bottom: -18px;
  border: 1px solid rgba(184,154,94,.22); pointer-events: none; z-index: -1;
}
.profile-text-name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 3.2rem); font-weight: 300; line-height: 1.2; margin-bottom: 10px;
}
.profile-text-name em { font-style: italic; color: var(--gold-light); }
.profile-text-role {
  font-family: var(--font-serif);
  font-size: 1rem; letter-spacing: .15em; color: var(--gray); margin-bottom: 36px;
}
.profile-quote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.05rem; color: var(--gold-light); line-height: 1.8;
  border-left: 2px solid var(--gold); padding-left: 20px; margin-bottom: 28px;
}
.profile-body { font-size: .82rem; line-height: 2.1; color: var(--gray); margin-bottom: 16px; }

.profile-table { width: 100%; border-collapse: collapse; margin: 28px 0; }
.profile-table td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; font-size: .8rem; }
.profile-table td:first-child {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .15em; color: var(--gold); width: 42%; padding-right: 16px;
}
.profile-table td:last-child { color: var(--offwhite); line-height: 1.7; }

.profile-more-link {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-top: 12px; transition: gap .3s;
}
.profile-more-link:hover { gap: 22px; }
.profile-more-link::after { content: '→'; }

/* ─────────────────────────────────────────
   Categories Section
───────────────────────────────────────── */
.categories-section { background: var(--black); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.cat-card {
  position: relative; aspect-ratio: 3/4; overflow: hidden;
  background: var(--warm2); display: block;
}
.cat-card-inner {
  position: absolute; inset: 0; padding: 28px 24px;
  display: flex; flex-direction: column; justify-content: flex-end; transition: background .4s;
}
.cat-card:hover .cat-card-inner { background: rgba(184,154,94,.06); }
.cat-card-number {
  position: absolute; top: 18px; right: 20px;
  font-family: var(--font-serif); font-size: 5rem; font-weight: 300; line-height: 1;
  color: rgba(184,154,94,.1); transition: color .4s;
}
.cat-card:hover .cat-card-number { color: rgba(184,154,94,.22); }
.cat-card-bar { width: 22px; height: 1px; background: var(--gold); margin-bottom: 14px; transition: width .4s; }
.cat-card:hover .cat-card-bar { width: 44px; }
.cat-card-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 300; margin-bottom: 8px; color: var(--offwhite); }
.cat-card-desc { font-family: var(--font-mono); font-size: .54rem; letter-spacing: .16em; color: var(--gray); }

/* ─────────────────────────────────────────
   Contact Section
───────────────────────────────────────── */
.contact-section { background: var(--warm); padding: 160px 0; }
.contact-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 6.5rem); font-weight: 300; line-height: .95; margin-bottom: 28px;
}
.contact-heading em { font-style: italic; color: var(--gold-light); }
.contact-body { font-size: .82rem; color: var(--gray); line-height: 2.1; margin-bottom: 52px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 44px; border: 1px solid rgba(184,154,94,.6);
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--offwhite);
  transition: background .3s, border-color .3s, color .3s, gap .3s;
}
.contact-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--black); gap: 22px; }
.contact-btn::after { content: '→'; }

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
.site-footer {
  background: var(--black); border-top: 1px solid rgba(255,255,255,.06);
  padding: 44px 56px; display: flex; justify-content: space-between; align-items: center;
}
.footer-branding {
  font-family: var(--font-serif); font-size: 1rem;
  letter-spacing: .2em; color: var(--offwhite);
}
.footer-branding small {
  display: block; font-family: var(--font-mono);
  font-size: .5rem; letter-spacing: .2em; color: var(--gold); margin-top: 3px;
}
.footer-nav { display: flex; gap: 28px; }
.footer-nav a {
  font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gray); transition: color .3s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-copy { font-family: var(--font-mono); font-size: .54rem; letter-spacing: .12em; color: var(--gray); }

/* ─────────────────────────────────────────
   Single Post / Page
───────────────────────────────────────── */
.single-hero {
  min-height: 50svh; position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.single-hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(15%);
}
.single-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,6,.95) 0%, rgba(8,8,6,.3) 100%);
}
.single-hero-content {
  position: relative; z-index: 2;
  padding: 80px 56px 60px; max-width: 860px;
}
.single-cat {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .25em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
}
.single-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 4rem); font-weight: 300; line-height: 1.15;
  margin-bottom: 20px;
}
.single-meta {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .15em; color: var(--gray);
}

.single-content-wrap { background: var(--warm); padding: 80px 0 120px; }
.single-content {
  max-width: 760px; margin: 0 auto; padding: 0 56px;
}
.single-content p {
  font-size: .9rem; line-height: 2.2; color: rgba(242,237,230,.8); margin-bottom: 28px;
}
.single-content h2 {
  font-family: var(--font-serif); font-size: 1.8rem; font-weight: 300;
  color: var(--offwhite); margin: 52px 0 20px;
}
.single-content h3 {
  font-family: var(--font-serif); font-size: 1.3rem; font-weight: 300;
  color: var(--gold-light); margin: 36px 0 14px;
}
.single-content a { color: var(--gold); border-bottom: 1px solid rgba(184,154,94,.3); transition: border-color .3s; }
.single-content a:hover { border-color: var(--gold); }
.single-content blockquote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.1rem; color: var(--gold-light); line-height: 1.8;
  border-left: 2px solid var(--gold); padding-left: 24px; margin: 36px 0;
}
.single-content figure { margin: 40px 0; }
.single-content figure img { width: 100%; }
.single-content figcaption {
  font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .15em; color: var(--gray); margin-top: 12px; text-align: center;
}

/* ─────────────────────────────────────────
   Archive / Blog Page
───────────────────────────────────────── */
.archive-header { padding: 160px 56px 80px; }
.archive-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 6rem); font-weight: 300; line-height: 1.0;
}
.archive-title em { font-style: italic; color: var(--gold-light); }

.archive-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  padding: 0 0 120px;
}
.archive-card { position: relative; overflow: hidden; background: var(--warm2); aspect-ratio: 3/4; }
.archive-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease, filter .65s ease; filter: grayscale(15%); }
.archive-card:hover .archive-card-img { transform: scale(1.04); filter: grayscale(0%); }
.archive-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,6,.92) 0%, transparent 55%);
}
.archive-card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; }

/* ─────────────────────────────────────────
   Keyframes
───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; } 50% { opacity: 1; }
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .posts-more { grid-template-columns: 1fr 1fr; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-header { padding: 22px 24px; }
  .primary-navigation { display: none; }
  .nav-toggle { display: flex; }

  .hero { grid-template-columns: 1fr; min-height: 100svh; }
  .hero-right { position: absolute; inset: 0; z-index: 0; }
  .hero-overlay {
    background: linear-gradient(to top, rgba(8,8,6,.96) 30%, rgba(8,8,6,.5) 100%);
  }
  .hero-left { position: relative; z-index: 2; padding: 130px 28px 90px; justify-content: flex-end; }
  .hero-title { font-size: clamp(2.8rem, 11vw, 4.5rem); }
  .hero-subtitle { font-size: 1rem; }
  .hero-scroll-indicator, .hero-bg-text { display: none; }

  .container { padding: 0 24px; }
  .site-section { padding: 88px 0; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card--large { grid-row: span 1; aspect-ratio: 4/3.2; }
  .posts-more { grid-template-columns: 1fr 1fr; margin-top: 3px; }
  .posts-more .post-card:last-child { display: none; }
  .posts-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  .profile-grid { grid-template-columns: 1fr; gap: 44px; }
  .profile-img-wrap { max-width: 300px; }

  .cat-grid { grid-template-columns: 1fr 1fr; }

  .contact-section { padding: 100px 0; }

  .single-content { padding: 0 24px; }
  .single-hero-content { padding: 80px 24px 48px; }
  .archive-header { padding: 120px 24px 60px; }
  .archive-grid { grid-template-columns: 1fr; padding: 0 0 80px; }

  .site-footer { flex-direction: column; gap: 22px; padding: 36px 24px; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: 18px; }
}

@media (max-width: 480px) {
  .posts-more { grid-template-columns: 1fr; }
  .posts-more .post-card:last-child { display: none; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}
