/* ============================================================
   J-SEED VENTURES — Zen Minimalist Design
   Art direction: Bright, clean, sharp. Wabi-sabi restraint.
   Palette: Pure white + deep stone + soft green accent
   ============================================================ */

:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius — sharp, minimal */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-full: 9999px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 880px;
  --content-wide: 1080px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cormorant', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans JP', 'Helvetica Neue', sans-serif;
}

/* --- LIGHT MODE --- */
:root, [data-theme="light"] {
  --color-bg:             #ffffff;
  --color-surface:        #fafaf9;
  --color-surface-2:      #f5f4f2;
  --color-surface-offset: #f0efed;
  --color-divider:        #e8e6e3;
  --color-border:         #dddbd7;

  --color-text:           #2c2c2b;
  --color-text-muted:     #6b6b68;
  --color-text-faint:     #a3a29e;
  --color-text-inverse:   #ffffff;

  /* Stone — grounded, quiet authority */
  --color-primary:        #3d3d3a;
  --color-primary-hover:  #2c2c2a;
  --color-primary-active: #1a1a19;

  /* Green accent — life, growth, seedling */
  --color-accent:         #5a8a5e;
  --color-accent-hover:   #4a764e;
  --color-accent-active:  #3b6340;
  --color-accent-light:   #e8f0e8;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

/* --- DARK MODE --- */
[data-theme="dark"] {
  --color-bg:             #1a1a19;
  --color-surface:        #222221;
  --color-surface-2:      #2a2a28;
  --color-surface-offset: #1e1e1d;
  --color-divider:        #333331;
  --color-border:         #3d3d3a;

  --color-text:           #e0dfdc;
  --color-text-muted:     #918f8b;
  --color-text-faint:     #5c5b58;
  --color-text-inverse:   #1a1a19;

  --color-primary:        #c8c7c3;
  --color-primary-hover:  #dddcd9;
  --color-primary-active: #f0efed;

  --color-accent:         #7aaa7e;
  --color-accent-hover:   #8fbc93;
  --color-accent-active:  #a4cda7;
  --color-accent-light:   #2a332a;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a1a19; --color-surface: #222221; --color-surface-2: #2a2a28;
    --color-surface-offset: #1e1e1d; --color-divider: #333331; --color-border: #3d3d3a;
    --color-text: #e0dfdc; --color-text-muted: #918f8b; --color-text-faint: #5c5b58;
    --color-text-inverse: #1a1a19;
    --color-primary: #c8c7c3; --color-primary-hover: #dddcd9; --color-primary-active: #f0efed;
    --color-accent: #7aaa7e; --color-accent-hover: #8fbc93; --color-accent-active: #a4cda7;
    --color-accent-light: #2a332a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2); --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  }
}

/* ============================================================
   COMPONENTS
   ============================================================ */

.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  padding: var(--space-2) var(--space-4); background: var(--color-primary);
  color: var(--color-text-inverse); font-size: var(--text-sm);
  border-radius: var(--radius-sm); z-index: 100; text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.3s ease;
}
.site-header--scrolled {
  box-shadow: 0 1px 0 var(--color-divider);
}

.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .header-inner { padding: var(--space-3) var(--space-4); }
}

.logo-link {
  display: flex; align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex; align-items: center; gap: var(--space-8); list-style: none;
}
.nav-links a {
  font-size: var(--text-sm); font-weight: 400;
  color: var(--color-text-muted); text-decoration: none;
  letter-spacing: 0.03em;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--color-text);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: var(--color-text); }

.header-controls { display: flex; align-items: center; gap: var(--space-3); }

.lang-toggle {
  font-size: var(--text-xs); font-weight: 400;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  background: transparent; cursor: pointer;
  letter-spacing: 0.04em;
}
.lang-toggle:hover { color: var(--color-text); border-color: var(--color-border); }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; color: var(--color-text-faint);
}
.theme-toggle:hover { color: var(--color-text-muted); }

.mobile-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--color-text);
}

@media (max-width: 767px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--color-bg); flex-direction: column;
    padding: var(--space-4) var(--space-6); gap: 0;
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block; padding: var(--space-3) 0;
    font-size: var(--text-base);
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-links a::after { display: none; }
  .nav-links li:last-child a { border-bottom: none; }
  .mobile-menu-btn { display: flex; }
}

/* --- Hero --- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 75vh;
  overflow: hidden;
}
.hero-image {
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-16) var(--space-12);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}
.hero-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 44ch;
}

/* Thin decorative line */
.hero-line {
  width: 40px; height: 1px;
  background: var(--color-accent);
  margin-bottom: var(--space-6);
}

@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-image { height: 50vh; }
  .hero-text {
    padding: var(--space-8) var(--space-4);
  }
}

/* --- Sections --- */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.section-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}

/* Thin top border for section separation */
.section-bordered {
  border-top: 1px solid var(--color-divider);
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 50ch;
  line-height: 1.7;
}

/* --- About --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}
@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.about-prose p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.85;
  margin-bottom: var(--space-5);
}
.about-prose p:last-child { margin-bottom: 0; }

/* Quiet emphasis */
.about-emphasis {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-accent);
  line-height: 1.5;
  margin: var(--space-6) 0;
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-accent-light);
}
[data-theme="dark"] .about-emphasis {
  border-left-color: var(--color-accent);
}

.company-table {
  width: 100%;
}
.company-table-heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}
.table-row {
  display: flex;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  gap: var(--space-4);
  align-items: baseline;
}
.table-row:last-child { border-bottom: none; }
.table-label {
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted);
  min-width: 100px; flex-shrink: 0;
}
.table-value {
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* --- Contact --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.contact-info-block h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-5);
}

.contact-line {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm); color: var(--color-text); line-height: 1.7;
}
.contact-line:last-child { margin-bottom: 0; }
.contact-line svg {
  flex-shrink: 0; width: 18px; height: 18px;
  color: var(--color-text-faint); margin-top: 3px;
}
.contact-line a {
  color: var(--color-text); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-line a:hover { border-bottom-color: var(--color-text-muted); }

/* Form */
.contact-form-block h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-5);
}
.form-field { margin-bottom: var(--space-5); }
.form-field label {
  display: block;
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.form-field input,
.form-field textarea {
  display: block; width: 100%;
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  background: transparent;
  border: none; border-bottom: 1px solid var(--color-divider);
  border-radius: 0; color: var(--color-text);
  transition: border-color 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--color-text);
}
.form-field textarea { resize: vertical; min-height: 100px; }

.btn-send {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-sm); font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-send:hover { background: var(--color-primary-hover); }
.btn-send:active { background: var(--color-primary-active); }

/* --- Map --- */
.map-wrap {
  margin-top: var(--space-12);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-8);
}
.map-wrap iframe {
  display: block; width: 100%; height: 320px; border: none;
  filter: grayscale(0.8) contrast(0.95);
}
[data-theme="dark"] .map-wrap iframe {
  filter: grayscale(0.8) contrast(0.95) invert(1) hue-rotate(180deg);
}
@media (min-width: 768px) {
  .map-wrap iframe { height: 380px; }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-6);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: var(--space-4);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-links {
  display: flex; align-items: center; gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-xs); color: var(--color-text-faint);
  text-decoration: none; letter-spacing: 0.02em;
}
.footer-links a:hover { color: var(--color-text-muted); }

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
