/* =========================================================
   Flauto0121 — Global Stylesheet
   Material Design 3 Inspired / Flat Design
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Surface */
  --surface:        #f8fafc;
  --surface-card:   #ffffff;
  --surface-dim:    #f1f5f9;
  --surface-inv:    #1e293b;
  
  /* Primary */
  --primary:        #252525;
  --primary-container: #f1f5f9;
  --on-primary:     #ffffff;
  --on-primary-container: #252525;
  
  /* Secondary */
  --secondary:      #64748b;
  --secondary-container: #f1f5f9;
  
  /* Outline */
  --outline:        #e2e8f0;
  --outline-variant: #cbd5e1;
  
  /* Text */
  --on-surface:     #252525;
  --on-surface-variant: #475569;
  --on-surface-muted: #94a3b8;
  
  /* Accent colors */
  --accent-red:     #252525;
  --accent-blue:    #252525;
  --accent-green:   #252525;
  --accent-pink:    #252525;
  --accent-orange:  #252525;
  --accent-dark:    #252525;
  
  /* Sizes */
  --nav-height:     64px;
  --max-width:      1280px;
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --radius-full:    9999px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  background-color: var(--surface);
  color: var(--on-surface);
  line-height: 1.7;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

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

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

/* Material Symbols */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}
.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1;
}

/* ---------- Shared Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #252525;
  border-bottom: 1px solid #333;
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.site-nav .nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 768px) {
  .site-nav .nav-inner { padding-inline: 32px; }
}

.site-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav .nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.site-nav .nav-links {
  display: none;
  list-style: none;
  gap: 4px;
  align-items: center;
}

@media (min-width: 768px) {
  .site-nav .nav-links { display: flex; }
}

.site-nav .nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.site-nav .nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.site-nav .nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.site-nav .nav-links .nav-dropdown {
  position: relative;
}

.site-nav .nav-links .nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #252525;
  border: 1px solid #333;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  min-width: 180px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  z-index: 10;
}

.site-nav .nav-links .nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav .nav-links .nav-dropdown-menu a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  width: 100%;
}

/* Mobile menu button */
.nav-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (min-width: 768px) {
  .nav-mobile-toggle { display: none; }
}

/* Mobile drawer */
.nav-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.nav-mobile-drawer.open { display: flex; }

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.nav-mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(85vw, 320px);
  height: 100%;
  background: var(--surface-card);
  padding: 24px;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.nav-mobile-panel .mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--secondary-container);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--on-surface-variant);
  margin-left: auto;
  margin-bottom: 24px;
}

.nav-mobile-panel .mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile-panel .mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  transition: all 0.15s;
}

.nav-mobile-panel .mobile-nav-links a:hover,
.nav-mobile-panel .mobile-nav-links a.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.nav-mobile-panel .mobile-nav-links .sub-link {
  padding-left: 52px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-surface-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #262626;
  color: #e2e8f0;
  padding: 64px 0 24px;
  margin-top: 80px;
  position: relative;
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
}

.site-footer .footer-inner {
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Top Row: Logo, Info, QR */
.footer-top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}

@media (max-width: 768px) {
  .footer-top-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
}

/* Left: Big Logo */
.footer-logo-col {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 768px) {
  .footer-logo-col { justify-content: center; }
}
.footer-big-logo {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-big-logo svg {
  width: 100%;
  height: 100%;
}

/* ========== Global Logo Animation ========== */
:root {
  --logo-bg: #393939;
  --logo-arc: #999;
  --logo-rect: #ccc;
}

.logo-anim-circle, .logo-anim-arc, .logo-anim-rect {
  opacity: 0;
  transform-origin: 50px 50px;
}
.logo-anim-arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.logo-anim-rect { transform-origin: 20px 50.5px; }

.animate .logo-anim-circle {
  animation:
    scaleInCircle 0.8s cubic-bezier(0.25,1,0.5,1) forwards,
    scaleOutCircle 0.8s cubic-bezier(0.5,0,0.75,0) 5.5s forwards;
}
.animate .logo-anim-arc {
  animation:
    drawArc 1.4s 0.6s cubic-bezier(0.65,0,0.35,1) forwards,
    rotateOutArc 0.8s 5.0s cubic-bezier(0.55,0.06,0.68,0.19) forwards;
}
.animate .logo-anim-rect {
  animation:
    slideInRect 0.8s 1.0s cubic-bezier(0.23,1,0.32,1) forwards,
    slideOutRect 0.5s 4.5s cubic-bezier(0.45,0.05,0.55,0.95) forwards;
}

@keyframes scaleInCircle {
  from { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.1); }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes drawArc {
  from { stroke-dashoffset: 1; opacity: 0; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes slideInRect {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
@keyframes slideOutRect {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-1.5vw); opacity: 0; }
}
@keyframes rotateOutArc {
  from { transform: rotate(0deg); opacity: 1; }
  to   { transform: rotate(135deg); opacity: 0; }
}
@keyframes scaleOutCircle {
  from { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.1); }
  to   { transform: scale(0); opacity: 0; }
}

/* Center: Info & Socials */
.footer-info-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
  margin: 0;
}
.footer-desc {
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 16px auto;
}

@media (max-width: 480px) {
  .footer-socials {
    display: grid;
    grid-template-columns: repeat(3, auto);
  }
}
.social-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  color: #262626;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.social-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.social-icon-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.footer-ofuse-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #252525;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
}
.footer-ofuse-btn:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

/* Right: QR Code */
.footer-qr-col {
  display: flex;
  justify-content: flex-start;
}
@media (max-width: 768px) {
  .footer-qr-col { justify-content: center; }
}
.qr-wrapper {
  background: #ffffff;
  padding: 12px;
  border-radius: 16px;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.qr-wrapper img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

/* Middle Row: Links */
.footer-middle-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.footer-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-buttons a {
  background: #ffffff;
  color: #262626;
  padding: 10px 32px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  width: 220px;
  text-align: center;
  transition: all 0.2s;
  box-sizing: border-box;
}
.footer-buttons a:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.footer-notice {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  text-align: center;
}

/* Bottom Row: Sub Icons & Copy */
.footer-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.footer-sub-icons {
  display: flex;
  gap: 16px;
}
.footer-sub-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.footer-sub-icons a:hover {
  opacity: 0.8;
}
.footer-sub-icons img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.footer-copy {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Bottom-left Info Button */
.footer-info-btn {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.footer-info-btn:hover {
  background: rgba(255,255,255,0.25);
}
.footer-info-btn span {
  font-size: 16px;
}

/* ---------- Dark Nav Variant ---------- */


/* ---------- Page Hero ---------- */
.page-hero {
  padding: 100px 20px 64px;
  text-align: center;
  background: #252525;
  color: #fff;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 12px;
}

.page-hero p {
  color: #94a3b8;
  font-weight: 500;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}
