/* =========================================================
   RUBIS SUSHI — Global Stylesheet
   ========================================================= */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Inter:wght@300;400;500;600&display=swap');

/* --- Hogback Custom Font (for 'Rubis' wordmark) --- */
@font-face {
  font-family: 'Hogback';
  src: url('fonts/Hogback.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Button Grinder Font (for 'Restaurant') --- */
@font-face {
  font-family: 'ButtonGrinder';
  src: url('fonts/ButtonGrinder.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
  --cream:   #FAF8F5;
  --rouge:   #B8283A;
  --rouge-dark: #7A1826;
  --encre:   #1A1613;
  --gris:    #8A8177;
  --gris-light: #D4CFC9;
  --white:   #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --spacing-xs:  0.5rem;
  --spacing-sm:  1rem;
  --spacing-md:  2rem;
  --spacing-lg:  4rem;
  --spacing-xl:  8rem;

  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-full: 9999px;

  --transition-fast:   0.2s ease;
  --transition-smooth: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow:   0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--encre);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* --- Page Transition Overlay --- */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--encre);
  z-index: 9999;
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
}

body.page-entering #page-transition {
  animation: slideUp 0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

body.page-loading #page-transition {
  animation: slideDown 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes slideUp {
  from { transform: scaleY(1); transform-origin: top; }
  to   { transform: scaleY(0); transform-origin: top; }
}
@keyframes slideDown {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  transition: background var(--transition-smooth), backdrop-filter var(--transition-smooth);
}

.nav.scrolled {
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(26,22,19,0.08);
}

.nav.dark {
  background: transparent;
}

.nav.dark.scrolled {
  background: rgba(26, 22, 19, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* =========================================================
   LOGO — Restaurant Rubis (nav version)
   =========================================================
   Structure:
     .nav-logo
       .logo-bowl-img        ← the bowl + chopsticks image
       .logo-text-group
         .logo-restaurant    ← "Restaurant" in ButtonGrinder
         .logo-sushi-wrap    ← relative container for sushi + ruby
           .logo-sushi       ← "Sushi" in Hogback
           .logo-ruby-dot    ← ruby SVG floating above the i-dot
   ========================================================= */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}

/* --- Bowl Image (Light/Dark toggle) --- */
.logo-bowl-light,
.logo-bowl-dark {
  height: 44px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo:hover .logo-bowl-light,
.nav-logo:hover .logo-bowl-dark {
  transform: rotate(-8deg) scale(1.05);
}

/* Default to dark text/light bg (light nav) */
.logo-bowl-dark { display: none; }
.logo-bowl-light { display: block; }

/* On dark navs, show the dark version */
nav.dark .logo-bowl-light,
.nav.dark .logo-bowl-light { display: none; }

nav.dark .logo-bowl-dark,
.nav.dark .logo-bowl-dark { display: block; }


/* --- Text group --- */
.logo-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  line-height: 1;
}

/* --- "Restaurant" in Button Grinder --- */
.logo-restaurant {
  font-family: 'ButtonGrinder', serif;
  font-size: 0.55rem;
  font-weight: normal;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--encre);
  display: block;
  text-transform: uppercase;
  transform: translateY(1px);
}

nav.dark .logo-restaurant,
.nav.dark .logo-restaurant {
  color: rgba(250,248,245,0.9);
}

nav:not(.dark) .logo-restaurant,
.nav:not(.dark) .logo-restaurant {
  color: var(--encre);
}

/* --- Rubis wrap --- */
.logo-rubis-wrap {
  display: inline-block;
  line-height: 1;
}

/* --- "Rubis" in Hogback --- */
.logo-rubis {
  font-family: 'Hogback', serif;
  font-size: 1.75rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--encre);
  display: block;
  text-transform: uppercase;
}

nav.dark .logo-rubis,
.nav.dark .logo-rubis {
  color: #FAF8F5;
}

nav:not(.dark) .logo-rubis,
.nav:not(.dark) .logo-rubis {
  color: var(--encre);
}

/* Target span around letter 'i' */
.logo-rubis .ruby-target {
  position: relative;
  display: inline-block;
}

/* --- Ruby gem: positioned directly above the letter 'i' --- */
.logo-rubis .logo-ruby-dot,
svg.logo-ruby-dot {
  position: absolute;
  left: 50%;
  top: -20%;
  transform: translateX(-50%);
  width: 10px !important;
  height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
  filter: drop-shadow(0 2px 4px rgba(184,40,58,0.7));
  pointer-events: none;
}

/* --- Keep .hanko for footer small mark --- */
.hanko {
  width: 28px;
  height: 28px;
  background: var(--rouge);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  font-family: var(--font-body);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.nav.dark .nav-links a {
  color: rgba(250,248,245,0.8);
}

.nav.dark .nav-links a:hover {
  color: var(--cream);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--rouge);
  transition: width var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--rouge);
}

.nav-cta {
  background: var(--rouge) !important;
  color: white !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-full) !important;
  letter-spacing: 0.05em !important;
  transition: background var(--transition-fast), transform var(--transition-fast) !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--rouge-dark) !important;
  transform: translateY(-1px) !important;
}

/* Mobile hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--encre);
  transition: transform var(--transition-smooth), opacity var(--transition-fast);
}

.nav.dark .nav-burger span {
  background: var(--cream);
}

.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: var(--cream);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.nav-mobile.open {
  opacity: 1;
  pointer-events: all;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--encre);
  transition: color var(--transition-fast);
}

.nav-mobile a:hover { color: var(--rouge); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display-sm {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
}

.label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rouge);
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.75;
  font-weight: 300;
}

.body-md {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.text-gris { color: var(--gris); }
.text-rouge { color: var(--rouge); }
.text-cream { color: var(--cream); }
.text-encre { color: var(--encre); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--rouge);
  color: white;
  padding: 16px 36px;
  border-radius: var(--radius-full);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rouge-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
  border-radius: inherit;
}

.btn-primary span { position: relative; z-index: 1; }

.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(184,40,58,0.3); }

.btn-outline {
  background: transparent;
  color: var(--encre);
  padding: 14px 32px;
  border: 1px solid rgba(26,22,19,0.25);
  border-radius: var(--radius-full);
}

.btn-outline:hover {
  border-color: var(--rouge);
  color: var(--rouge);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  padding: 14px 32px;
  border: 1px solid rgba(250,248,245,0.35);
  border-radius: var(--radius-full);
}

.btn-outline-light:hover {
  border-color: var(--cream);
  background: rgba(250,248,245,0.08);
  transform: translateY(-2px);
}

/* Arrow icon on buttons */
.btn-arrow {
  width: 18px;
  height: 18px;
  display: inline-block;
  transition: transform var(--transition-smooth);
}

.btn:hover .btn-arrow { transform: translateX(4px); }

/* =========================================================
   HANKO (Seal element — visual signature)
   ========================================================= */
.hanko-seal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--rouge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--rouge);
  text-transform: uppercase;
  flex-shrink: 0;
}

.hanko-seal.filled {
  background: var(--rouge);
  color: white;
  border-color: var(--rouge);
}

.hanko-seal.lg {
  width: 120px;
  height: 120px;
  font-size: 0.75rem;
}

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-sm {
  padding: var(--spacing-lg) 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================
   DECORATIVE LINE
   ========================================================= */
.deco-line {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--rouge);
  margin: var(--spacing-sm) 0;
}

.deco-line.center {
  margin-left: auto;
  margin-right: auto;
}

.deco-line.lg {
  width: 80px;
}

/* =========================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--encre);
  color: var(--cream);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid rgba(250,248,245,0.1);
  margin-bottom: var(--spacing-md);
}

.footer-brand .nav-logo {
  color: var(--cream);
  margin-bottom: var(--spacing-sm);
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(250,248,245,0.5);
  line-height: 1.6;
  max-width: 240px;
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,248,245,0.4);
  margin-bottom: var(--spacing-sm);
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.875rem;
  color: rgba(250,248,245,0.7);
  margin-bottom: 6px;
  transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--cream); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(250,248,245,0.3);
}

.footer-bottom .hanko {
  width: 28px;
  height: 28px;
  background: var(--rouge);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  :root { --spacing-lg: 2.5rem; --spacing-xl: 5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --spacing-lg: 1.5rem; --spacing-xl: 4rem; }

  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { display: flex; }

  .nav { padding: 0 var(--spacing-md); }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .footer-bottom { flex-direction: column; gap: var(--spacing-xs); text-align: center; }

  .container { padding: 0 var(--spacing-md); }
  .container-narrow { padding: 0 var(--spacing-md); }
}

@media (max-width: 480px) {
  :root { --spacing-xl: 3rem; }
}
