/* ==========================================================================
   Main Stylesheet for Cosmic Baby | アキラ
   Copyright 2014–2025 Akira
   ========================================================================== */

/* 1) Design Tokens (CSS Custom Properties)
   -------------------------------------------------------------------------- */

:root {
  /* Core neutrals */
  --indigo-night: #1a2a4a;
  --indigo-deep: #0a0f14;

  /* Blue-Mercury palette */
  --blue-mercury: #2f4c88;
  --blue-mercury-light: #6f8fd4;
  --blue-mercury-dark: #1b2c55;

  /* Soft-gold palette */
  --gold-soft-light: #e4d6be;
  --gray-soft: #b3b3b3;
  --gold-soft: #c1a57b;
  --gold-soft-dark: #8f6f4b;

  /* Premium glow (light defaults) */
  --logo-glow-core: rgba(47, 76, 136, 0.2);
  --logo-glow-halo: rgba(47, 76, 136, 0.22);
  --logo-glow-hover-core: rgba(47, 76, 136, 0.28);
  --logo-glow-hover-halo: rgba(47, 76, 136, 0.32);

  /* Theme backgrounds */
  --bg-light-gradient: linear-gradient(135deg, #f4f7fc 0%, #e3eaf7 40%, #f8faff 100%);
  --bg-dark-gradient: linear-gradient(135deg, var(--indigo-night) 0%, var(--indigo-deep) 70%);

  /* Default theme (light) */
  --bg: var(--bg-light-gradient);
  --fg: #13213a;

  /* Logo colors (light) */
  --logo-main: var(--blue-mercury);
  --logo-baby-main: #1b2c55;
  --logo-secondary: #4b5563;
  --logo-star-light: var(--blue-mercury-light);
  --logo-star-dark: var(--blue-mercury-dark);
}

/* Auto dark mode via OS setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark-gradient);
    --fg: #b3b3b3;

    /* Logo colors (dark: golden) */
    --logo-main: var(--gold-soft);
    --logo-baby-main: #8f6f4b;
    --logo-secondary: #b3b3b3;
    --logo-star-light: #e9d0ae;
    --logo-star-dark: #98704d;

    /* Premium glow (dark) */
    --logo-glow-core: rgba(203, 182, 142, 0.2);
    --logo-glow-halo: rgba(203, 182, 142, 0.24);
    --logo-glow-hover-core: rgba(203, 182, 142, 0.28);
    --logo-glow-hover-halo: rgba(203, 182, 142, 0.34);
  }
}

/* 2) Global Base Styles & Reset
   -------------------------------------------------------------------------- */

   article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
    display:block
}

 .about-btn {
        top:0
    }

h1 {
    font-size: 2em;
    margin:.67em 0
}

svg:not(:root) {
    overflow:hidden
}

svg {
    fill:currentColor
}

html {
  /* Page background lives on <html> so gradients fill the viewport */
  background: var(--bg);

  /* Improve touch behavior on mobile */
  touch-action: manipulation;

  /* Base type scale */
  font-size: 15px;

  /* Full-viewport sizing */
  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  /* Prevent scrollbars for this experience */
  overflow: hidden;

  /* Fallback font; body overrides with system stack */
  font-family: sans-serif;

  /* Prevent unexpected zooming adjustments */
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: transparent;
  color: var(--fg);

  /* System font stack */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  margin: 0;
  padding: 0;
}

/* Disable selection/drag across the UI (interactive items override cursor below) */
body * {
  -webkit-user-drag: none;
  -moz-user-drag: -moz-none;
  user-drag: none;

  -webkit-touch-callout: none;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  cursor: default;
}

/* 3) Links & Interactive Elements
   -------------------------------------------------------------------------- */

a {
  background: transparent;
  color: #b2a794;
  text-decoration: none;
}

a:visited,
a:hover,
a:active {
  color: #b2a794;
}

a:hover,
a:active {
  outline: 0;
}

/* Show a pointer cursor for elements that behave like buttons/links */
a,
button,
.about-btn a,
.close-btn,
.close-btn .icon {
  cursor: pointer;
}

/* 4) Components
   -------------------------------------------------------------------------- */

/* Logo wrapper: centered and stable (prevents "drifting" alignment) */
.cosmic-logo-wrap {
  position: relative;
  display: block;

  /* Shrinks to the logo width */
  width: fit-content;

  /* Centers wrapper + adds top spacing */
  margin: 40px auto 0;

  /* Matches the logo cap */
  max-width: 420px;
}

/* The logo itself */
.cosmic-logo {
  display: block;
  width: min(70vw, 420px); /* Responsive but capped */
  height: auto;

  color: var(--logo-main);

  /* Intro animation */
  opacity: 0;
  animation: logoIntro 0.8s ease-out forwards;
  animation-delay: 0.25s;

  /* Hover polish */
  transition: filter 0.35s ease, transform 0.25s ease;
  will-change: filter, transform;
}

.cosmic-logo path {
  /* SVG follows currentColor for theming */
  fill: currentColor;
}



/* Close Button
   -------------------------------------------------------------------------- */

.close-btn {
  position: fixed;
  top: 0;
  left: 0;

  /* Hidden/off-canvas by default */
  -webkit-transform: translate3d(-50px, -50px, 0);
  transform: translate3d(-50px, -50px, 0);

  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;

  width: 40px;
  height: 40px;

  font-size: 2rem;
  font-weight: 700;
  text-align: center;

  z-index: 3001;
  color: #1e7a86;
}

.close-btn .icon {
  display: block;
  width: 30px;
  height: 30px;
  fill: #1e7a86;

  margin-left: 5px;
  margin-top: 5px;

  -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;

  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* Expands the clickable area slightly */
.close-btn::after {
  content: "";
  position: absolute;
  display: block;
  left: -5px;
  top: -5px;
  width: 40px;
  height: 40px;
}

/* Visible/active position */
.close-btn.active {
  -webkit-transition-delay: 0.4s;
  transition-delay: 0.4s;

  -webkit-transform: translate3d(20px, 20px, 0);
  transform: translate3d(20px, 20px, 0);
}

/* Nudge icon on hover/press for a "snappy" feel */
.close-btn.active:hover .icon,
.close-btn.active:active .icon {
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
  margin-left: 0;
  margin-top: 0;
}

/* About Button
   -------------------------------------------------------------------------- */

.about-btn {
  position: absolute;
  right: 0;
  top: 10px;

  width: 10%;
  max-width: 60px;
  height: 120px;

  z-index: 550;
}

.about-btn a {
  display: block;
  position: absolute;

  left: 50%;
  top: 45px;

  /* Rotate label vertically */
  -webkit-transform: translate3d(-50%, 0, 0) rotate(90deg);
  transform: translate3d(-50%, 0, 0) rotate(90deg);

  width: 90px;
  height: 40px;

  font-size: 1.3rem;
  font-weight: 600;
  line-height: 40px;

  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05rem;

  border-radius: 4px;
  color: var(--logo-secondary);

  z-index: 50;

  /* Intro animation */
  opacity: 0;
  animation: about-btnIntro 0.8s ease-out forwards;
  animation-delay: 1s;
}

.about-btn a:hover {
  color: var(--logo-main);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

/* About Page Content
   -------------------------------------------------------------------------- */
.about-main {
  max-width: 630px;
  padding: 0 40px;
  margin: 40px auto 60px;
  text-align: center;
}

.about-title {
  color: var(--logo-main);
  font-size: 30px;
  text-transform: uppercase;
  margin: 18px 0;
  line-height: 1.1;
}

.about-text {
  font-size: 12px;
  margin: 0 0 16px;
  color: var(--fg);
  opacity: 0.85;
}

/* Optional: Mobile etwas mehr Abstand zur Notch */
@media (max-width: 768px) {
  .about-main {
    margin-top: calc(80px + env(safe-area-inset-top));
  }
}


/* Copyright
   -------------------------------------------------------------------------- */

.copyright {
  position: fixed;
  right: 0;
  bottom: 0;

  width: 10%;
  max-width: 60px;
  height: 80px;

  z-index: 550;
}

.copyright span {
  font-family: HelveticaNeue, Arial, sans-serif;
  text-align: right;

  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;

  line-height: 40px;
  width: 70px;
  height: 40px;

  color: var(--fg);

  display: block;
  position: absolute;
  left: 50%;
  top: 0;

  /* Rotate label vertically */
  -webkit-transform: translate3d(-50%, 0, 0) rotate(90deg);
  transform: translate3d(-50%, 0, 0) rotate(90deg);

  z-index: 50;
  cursor: default;

  /* Intro animation */
  opacity: 0;
  animation: copyrightIntro 1.5s ease-out forwards;
  animation-delay: 1s;
}

/* Optional manual overrides (if you toggle these classes via JS) */
.copyright.dark-mode span {
  color: rgba(255, 255, 255, 0.3);
}

.copyright.light-mode span {
  color: rgba(0, 0, 0, 0.3);
}

/* 5) Animations
   -------------------------------------------------------------------------- */

@keyframes logoIntro {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes copyrightIntro {
  100% {
    opacity: 1;
  }
}

@keyframes about-btnIntro {
  100% {
    opacity: 1;
  }
}

/* Utility: disable intro animations globally (e.g. add .no-logo-anim to <body>) */
.no-logo-anim .cosmic-logo,
.no-logo-anim .copyright span,
.no-logo-anim .about-btn a {
  animation: none !important;
  opacity: 1 !important;
}

/* 6) Responsive / Media Queries
   -------------------------------------------------------------------------- */

/* Layout tweak for large screens (legacy rule, kept intact) */
@media (min-width: 940px) {
  body > div {
    margin-top: 200px !important;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
}

@media only screen and (max-width: 480px) {
    .site-title {
        font-size: 2rem;
        top: 20px;
        height:40px
    }

    .home-intro {
        font-size:1.1rem
    }

    .home-list {
        padding:50px 7%
    }

    .home-list hr {
        margin-bottom:40px
    }

    .home-thumb {
        width: 94%;
        margin: 3% 3% 30px;
        font-size: 1rem;
        line-height:35px
    }

    .sb-scrollbar-y {
        width:8%
    }

    .home-page .sb-scrollbar-y {
        top: 85px;
        bottom: 50px;
        width:8%
    }

    .close-btn .icon {
        width: 20px;
        height:20px
    }

    .close-btn.active {
        -webkit-transform: translate3d(10px, 10px, 0);
        transform:translate3d(10px, 10px, 0)
    }

    .about-btn {
        top:0
    }

    .about-btn a {
        font-size: 1.1rem;
        top:40px
    }

    .copyright {
        width: 8%;
        height:70px
    }

    .page-title {
        top: 30px;
        font-size: 1.4rem;
        left: 40px;
        right:40px
    }

    .slides--framed {
        padding:70px 40px 40px
    }

    .slides--framed .page-title {
        top:25px
    }

    .slides--framed .slide + .slide {
        margin-top:40px
    }

    .center-full {
        padding:0 40px
    }

    .video-link {
        width: 152px;
        max-width:152px
    }

    .content {
        padding-top:80px
    }

    .content a {
        white-space:normal
    }

    .content h2 {
        font-size: 1.3rem;
        line-height:1.3
    }

    .footer--info {
        padding-top: 60px;
        padding-bottom: 40px
    }
}
