/* ============================================================
   Sasaya Berlin — Shared Stylesheet
   Wabi-Sabi Editorial · Japanische Küche
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --primary:         #2C2420;
  --secondary:       #7A6E5F;
  --accent:          #9B4523;
  --bg:              #F5F0E8;
  --surface:         #EDE8DC;
  --text:            #1E1A17;
  --text-muted:      #6B5E52;
  --font-display:    'Cormorant Garamond', Georgia, serif;
  --font-body:       'Crimson Pro', Georgia, serif;
  --nav-height:      72px;
  --spine-left:      33.333%;
  --spine-color:     rgba(122, 110, 95, 0.4);
  --container-max:   1280px;
  --container-pad:   clamp(1.5rem, 5vw, 4rem);
  --section-pad:     clamp(4rem, 8vw, 8rem);
  --radius:          2px;
  --ease:            0.35s ease;
}

/* --- Reset ------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

/* --- Signature Vertical Spine ----------------------------- */
/*
 * A single 1 px rule at one-third from the left —
 * evokes a book binding or a scroll's crease,
 * quietly organising the space without announcing itself.
 */
.page-spine {
  position: fixed;
  top: 0;
  left: var(--spine-left);
  width: 1px;
  height: 100vh;
  background-color: var(--spine-color);
  pointer-events: none;
  z-index: 1;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--spine-left);
  width: 1px;
  height: 100vh;
  background-color: var(--spine-color);
  pointer-events: none;
  z-index: 1;
}

/* --- Typography ------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  color: var(--primary);
  letter-spacing: 0.015em;
}

/* Contrast: #1E1A17 on #F5F0E8 — ~12:1 (exceeds 3:1 heading minimum) */
h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); font-weight: 300; }
h2 { font-size: clamp(2rem,   4vw, 3.5rem);   font-weight: 300; }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.875rem); }
h5 { font-size: 1.25rem; }
h6 {
  font-size: 0.8125rem;
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Contrast: #1E1A17 on #F5F0E8 — ~12:1 (exceeds 4.5:1 body minimum) */
p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease), opacity var(--ease);
}

a:hover,
a:focus {
  color: var(--primary);
  opacity: 0.8;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* --- Layout Utilities ------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  width: 100%;
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* --- Navigation ------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: var(--bg);
  border-bottom: 1px solid rgba(122, 110, 95, 0.18);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Text logo — display font per spec, no image */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-decoration: none;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  transition: color var(--ease);
}

.nav-logo:hover,
.nav-logo:focus {
  color: var(--accent);
  opacity: 1;
}

.nav-logo-name {
  display: block;
}

.nav-logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

/* Desktop link row */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.75rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.4s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
  opacity: 1;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  width: 100%;
  background-color: var(--accent);
}

/* Lang flags */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 2rem;
  padding-left: 2rem;
  border-left: 1px solid rgba(122, 110, 95, 0.25);
}

.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.65;
  transition: opacity var(--ease), border-color var(--ease);
  background: none;
  cursor: pointer;
}

.lang-flag:hover,
.lang-flag.active {
  opacity: 1;
  border-color: var(--secondary);
}

.lang-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
  border-radius: var(--radius);
  transition: background-color var(--ease);
}

.nav-hamburger:hover {
  background-color: var(--surface);
}

.nav-hamburger-bar {
  display: block;
  width: 22px;
  height: 1px;
  background-color: var(--primary);
  transition: transform 0.32s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* X state */
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile drawer — sits flush below nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--bg);
  border-bottom: 1px solid rgba(122, 110, 95, 0.18);
  padding: 1.75rem var(--container-pad) 2rem;
  z-index: 998;
  flex-direction: column;
  gap: 0;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile .nav-link {
  font-size: 1.1rem;
  padding: 0.85rem 0;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(122, 110, 95, 0.12);
}

.nav-mobile .nav-link:last-of-type {
  border-bottom: none;
}

.nav-mobile .nav-lang {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(122, 110, 95, 0.12);
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid rgba(122, 110, 95, 0.2);
  padding: 5rem 0 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem 5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.footer-brand {}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.04em;
  line-height: 1.2;
  display: block;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color var(--ease);
}

.footer-logo:hover,
.footer-logo:focus {
  color: var(--accent);
  opacity: 1;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
}

.footer-address {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.8;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: block;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-nav-link {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--ease);
  display: inline-block;
  position: relative;
}

.footer-nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.35s ease;
}

.footer-nav-link:hover,
.footer-nav-link:focus {
  color: var(--accent);
  opacity: 1;
}

.footer-nav-link:hover::after {
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid rgba(122, 110, 95, 0.15);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-legal-link {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--ease);
}

.footer-legal-link:hover,
.footer-legal-link:focus {
  color: var(--accent);
  opacity: 1;
}

/* --- Typography Components -------------------------------- */
.display-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 1.03;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  position: relative;
  padding-bottom: 1.1rem;
  margin-bottom: 2.25rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.25rem;
  height: 1px;
  background-color: var(--accent);
}

.body-text {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 62ch;
}

/* --- Buttons ---------------------------------------------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1;
  transition: background-color var(--ease), color var(--ease),
              border-color var(--ease), opacity var(--ease);
  white-space: nowrap;
}

/* Contrast: #F5F0E8 on #2C2420 — ~8:1 ✓ */
.btn-primary {
  background-color: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  opacity: 1;
}

/* Contrast: #2C2420 on #F5F0E8 — ~8:1 ✓ */
.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--secondary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

/* --- Card ------------------------------------------------- */
.card {
  background-color: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(44, 36, 32, 0.09);
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.875rem;
}

.card-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.6rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.card-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Page Hero (shared inner pages) ----------------------- */
.page-hero {
  background-color: var(--surface);
  border-bottom: 1px solid rgba(122, 110, 95, 0.18);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(155, 69, 35, 0.35) 33%,
    transparent 100%
  );
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-hero-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.page-hero-breadcrumb a:hover {
  color: var(--accent);
  opacity: 1;
}

.page-hero-breadcrumb-sep {
  display: inline-block;
  width: 1rem;
  height: 1px;
  background-color: var(--text-muted);
  opacity: 0.5;
  vertical-align: middle;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 300;
  color: var(--primary);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

/* --- Fade-In Animation ------------------------------------ */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-in-delay-1 { animation-delay: 0.12s; }
.fade-in-delay-2 { animation-delay: 0.24s; }
.fade-in-delay-3 { animation-delay: 0.38s; }
.fade-in-delay-4 { animation-delay: 0.52s; }

/* --- Responsive: 1024px ----------------------------------- */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* --- Responsive: 768px ------------------------------------ */
@media (max-width: 768px) {
  :root {
    --nav-height:     60px;
    --section-pad:    clamp(3rem, 7vw, 5rem);
    --container-pad:  1.25rem;
  }

  /* Hide desktop links, show hamburger */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Footer collapses to single column */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .page-hero {
    padding: 3rem 0 2.25rem;
  }
}

/* ── Image quality defaults ── */
img { object-fit: cover; max-width: 100%; height: auto; }
img[class*="logo"], img[class*="icon"], img[class*="flag"] { object-fit: contain; }
