/* ============================================================
   Speranza Partner — Shared Site Header / Footer
   components/site.css
   Uses .sh-* (site-header) and .sf-* (site-footer) namespaces
   to avoid conflicts with existing page-level CSS.
============================================================ */

/* ---- Reading Progress Bar ---- */
.sh-progress {
    position: fixed; top: 0; left: 0; height: 2px;
    background: #D4741A;
    z-index: 10001; width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ---- Site Header ---- */
.sh {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000; padding: 16px 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Transparent mode: enabled by body[data-transparent-header] */
body[data-transparent-header] .sh:not(.scrolled) {
    padding: 24px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.sh.scrolled {
    padding: 14px 0;
}

.sh-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .sh-inner { padding: 0 48px; }
}

/* ---- Logo ---- */
.sh-logo-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sh-logo-tagline {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1;
    color: rgba(90, 110, 135, 0.65);
    white-space: nowrap;
    opacity: 0;
    animation: shTaglineIn 0.8s ease 0.1s forwards;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes shTaglineIn {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}
body[data-transparent-header] .sh:not(.scrolled) .sh-logo-tagline {
    color: rgba(255, 255, 255, 0.75);
}
.sh-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.sh-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.sh-logo-text {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #0F1B2D;
    line-height: 1.15;
    transition: color 0.4s;
}
.sh-logo-sub {
    display: block;
    font-weight: 300;
    font-size: 0.55rem;
    letter-spacing: 4px;
    margin-top: 2px;
    opacity: 0.45;
}
body[data-transparent-header] .sh:not(.scrolled) .sh-logo-text {
    color: #fff;
}

/* ---- Desktop Nav ---- */
.sh-nav {
    display: none;
}
@media (min-width: 960px) {
    .sh-nav {
        display: flex;
        align-items: center;
        gap: 40px;
    }
}
.sh-nav a {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #5A6E87;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #D4741A;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sh-nav a:hover {
    color: #0F1B2D;
}
.sh-nav a:hover::after,
.sh-nav a.active::after {
    width: 100%;
}
.sh-nav a.active {
    color: #0F1B2D;
}
body[data-transparent-header] .sh:not(.scrolled) .sh-nav a {
    color: rgba(255, 255, 255, 0.6);
}
body[data-transparent-header] .sh:not(.scrolled) .sh-nav a:hover {
    color: #fff;
}

/* CTA button */
.sh-cta {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: #0F1B2D !important;
    background: transparent;
    padding: 10px 28px !important;
    border-radius: 0 !important;
    border: 1px solid #5A6E87 !important;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
}
.sh-cta::after { display: none !important; }
.sh-cta:hover {
    background: #D4741A !important;
    border-color: #D4741A !important;
    color: #fff !important;
    box-shadow: 0 0 24px rgba(212, 116, 26, 0.2) !important;
}
body[data-transparent-header] .sh:not(.scrolled) .sh-cta {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}
body[data-transparent-header] .sh:not(.scrolled) .sh-cta:hover {
    background: #D4741A !important;
    border-color: #D4741A !important;
}

/* ---- Hamburger ---- */
.sh-hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.sh-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #0F1B2D;
    transition: background 0.3s;
}
body[data-transparent-header] .sh:not(.scrolled) .sh-hamburger span {
    background: #fff;
}
@media (min-width: 960px) {
    .sh-hamburger { display: none; }
}

/* ---- Mobile Drawer ---- */
.sh-drawer {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 45, 0.98);
    backdrop-filter: blur(24px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.sh-drawer.open {
    opacity: 1;
    visibility: visible;
}
.sh-drawer-close {
    position: absolute;
    top: 28px;
    right: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.6rem;
    line-height: 1;
    padding: 4px;
}
.sh-drawer-close:hover {
    color: #fff;
}
.sh-drawer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.sh-drawer-nav a {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
}
.sh-drawer-nav a:hover {
    color: #fff;
}

/* ---- Site Footer ---- */
.sf {
    background: #3A4861;
    padding: 72px 0 32px;
}
.sf-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}
@media (min-width: 768px) {
    .sf-inner { padding: 0 48px; }
}
.sf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 64px;
}
@media (min-width: 768px) {
    .sf-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}
.sf-brand .sh-logo { margin-bottom: 8px; }
.sf-brand .sh-logo-text { color: #fff; }
.sf-brand .sh-logo-sub { color: rgba(255, 255, 255, 0.85); }
.sf-tagline {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    margin-bottom: 20px;
    display: block;
}
.sf-brand p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.9;
    max-width: 280px;
    margin-top: 4px;
}
.sf-heading {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}
.sf-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sf-links li {
    margin-bottom: 14px;
}
.sf-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sf-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #D4741A;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sf-links a:hover {
    color: #fff;
}
.sf-links a:hover::after {
    width: 100%;
}
.sf-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 32px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5px;
}

/* ---- Custom Cursor (hover-capable devices only) ---- */
@media (hover: hover) and (pointer: fine) {
    body, body * { cursor: none !important; }
}
.cursor-dot {
    position: fixed;
    width: 6px; height: 6px;
    background: #D4741A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s,
                background 0.25s;
    will-change: left, top;
}
.cursor-dot.active { opacity: 1; }
.cursor-ring {
    position: fixed;
    width: 30px; height: 30px;
    border: 1.5px solid rgba(212, 116, 26, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s,
                opacity 0.4s;
    will-change: left, top;
}
.cursor-ring.active { opacity: 1; }
body.cursor-hover .cursor-dot {
    width: 10px; height: 10px;
}
body.cursor-hover .cursor-ring {
    width: 46px; height: 46px;
    border-color: rgba(212, 116, 26, 0.7);
}
body.cursor-press .cursor-ring {
    width: 22px; height: 22px;
    border-color: rgba(212, 116, 26, 0.9);
    transition-duration: 0.1s;
}
.cursor-pen {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    top: 0; left: 0;
    opacity: 0;
    transition: opacity 0.3s, filter 0.3s;
}
.cursor-pen.active { opacity: 1; }
.cursor-pen.hover {
    filter: drop-shadow(0 0 5px rgba(212, 116, 26, 0.5));
}
.cursor-ink-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99990;
}
