/* ==========================================================================
   Nuri Kino — public site stylesheet
   ========================================================================== */

:root {
    --bg: #0a0a0a;
    --bg-panel: #131313;
    --ink: #ececec;
    --ink-dim: #b7b7b7;
    --ink-faint: #7d7d7d;
    --accent: #cfa758;
    --accent-bright: #e8c67e;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --ease: cubic-bezier(.22, .8, .32, 1);
    --font-display: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
    --header-h: 88px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-dim);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--accent);
    color: #111;
    padding: 10px 16px;
    z-index: 999;
    border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------
   Inline links inside prose (rich-text paragraphs)
   -------------------------------------------------------------------- */
.prose a,
.closing-note a {
    position: relative;
    color: var(--accent-bright);
    font-weight: 500;
    background-image: linear-gradient(var(--accent-bright), var(--accent-bright));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size 0.35s var(--ease), color 0.35s var(--ease);
    padding-bottom: 1px;
}
.prose a:hover,
.prose a:focus-visible,
.closing-note a:hover {
    background-size: 100% 1px;
    color: #fff;
}

/* --------------------------------------------------------------------
   Header
   -------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid var(--line);
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
    background: rgba(6, 6, 6, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo {
    height: 50px;
    width: auto;
    transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}
.brand:hover .brand-logo {
    transform: translateY(-1px) scale(1.03);
    filter: drop-shadow(0 0 14px rgba(207, 167, 88, 0.35));
}

.header-divider {
    display: none;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 0.55;
    min-width: 0;
}
@media (min-width: 860px) {
    .header-divider { display: flex; }
}
.divider-line {
    width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.divider-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 5px;
    opacity: 0.85;
}

.social-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.social-link {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.social-link svg { width: 16px; height: 16px; fill: currentColor; }
.social-link:hover,
.social-link:focus-visible {
    color: #111;
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 20px rgba(207, 167, 88, 0.35);
}

.site-footer .social-nav {
    justify-content: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
}

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
    position: relative;
    height: min(78vh, 720px);
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}
.hero-media {
    position: absolute;
    inset: -6% -6%;
    background-size: cover;
    background-position: center 22%;
    background-repeat: no-repeat;
    transform: scale(1.08);
    animation: hero-kenburns 22s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes hero-kenburns {
    from { transform: scale(1.08) translate3d(0, 0, 0); }
    to   { transform: scale(1.16) translate3d(-1%, -1%, 0); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6,6,6,0.35) 0%, rgba(6,6,6,0.15) 35%, rgba(6,6,6,0.55) 78%, rgba(6,6,6,0.92) 100%),
        linear-gradient(90deg, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0) 30%, rgba(6,6,6,0) 70%, rgba(6,6,6,0.55) 100%);
}
.hero-watermark {
    position: relative;
    z-index: 2;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(4.5rem, 16vw, 13rem);
    letter-spacing: 0.02em;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
    text-stroke: 1.5px rgba(255, 255, 255, 0.85);
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    animation: hero-in 1.2s 0.15s var(--ease) forwards;
    user-select: none;
    text-align: center;
}
@keyframes hero-in {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    width: 22px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 12px;
    z-index: 2;
}
.hero-scroll-cue span {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: var(--accent-bright);
    border-radius: 2px;
    animation: scroll-cue 1.8s ease-in-out infinite;
}
@keyframes scroll-cue {
    0% { opacity: 0; top: 6px; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; top: 18px; }
}
@media (max-width: 640px) {
    .hero-scroll-cue { display: none; }
}

/* --------------------------------------------------------------------
   Content
   -------------------------------------------------------------------- */
.content {
    background: var(--bg);
    padding: 84px 0 40px;
}
.content-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 28px;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--ink);
    font-size: clamp(1.6rem, 3.4vw, 2.35rem);
    line-height: 1.28;
    margin: 0 0 34px;
    letter-spacing: -0.01em;
}

.prose p {
    margin: 0 0 22px;
    color: var(--ink-dim);
    font-size: 1.03rem;
}

.closing-note {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-style: italic;
    font-size: 0.95rem;
}

/* Scroll-reveal (progressive enhancement; see main.js) */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
.no-js [data-reveal] {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------
   Section divider (decorative)
   -------------------------------------------------------------------- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 28px 48px;
    opacity: 0.5;
}
.section-divider .divider-line { width: min(220px, 30vw); }

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
    background: var(--bg);
    padding: 0 28px 40px;
    text-align: center;
}
.footer-inner {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding-bottom: 22px;
}
.brand.small .brand-logo,
.footer-inner img { height: 32px; width: auto; }

.copyright {
    margin: 0;
    color: var(--ink-faint);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}
.copyright a {
    color: var(--ink-faint);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 2px;
    transition: color 0.3s var(--ease), text-decoration-color 0.3s var(--ease);
}
.copyright a:hover {
    color: var(--accent-bright);
    text-decoration-color: var(--accent-bright);
}

/* --------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------- */
@media (max-width: 640px) {
    .header-inner { padding: 0 18px; }
    .header-right .social-nav { display: none; }
    .nav-toggle { display: flex; }
    .content { padding: 56px 0 20px; }
    .hero { height: 62vh; }
}

/* Mobile slide-down menu (created by JS when nav-toggle is used) */
.mobile-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(8,8,8,0.98);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 18px;
    transform: translateY(-110%);
    transition: transform 0.35s var(--ease);
    z-index: 99;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu .social-link { width: 40px; height: 40px; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
