/* MELLOW FORM EC — independent styles */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #3a3835;
  background: #faf9f7;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #7a8f72; outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.ec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid #e8e6e2;
  background: #faf9f7;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.ec-header__start {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.demo-hub-back {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #8a8680;
  text-decoration: none;
  white-space: nowrap;
}
.demo-hub-back:hover {
  color: #3a3835;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.demo-hub-back:focus-visible {
  outline: 2px solid #7a8f72;
  outline-offset: 3px;
}
.ec-logo {
  font-family: "Cormorant Garamond", "Shippori Mincho", serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: #3a3835;
  font-weight: 500;
}
.cart-toggle {
  background: none;
  border: none;
  font-size: 0.88rem;
  cursor: pointer;
  color: #3a3835;
  padding: 8px 12px;
  min-height: 44px;
}
.cart-toggle__count {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: #7a8f72;
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  margin-left: 4px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  align-items: center;
}
.hero__visual {
  background: #eef0ea;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.hero__visual img { max-height: 520px; width: auto; }
.hero__copy { padding: clamp(32px, 6vw, 80px); }
.hero__tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #7a8f72;
  margin: 0 0 16px;
}
.hero h1 {
  font-family: "Cormorant Garamond", "Shippori Mincho", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 20px;
  white-space: pre-line;
}
.hero__lead { color: #6a6762; margin: 0 0 28px; max-width: 24em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: #3a3835;
  color: #faf9f7;
  border: 1px solid #3a3835;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  min-height: 44px;
  font-family: inherit;
}
.btn:hover { opacity: 0.88; text-decoration: none; color: #faf9f7; }
.btn--outline { background: transparent; color: #3a3835; }
.btn--outline:hover { color: #3a3835; }
.btn--sm { padding: 10px 16px; font-size: 0.78rem; min-height: 40px; }
.btn--block { width: 100%; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px); }
.section__inner { max-width: 1100px; margin: 0 auto; }
.section__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #7a8f72;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.section__title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-align: center;
  margin: 0 0 40px;
  font-weight: 500;
}
.section__title--left { text-align: left; }

/* Category filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.category-filter__btn {
  padding: 10px 18px;
  border: 1px solid #d8d4cc;
  background: #fff;
  color: #6a6762;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}
.category-filter__btn.is-active {
  background: #3a3835;
  border-color: #3a3835;
  color: #faf9f7;
}
.product-empty {
  text-align: center;
  color: #8a8782;
  margin: 0 0 24px;
  font-size: 0.9rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.product-card {
  grid-column: span 4;
  background: #fff;
  border: 1px solid #e8e6e2;
  display: flex;
  flex-direction: column;
}
.product-card:nth-child(1) { grid-column: span 5; }
.product-card:nth-child(2) { grid-column: span 4; margin-top: 48px; }
.product-card:nth-child(3) { grid-column: span 3; }
.product-card:nth-child(4) { grid-column: span 6; margin-top: 24px; }
.product-card__img {
  aspect-ratio: 4/5;
  background: #f4f2ee;
  overflow: hidden;
}
.product-card__img.is-fallback { background: linear-gradient(160deg, #f4f2ee, #e8e4dc); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.product-card__category {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #7a8f72;
}
.product-card__name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.35;
}
.product-card__meta { font-size: 0.88rem; color: #6a6762; margin: 0; }
.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

/* Brand story */
.section--story { background: #f4f2ee; padding-inline: 0; }
.story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.story__visual img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.story__content { padding: clamp(32px, 5vw, 64px); }
.story__points {
  margin: 0 0 20px;
  padding-left: 1.2em;
  color: #5a5752;
}
.story__points li { margin-bottom: 8px; }
.story__text { margin: 0; color: #6a6762; max-width: 28em; }

/* Lifestyle */
.lifestyle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.lifestyle-card {
  background: #fff;
  border: 1px solid #e8e6e2;
}
.lifestyle-card--offset { margin-top: 40px; }
.lifestyle-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.lifestyle-card__body { padding: 20px 22px 24px; }
.lifestyle-card__body h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.lifestyle-card__body p { margin: 0; color: #6a6762; font-size: 0.9rem; }

/* Journal */
.section--journal { background: #f7f6f2; }
.journal-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.journal-card {
  background: #fff;
  border: 1px solid #e8e6e2;
  display: flex;
  flex-direction: column;
}
.journal-card__img { aspect-ratio: 4/3; overflow: hidden; background: #f0eeea; }
.journal-card__img img { width: 100%; height: 100%; object-fit: cover; }
.journal-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.journal-card__meta {
  margin: 0 0 8px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #8a8782;
}
.journal-card__title {
  font-family: "Cormorant Garamond", serif;
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.4;
}
.journal-card__excerpt { margin: 0 0 16px; color: #6a6762; font-size: 0.88rem; flex: 1; }
.text-link {
  background: none;
  border: none;
  padding: 0;
  color: #7a8f72;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-size: 0.88rem;
  font-family: inherit;
  align-self: flex-start;
}

/* Newsletter */
.section--newsletter { background: #3a3835; color: #faf9f7; }
.newsletter { max-width: 560px; margin: 0 auto; }
.section--newsletter .section__kicker { color: #b8c4ae; }
.section--newsletter .section__title { color: #fff; }
.newsletter__lead { margin: 0 0 24px; color: rgba(255,255,255,0.78); }
.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.newsletter__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  min-height: 44px;
}
.newsletter__input::placeholder { color: rgba(255,255,255,0.5); }
.section--newsletter .btn {
  background: #faf9f7;
  color: #3a3835;
  border-color: #faf9f7;
}
.newsletter__message {
  margin: 16px 0 0;
  font-size: 0.88rem;
  color: #d5e0cc;
}
.newsletter__message.is-error { color: #f5c4bc; }

/* Cart */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(58,56,53,0.35);
  z-index: 180;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e8e6e2;
}
.cart-drawer__title {
  margin: 0;
  font-size: 1rem;
  font-family: "Cormorant Garamond", serif;
}
.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.cart-drawer__footer { padding: 20px; border-top: 1px solid #e8e6e2; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f0eeea;
  align-items: flex-start;
}
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__info strong { display: block; font-size: 0.9rem; line-height: 1.4; }
.cart-item__unit { font-size: 0.82rem; color: #6a6762; }
.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cart-item__qty button {
  width: 36px;
  height: 36px;
  border: 1px solid #e8e6e2;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}
.cart-item__remove {
  margin-left: auto;
  border: none;
  background: none;
  color: #8a8782;
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
  min-height: 36px;
}
.cart-item__subtotal { font-weight: 600; white-space: nowrap; font-size: 0.9rem; }
.cart-total { font-weight: 600; margin-bottom: 16px; }
.cart-empty { color: #8a8782; text-align: center; padding: 40px 0; margin: 0; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58,56,53,0.5);
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal {
  background: #fff;
  width: 100%;
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  overflow-y: auto;
  padding: 32px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.modal--product { max-width: 820px; }
.modal--journal { max-width: 640px; }
.modal--checkout { max-width: 480px; text-align: center; }
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
  z-index: 1;
}
.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.modal__img {
  background: #f4f2ee;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.modal__img img { width: 100%; height: 100%; object-fit: cover; }
.modal__category {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #7a8f72;
}
.modal__title {
  font-family: "Cormorant Garamond", serif;
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.3;
}
.modal__price { color: #6a6762; margin: 0 0 20px; }
.modal__section { margin-bottom: 18px; }
.modal__section h3 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #7a8f72;
  font-weight: 600;
}
.modal__section p { margin: 0; color: #6a6762; font-size: 0.9rem; }
.modal__qty-row { margin: 20px 0; }
.modal__qty-row label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.88rem; }
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e8e6e2;
}
.qty-control button {
  width: 40px;
  height: 40px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}
.qty-control input {
  width: 56px;
  height: 40px;
  border: none;
  border-left: 1px solid #e8e6e2;
  border-right: 1px solid #e8e6e2;
  text-align: center;
  font-size: 1rem;
  font-family: inherit;
}
.modal__heading {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  margin: 0 0 16px;
  line-height: 1.45;
}
.modal__text { color: #6a6762; margin: 0 0 24px; }
.journal-modal__meta {
  font-size: 0.78rem;
  color: #8a8782;
  margin: 0 0 8px;
}
.journal-modal__img {
  margin: 20px 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f0eeea;
}
.journal-modal__img img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.site-footer {
  padding: 48px 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #8a8782;
  border-top: 1px solid #e8e6e2;
}
.site-footer a { color: #7a8f72; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__demo { font-size: 0.72rem; margin-top: 12px; }

/* Responsive */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__visual { min-height: 40vh; }
  .story { grid-template-columns: 1fr; }
  .story__visual img { min-height: 280px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card,
  .product-card:nth-child(n) {
    grid-column: span 1;
    margin-top: 0;
  }
  .lifestyle-card--offset { margin-top: 0; }
  .journal-grid { grid-template-columns: 1fr 1fr; }
  .modal__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .lifestyle-grid { grid-template-columns: 1fr; }
  .journal-grid { grid-template-columns: 1fr; }
  .category-filter { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card__actions { flex-direction: column; }
  .product-card__actions .btn { width: 100%; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form .btn { width: 100%; }
  .demo-hub-back { font-size: 0.68rem; }
  .ec-header__start { gap: 10px; }
}
