/* ============================================================
   SAMURAY TATTOO STUDIO — Styles
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-void: #050505;
  --bg-surface: #0e0e0e;
  --bg-elevated: #161616;
  
  /* Accent */
  --accent: #E8E0D5;
  --accent-dim: #B8B0A5;
  
  /* Text */
  --text-primary: #F5F0EB;
  --text-secondary: #6B6560;
  --text-muted: #3D3935;
  
  /* Borders */
  --border-subtle: #1E1C1A;
  
  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Spacing scale */
  --space-section: clamp(80px, 12vw, 160px);
  --space-block: clamp(40px, 6vw, 80px);
  
  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

/* ============================================================
   GLOBAL HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 24px;
    background: transparent;
    transition: background 0.3s var(--ease-smooth), backdrop-filter 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.header-nav-desktop {
    display: none;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    transition: opacity 0.2s var(--ease-smooth);
}

.nav-link:hover {
    opacity: 1;
}

.header-nav-mobile-btn {
    display: flex;
    color: var(--text-primary);
    z-index: 102;
    position: relative;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: var(--bg-void);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-editorial), visibility 0.4s var(--ease-editorial);
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-nav-link {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-editorial), transform 0.4s var(--ease-editorial);
}

.mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

.menu-icon line {
    transition: transform 0.3s var(--ease-smooth), opacity 0.3s var(--ease-smooth);
    transform-origin: center;
}

.mobile-menu-open .line-top { transform: translateY(6px) rotate(45deg); }
.mobile-menu-open .line-middle { opacity: 0; }
.mobile-menu-open .line-bottom { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 768px) {
    .header { padding: 24px 48px; }
    .header-nav-desktop { display: flex; }
    .header-nav-mobile-btn { display: none; }
    .mobile-menu { display: none !important; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: 
    radial-gradient(ellipse at center, #0a0a0a 0%, #050505 75%),
    var(--bg-void);
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3CfeColorMatrix values='0 0 0 0 0.91 0 0 0 0 0.88 0 0 0 0 0.84 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.hero-decorative-number {
    position: absolute;
    top: max(100px, 15vh);
    left: 24px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.4;
    letter-spacing: 0.2em;
    z-index: 3;
}

@media (min-width: 768px) {
    .hero-decorative-number { left: 48px; }
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px;
    width: 100%;
}

/* --- THE EDITORIAL SEAL --- */
.hero__seal {
    position: relative;
    width: clamp(200px, 28vw, 320px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    animation: seal-appear 1.2s var(--ease-editorial) forwards;
}

@keyframes seal-appear {
    0% { clip-path: circle(0%); opacity: 0; transform: scale(0.95); }
    100% { clip-path: circle(100%); opacity: 1; transform: scale(1); }
}

.hero__seal img {
    width: 75%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

/* Main ring */
.hero__seal::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: 0.6;
    transition: box-shadow 3s ease;
}

/* Decorative rotating text */
.hero__seal-text {
    position: absolute;
    inset: -16px;
    width: calc(100% + 32px);
    height: calc(100% + 32px);
    animation: rotate-text 60s linear infinite;
    pointer-events: none;
    z-index: 1;
}

.hero__seal-text text {
    font-family: var(--font-body);
    font-size: 13px; /* Scaled precisely to fit the viewBox */
    letter-spacing: 0.2em;
    fill: var(--accent);
    opacity: 0.5;
    text-transform: uppercase;
}

@keyframes rotate-text {
    to { transform: rotate(360deg); }
}

@media (hover: hover) {
    .hero__seal:hover::before {
        box-shadow: 0 0 80px 10px rgba(232, 224, 213, 0.15);
    }
}

.hero-separator {
    width: 60px;
    height: 1px;
    background-color: var(--accent);
    border: none;
    opacity: 0.5;
    margin: 32px 0;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0.7;
    margin: 0 0 40px 0;
}

.hero__cta {
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 20px 64px;
    letter-spacing: 0.25em;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    text-transform: uppercase;
    transition: all 400ms var(--ease-editorial);
    cursor: pointer;
}

.hero__cta:hover {
    background: var(--accent);
    color: var(--bg-void);
    box-shadow: 0 0 60px rgba(232, 224, 213, 0.2);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background-color: rgba(232, 224, 213, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: var(--accent);
    opacity: 0.6;
    animation: scroll-draw 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

.scroll-text {
    font-family: var(--font-body);
    font-size: 0.625rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    opacity: 0.6;
}

@keyframes scroll-draw {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}



/* ============================================================
   PLACEHOLDERS (Phase 2 Sections)
   ============================================================ */
.section-placeholder {
    min-height: 100vh;
    padding: var(--space-section) 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-void);
}
.section-placeholder:nth-child(even) {
    background: var(--bg-surface);
}
.section-placeholder .section-number {
    font-family: var(--font-mono);
    color: var(--accent);
    opacity: 0.4;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    margin-bottom: 24px;
}
.section-placeholder .section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 300;
    margin: 0 0 16px 0;
}
.section-placeholder .section-subtitle {
    font-family: var(--font-body);
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Reduced Motion Overrides */
@media (prefers-reduced-motion: reduce) {

    .hero__seal { animation: none !important; clip-path: none !important; opacity: 1 !important; transform: scale(1) !important; }
    .hero__seal-text { animation: none !important; }
    .scroll-line::after { animation: none !important; transform: translateY(0); opacity: 1; height: 100%; }
    .mobile-menu, .mobile-nav-link, .menu-icon line, .header, .hero__cta { transition: none !important; }
}

/* ============================================================
   CINEMATIC SECTION
   ============================================================ */
.cinematic {
  position: relative;
  min-height: 90vh;
  min-height: 90dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.cinematic__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cinematic__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cinematic__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5,5,5,0.7) 0%,
    rgba(5,5,5,0.5) 50%,
    rgba(5,5,5,0.85) 100%
  );
}

.cinematic__content {
  position: relative;
  text-align: center;
  padding: var(--space-section) 24px;
  max-width: 800px;
}

.cinematic__number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 48px;
}

.cinematic__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.cinematic__quote em {
  font-style: italic;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s var(--ease-editorial);
}

.cinematic.is-visible .cinematic__quote em:nth-child(1) { 
  opacity: 1; transform: translateY(0); transition-delay: 0.2s; 
}
.cinematic.is-visible .cinematic__quote em:nth-child(3) { 
  opacity: 1; transform: translateY(0); transition-delay: 0.6s; 
}
.cinematic.is-visible .cinematic__quote em:nth-child(5) { 
  opacity: 1; transform: translateY(0); transition-delay: 1s; 
}

@media (prefers-reduced-motion: reduce) {
  .cinematic__quote em {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--space-block) 24px;
  background-color: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.footer__links {
  display: flex;
  gap: 32px;
}

.footer__links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease-smooth);
}

.footer__links a:hover {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
