/* ============================================================
   KohiBrewJP — Main Stylesheet
   style.css
   ============================================================ */

/* ─── Google Fonts ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --c-espresso:    #1c0e05;
  --c-dark:        #2a1507;
  --c-primary:     #6b3f1e;
  --c-accent:      #c8813a;
  --c-accent-dark: #a86428;
  --c-cream:       #f5e6d0;
  --c-offwhite:    #fdf8f2;
  --c-border:      #e8d5bc;
  --c-text:        #2a1507;
  --c-text-mid:    #6b4c30;
  --c-text-light:  #9a7456;

  --font-serif: 'Noto Serif JP', 'Georgia', serif;
  --font-sans:  'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;

  --max-w: 1160px;
  --section-py: 88px;
  --section-px: 24px;
  --radius: 4px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; background: var(--c-offwhite); }
body  {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-offwhite);
}
img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── Utilities ──────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--section-px);
}
.section {
  padding-block: var(--section-py);
}
.section--dark {
  background: var(--c-espresso);
  color: var(--c-cream);
}
.section--cream {
  background: var(--c-cream);
}
.section--mid {
  background: var(--c-dark);
  color: var(--c-cream);
}
.section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--c-espresso);
  margin-bottom: 20px;
}
.section-title--light {
  color: var(--c-offwhite);
}
.section-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text-mid);
  max-width: 640px;
}
.section-lead--light {
  color: var(--c-cream);
  opacity: 0.85;
}
.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn-primary:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); }
.btn-outline {
  background: transparent;
  color: var(--c-espresso);
  border-color: var(--c-espresso);
}
.btn-outline:hover { background: var(--c-espresso); color: var(--c-cream); }
.btn-outline--light {
  color: var(--c-cream);
  border-color: var(--c-cream);
}
.btn-outline--light:hover { background: var(--c-cream); color: var(--c-espresso); }

/* ─── Photo Placeholder & Images ─────────────────────────── */
.photo-placeholder {
  background: var(--c-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--c-text-light);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.photo-placeholder::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.5;
}
.photo-placeholder::after {
  content: '写 真';
  letter-spacing: 0.2em;
}

/* Image Tag Styles */
.hero-image,
.about-image,
.guide-image,
.product-img,
.gallery-item,
.contacts-map {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-bg .hero-image {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--c-offwhite);
  border-bottom: 1px solid var(--c-border);
  padding-block: 18px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-logo {
  width: 46px;
  height: auto;
  flex-shrink: 0;
}
.header-brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-espresso);
  letter-spacing: 0.02em;
}
.header-brand-name span {
  color: var(--c-accent);
}
.header-tagline {
  font-size: 0.78rem;
  color: var(--c-text-light);
  letter-spacing: 0.1em;
  font-weight: 400;
}

/* ─── Block 1 · Hero ─────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: #3a1e0a;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.hero-bg .photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #3a1e0a;
  color: rgba(245,230,208,0.18);
}
.hero-bg .photo-placeholder::before { width: 50px; height: 50px; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(28,14,5,0.88) 0%, rgba(28,14,5,0.55) 60%, rgba(28,14,5,0.25) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-jp {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.hero-sub {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(245,230,208,0.88);
  margin-bottom: 40px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(245,230,208,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(245,230,208,0.3);
}

/* ─── Block 2 · About ────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-numbers {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}
.about-stat .num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}
.about-stat .label {
  font-size: 0.82rem;
  color: var(--c-text-light);
  margin-top: 4px;
}
.about-image {
  height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─── Block 3 · Brewing Methods ──────────────────────────── */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 60px;
}
.method-card {
  background: var(--c-offwhite);
  border: 1px solid var(--c-border);
  padding: 36px 28px 32px;
}
.method-card:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.method-card:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.method-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}
.method-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-espresso);
  margin-bottom: 10px;
}
.method-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--c-text-mid);
}
.method-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* ─── Block 4 · Pour Over ────────────────────────────────── */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.guide-layout--reverse { direction: rtl; }
.guide-layout--reverse > * { direction: ltr; }
.guide-image {
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
}
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
}
.step-body h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-offwhite);
  margin-bottom: 4px;
}
.step-body p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--c-cream);
  opacity: 0.8;
}

/* ─── Block 5 · Siphon ───────────────────────────────────── */
/* uses .guide-layout and .section */

/* ─── Block 6 · Beans ────────────────────────────────────── */
.beans-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 60px;
}
.beans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.bean-card {
  border: 1px solid rgba(245,230,208,0.15);
  padding: 32px 28px;
  border-radius: var(--radius);
}
.bean-origin {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 10px;
  display: block;
}
.bean-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-cream);
  margin-bottom: 12px;
}
.bean-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(245,230,208,0.65);
}
.bean-flavor {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.bean-flavor span {
  font-size: 0.75rem;
  background: rgba(200,129,58,0.18);
  color: var(--c-accent);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}

/* ─── Block 7 · Tips ─────────────────────────────────────── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.tip-card {
  background: #fff;
  border: 1px solid var(--c-border);
  padding: 32px 28px;
  border-radius: var(--radius);
}
.tip-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--c-border);
  line-height: 1;
  margin-bottom: 16px;
}
.tip-card h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-espresso);
  margin-bottom: 10px;
}
.tip-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--c-text-mid);
}

/* ─── Block 8 · Products ─────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.product-card {
  background: var(--c-offwhite);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-img {
  height: 200px;
  width: 100%;
  background: var(--c-cream);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
}
.product-body {
  padding: 24px;
}
.product-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 8px;
  display: block;
}
.product-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-espresso);
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-card p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--c-text-mid);
  margin-bottom: 16px;
}
.product-price {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-espresso);
  margin-bottom: 18px;
}
.product-card .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 20px;
}

/* ─── Block 9 · Gallery ──────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 260px 260px;
  gap: 12px;
  margin-top: 48px;
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item--wide {
  grid-column: span 2;
}
.gallery-item .photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* ─── Block 10 · Contacts ────────────────────────────────── */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}
.contact-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--c-cream);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-light);
  margin-bottom: 4px;
  display: block;
}
.contact-item .value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-espresso);
}
.contact-item a.value:hover { color: var(--c-accent); }
.contacts-map {
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--c-espresso);
  color: var(--c-cream);
  padding-block: 60px 40px;
  border-top: 3px solid var(--c-accent);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245,230,208,0.12);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo {
  width: 38px;
  height: auto;
  /* Invert to show on dark */
  filter: brightness(0) invert(1) opacity(0.85);
}
.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-cream);
  letter-spacing: 0.02em;
}
.footer-col .footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.88rem;
  color: rgba(245,230,208,0.65);
  line-height: 1.5;
}
.footer-links a:hover { color: var(--c-cream); }
.footer-desc {
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(245,230,208,0.5);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(245,230,208,0.38);
}
.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a {
  font-size: 0.8rem;
  color: rgba(245,230,208,0.38);
}
.footer-legal a:hover { color: rgba(245,230,208,0.7); }

/* ─── Center Alignment for Main Content Blocks ──────────── */
.section:not(.section--dark):not(.section--cream):not(.section--mid) {
  text-align: center;
}

.section:not(.section--dark):not(.section--cream):not(.section--mid) .guide-layout {
  text-align: left;
}

.section:not(.section--dark):not(.section--cream):not(.section--mid) .guide-layout > div {
  margin-inline: auto;
  max-width: 640px;
}

/* Contacts section stays unchanged */
#contacts {
  text-align: left;
}

/* ─── Dividers ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--c-border);
  margin-block: 0;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .methods-grid      { grid-template-columns: repeat(2, 1fr); }
  .products-grid     { grid-template-columns: repeat(2, 1fr); }
  .footer-top        { grid-template-columns: 1fr 1fr; }
  .beans-header      { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  :root { --section-py: 64px; }
  .about-grid        { grid-template-columns: 1fr; gap: 40px; }
  .guide-layout      { grid-template-columns: 1fr; gap: 40px; }
  .guide-layout--reverse { direction: ltr; }
  .beans-grid        { grid-template-columns: 1fr; }
  .tips-grid         { grid-template-columns: 1fr; }
  .contacts-layout   { grid-template-columns: 1fr; gap: 40px; }
  .gallery-grid      { grid-template-rows: 200px 200px 200px; }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-grid      { grid-template-columns: 1fr 1fr; }
  .gallery-grid .gallery-item:last-child { grid-column: 1 / -1; }
  .footer-top        { grid-template-columns: 1fr; gap: 32px; }
  .about-numbers     { flex-wrap: wrap; gap: 24px; }
  .hero              { min-height: 100svh; }
  .hero-actions      { flex-direction: column; }
}
@media (max-width: 480px) {
  .methods-grid      { grid-template-columns: 1fr; }
  .products-grid     { grid-template-columns: 1fr; }
  .gallery-grid      { grid-template-columns: 1fr; grid-template-rows: auto; }
  .gallery-item      { height: 220px; }
}
