/* ============================================================
   YOIN (余韻) — Fictional Fragrance Brand Portfolio Site
   Quiet, restrained luxury. Inspired by Le Labo & Aesop.
   ============================================================ */

:root {
  /* Typography */
  --serif: 'Cormorant Garamond', 'Noto Serif JP', Georgia, 'Hiragino Mincho ProN', serif;
  --sans:  'Outfit', 'Avenir Next', 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;

  /* Color Palette - Warm Charcoal & Dusty Amber */
  --bg:      #121212; /* Warm ink black */
  --bg-2:    #1a1a1a;
  --bg-3:    #242424;
  --fg:      #eae8e6; /* Soft warm off-white */
  --fg-2:    #c5c3c0;
  --fg-3:    #8e8c89;
  --border:  rgba(234, 232, 230, 0.1);
  --accent:  #b88d5c; /* Dusty amber */

  /* Spacing */
  --px:    clamp(24px, 6vw, 100px);
  --py:    clamp(80px, 14vw, 200px);
  --max-w: 1400px;
  --nav-h: 80px;

  /* Motion - Restrained Easing */
  --ease-cinema: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 200;
  line-height: 1.85; font-size: clamp(14px, 1.1vw, 16px);
  transition: background .8s var(--ease-cinema);
}
img { display: block; max-width: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; color: inherit; background: none; border: none; }

/* ---- Layout & Spacing ---- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); }
section { padding-top: var(--py); padding-bottom: var(--py); position: relative; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 300; }
.serif { font-family: var(--serif); }
.display {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3rem, 7vw, 7.5rem); line-height: 1.0;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; font-weight: 300; }
.label {
  font-family: var(--sans); font-weight: 300;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--accent);
}
.lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.5vw, 2.2rem); line-height: 1.6; color: var(--fg); }
.subtitle { font-family: var(--sans); font-size: clamp(12px, 0.9vw, 14px); text-transform: uppercase; letter-spacing: 0.15em; color: var(--fg-3); margin-bottom: 0.5rem; }

/* ---- Navigation ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--px);
  transition: background .5s var(--ease-cinema), border-color .5s var(--ease-cinema);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px); border-bottom-color: var(--border); }
.nav__logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  font-weight: 300;
  position: relative;
  padding-left: 0.7rem; /* Extremely tight, bringing vertical Kanji closest to YOIN */
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.nav__logo > span {
  position: absolute;
  left: 0;
  top: 52%; /* Nudged down slightly for optlical alignment with serif base */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 16px; /* Exactly matching the cap-height of YOIN (24px font-size) */
  width: 8px;
}
.nav__logo > span span {
  font-size: 7.5px; /* Delicate editorial tiny size */
  font-weight: 300;
  opacity: 0.45;
  color: var(--fg);
  line-height: 1;
  font-family: var(--serif);
  margin: 0;
  padding: 0;
}
.nav__menu { display: flex; gap: 3rem; }
.nav__menu a { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--fg-2); transition: color .4s; position: relative; }
.nav__menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.4s var(--ease-cinema); }
.nav__menu a:hover { color: var(--fg); }
.nav__menu a:hover::after { width: 100%; }

/* ---- Hero Section (Split Layout & Overlap) ---- */
.hero-split {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(40px, 6vw, 100px); /* Restored original gap proportions */
  padding-top: var(--nav-h);
  position: relative;
}
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; padding-top: 120px; padding-bottom: 60px; min-height: auto; gap: 40px; }
}
.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 10;
  margin-left: auto; /* Push content towards the right (closer to the image) */
  margin-right: -4vw; /* Slightly pull closer to the right image container */
  max-width: 500px; /* Constrain width for tight, elegant typography grouping */
  width: 100%;
  pointer-events: none;
}
.hero__content * { pointer-events: auto; }
.hero__title-wrap {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  padding-left: clamp(1.2rem, 2.2vw, 1.8rem); /* Strict tight horizontal gap */
  font-size: clamp(3.5rem, 8vw, 8.5rem); /* Establish base font-size for exact mathematical alignment scaling */
}
.hero__kanji {
  position: absolute;
  left: 0;
  top: 52%; /* Optical centering for serif alignment */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 0.62em; /* Decreased to 0.62em to resolve the tiny overflow and match top/bottom edges precisely */
  width: 0.25em;
  pointer-events: none;
}
.hero__kanji span {
  font-family: var(--serif);
  font-size: 0.23em; /* Restores the original 1.6rem scale relative to the parent clamp font size */
  font-weight: 300;
  color: var(--fg-3);
  opacity: 0.45;
  line-height: 1;
  margin: 0;
  padding: 0;
}
@media (max-width: 900px) {
  .hero__title-wrap { padding-left: 0; padding-right: 1.8rem; }
  .hero__kanji { left: auto; right: 0; height: 0.62em; }
}
.hero__title {
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-size: inherit; /* Inherits parent's clamp size to guarantee 1:1 scale tracking */
  line-height: 0.95;
  letter-spacing: 0.05em;
  font-weight: 300;
  text-transform: uppercase;
}
.hero__tagline { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.8rem); font-style: italic; color: var(--fg-2); max-width: 25ch; line-height: 1.4; font-weight: 300; }
.hero__scroll { margin-top: 4rem; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3em; color: var(--fg-3); display: flex; align-items: center; gap: 0.5rem; }
.hero__scroll::after { content: ''; display: inline-block; width: 24px; height: 1px; background: var(--border); transition: width 0.4s; }
.hero__scroll:hover::after { width: 40px; background: var(--accent); }
.hero__media {
  height: 75svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  clip-path: inset(0 100% 0 0); /* Initial state for smooth clip-path GSAP reveal */
  will-change: clip-path;
}
@media (max-width: 900px) {
  .hero__media { height: 60svh; clip-path: none; }
}

/* ---- Philosophy Section (Split) ---- */
.philosophy {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
}
@media (max-width: 900px) {
  .philosophy { grid-template-columns: 1fr; gap: 40px; }
  .philosophy .philosophy__text { order: -1; }
}
.philosophy__text { max-width: 480px; }
.philosophy__text .lead { margin-bottom: 2rem; }
.philosophy__text p { font-size: 15px; color: var(--fg-2); margin-bottom: 1.5rem; line-height: 1.9; font-weight: 300; }
.philosophy__text p.en { font-family: var(--sans); font-size: 14px; color: var(--fg-3); letter-spacing: 0.02em; font-weight: 200; }

/* ---- Collection Section (Asymmetric Editorial Grid) ---- */
.collection-header { text-align: center; margin-bottom: clamp(60px, 10vw, 120px); }
.collection-header h2 { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 300; letter-spacing: 0.05em; }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 900px) {
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .collection-grid { grid-template-columns: 1fr; }
}

.fragrance-card {
  display: flex;
  flex-direction: column;
}
.fragrance-card__content {
  margin-top: 1.5rem;
}
.fragrance-card__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 300;
  margin: 0.25rem 0 1rem;
  line-height: 1.25;
}
.fragrance-card__title-en {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 300;
  letter-spacing: 0.05em;
}
.fragrance-card__desc {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.fragrance-card__desc.en {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg-3);
  font-weight: 200;
}

/* ---- Craft Section ---- */
.craft {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
@media (max-width: 900px) {
  .craft { grid-template-columns: 1fr; gap: 40px; }
}
.craft__content { max-width: 520px; }
.craft__title { font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 300; margin: 0.5rem 0 2rem; }
.craft__text { font-size: 15px; color: var(--fg-2); margin-bottom: 1.5rem; line-height: 1.9; font-weight: 300; }
.craft__text.en { font-family: var(--sans); font-size: 14px; color: var(--fg-3); font-weight: 200; }

/* ---- Contact / Stockist Section ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: flex-start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
}
.contact__info { max-width: 450px; }
.contact__title { font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 300; margin: 0.5rem 0 2rem; }
.contact__text { font-size: 15px; color: var(--fg-2); margin-bottom: 3rem; font-weight: 300; }

.stockists { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2rem; }
@media (max-width: 480px) { .stockists { grid-template-columns: 1fr; } }
.stockists__group { margin-bottom: 1.5rem; }
.stockists__city { font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.5rem; font-weight: 400; }
.stockists__list { list-style: none; font-size: 14px; color: var(--fg-2); line-height: 1.8; font-weight: 300; }

.inquiries { margin-top: 2rem; }
.inquiries a { display: inline-block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--fg); border-bottom: 1px solid var(--accent); padding-bottom: 4px; transition: color 0.3s, border-color 0.3s; }
.inquiries a:hover { color: var(--accent); border-bottom-color: var(--fg); }

/* ---- Media Elements ---- */
.media { width: 100%; overflow: hidden; position: relative; background: var(--bg-2); }
.media--portrait { aspect-ratio: 2 / 3; }
.media--landscape { aspect-ratio: 3 / 2; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease-cinema); filter: grayscale(10%) contrast(102%); }
.media:hover img { transform: scale(1.03); }

/* ---- Footer ---- */
.footer { padding: 4rem var(--px) 3rem; border-top: 1px solid var(--border); background: #0c0c0c; }
.footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer a, .footer span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.20em; color: var(--fg-3); transition: color 0.3s; }
.footer a:hover { color: var(--fg); }

/* ---- Scroll Reveal (Restrained) ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.2s var(--ease-cinema), transform 1.2s var(--ease-cinema); will-change: transform, opacity; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Form Styling ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}
.form-group {
  display: flex;
  flex-direction: column-reverse;
}
.form-input, .form-textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--fg);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  transition: border-color 0.4s var(--ease-cinema);
  font-weight: 300;
  border-radius: 0;
}
.form-textarea {
  min-height: 100px;
  resize: vertical;
}
.form-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.form-input:focus ~ .form-label, .form-textarea:focus ~ .form-label {
  color: var(--accent);
}
.submit-btn {
  align-self: flex-start;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 14px 38px;
  cursor: pointer;
  background: none;
  transition: background 0.4s, color 0.4s, border-color 0.4s var(--ease-cinema);
  border-radius: 0;
  margin-top: 1rem;
}
.submit-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---- Parallax & Cinematic Motion Overrides ---- */
.media img {
  height: 120%; /* Extra height for smooth GSAP parallax scrolling */
  width: 100%;
  object-fit: cover;
  transform: translateY(-10%); /* Center the offset */
  will-change: transform;
}
.nav__logo, .nav__menu a, .submit-btn, .inquiries a, .back-btn {
  cursor: pointer;
}

/* ---- Journal Index ---- */
.journal-index-card {
  will-change: transform, opacity;
}
@media (max-width: 768px) {
  .journal-index-card {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    margin-bottom: 5rem !important;
    padding-bottom: 4rem !important;
  }
}


