/* ===========================
   Starving Effort — Style
   Palette: DESIGN_starving_effort.md
   =========================== */

/* --- Tokens --- */
:root {
  --ink: #1a1a2e;
  --muted: #6b7280;
  --accent: #8b7355;
  --accent-hover: #6d5a43;
  --bg: #fafaf7;
  --bg-section: #f3f1ec;
  --line: #e0ddd6;
  --surface: #ffffff;
  --cta: #1a1a2e;
  --cta-text: #fafaf7;

  --font-serif: "Noto Serif JP", Georgia, serif;
  --font-sans: "Noto Sans JP", "Inter", system-ui, sans-serif;
  --font-accent: "Inter", system-ui, sans-serif;

  --max-w: 1080px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

/* --- Utility --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section shared --- */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.section-lead {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 48px;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav__logo {
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--cta);
  color: var(--cta-text) !important;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 13px !important;
  font-weight: 500;
  transition: background 0.2s;
}
.nav__cta:hover { background: var(--accent-hover); }
.nav__ziviqa {
  color: #ff2d8a !important;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__ziviqa:hover { color: #b44dff !important; }

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ========== HERO ========== */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}
.hero__sub {
  color: var(--muted);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.9;
  max-width: 520px;
  margin: 0 auto 40px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--cta);
  color: var(--cta-text);
  border-color: var(--cta);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover {
  background: var(--bg-section);
}
.btn--sm {
  padding: 10px 24px;
  font-size: 13px;
}

/* ========== PRODUCTS ========== */
.products {
  padding: 96px 0 0;
  background: var(--bg-section);
}
.products__header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* --- Gallery --- */
.gallery {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 96px;
  cursor: grab;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:active { cursor: grabbing; }

.gallery__track {
  display: flex;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
  width: max-content;
}

.gallery__item {
  position: relative;
  display: block;
  width: 360px;
  height: 320px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--surface);
}

.gallery__img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--ink);
  transition: transform 0.4s ease;
}
.gallery__item:hover .gallery__img {
  transform: scale(1.04);
}

/* Product-specific image fit */
.gallery__item--contain .gallery__img {
  background-size: 90%;
  background-repeat: no-repeat;
  background-position: center center;
}
.gallery__item--contain .gallery__placeholder {
  display: none;
}

/* Placeholder shown when no image is loaded */
.gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.05em;
  background: linear-gradient(145deg, #24283a 0%, #1a1a2e 50%, #2a2540 100%);
}

.gallery__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px;
  background: linear-gradient(to top, rgba(26,26,46,0.85) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.gallery__item:hover .gallery__overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery__label {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.gallery__cat {
  font-family: var(--font-accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

/* ========== ABOUT ========== */
.about {
  padding: 96px 0;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.about__person {
  text-align: center;
}
.about__card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.about__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.about__buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.about__btn {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.about__btn:hover {
  background: var(--bg-section);
  border-color: var(--accent);
}
.about__btn--accent {
  background: linear-gradient(135deg, #ff2d8a, #b44dff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255,45,138,0.25);
}
.about__btn--accent:hover {
  background: linear-gradient(135deg, #ff6eb4, #c76dff);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(255,45,138,0.4);
  transform: translateY(-1px);
}
.about__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--surface);
}
.about__avatar--fuji {
  background: var(--ink);
}
.about__avatar--ziviqa {
  background: linear-gradient(135deg, #ff2d8a, #b44dff);
}
.about__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.about__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.about__role {
  font-family: var(--font-accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.about__bio {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  max-width: 380px;
  margin: 0 auto 20px;
  text-align: left;
}
.about__links {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.about__link {
  font-family: var(--font-accent);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.about__link:hover {
  border-bottom-color: var(--accent);
}

/* ========== LAB ========== */
.lab {
  padding: 96px 0;
  background: var(--bg-section);
}
.lab__grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}
.lab__entry {
  background: var(--surface);
  padding: 28px 32px;
  transition: background 0.2s;
}
.lab__entry:hover {
  background: var(--bg);
}
.lab__entry--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.lab__entry--link:hover {
  background: #f0ede6;
}
.lab__date {
  font-family: var(--font-accent);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.lab__title {
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 8px;
  line-height: 1.5;
}
.lab__excerpt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.lab__more {
  text-align: center;
}

/* ========== CONTACT ========== */
.contact {
  padding: 96px 0;
}
.contact__form {
  max-width: 560px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; }
.contact__form .btn {
  width: 100%;
  text-align: center;
}

/* ========== FOOTER ========== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__brand {
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__copy {
  font-size: 12px;
  color: var(--muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  /* Nav */
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav__links--open { display: flex; }

  /* Hero */
  .hero { padding: 120px 0 72px; }

  /* Products */
  .products { padding: 64px 0 0; }
  .gallery { padding-bottom: 64px; }
  .gallery__item { width: 280px; height: 260px; }

  /* About */
  .about { padding: 64px 0; }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Lab */
  .lab { padding: 64px 0; }
  .lab__entry { padding: 24px 20px; }

  /* Contact */
  .contact { padding: 64px 0; }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title { font-size: 28px; }
  .section-title { font-size: 24px; }
  .gallery__item { width: 260px; height: 240px; }
  .gallery__placeholder { font-size: 24px; }
}
