/*
Theme Name: Celesta
Theme URI: https://celesta.example.com
Author: Antigravity
Author URI: https://example.com
Description: Official theme for CELES+A. Clean, elegant, and mysterious design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: celesta
*/

/* ==========================================================================
   Design System / Variables
   ========================================================================== */
:root {
  /* Colors */
  --c-navy: #1a2530;
  --c-white: #ffffff;
  --c-gray-light: #f5f6f8;
  --c-gray-text: #666666;
  --c-border: #e0e4e8;

  /* Typography */
  --font-base: 'Noto Sans JP', 'Montserrat', sans-serif;

  /* Spacing Scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  /* Transitions */
  --transition-fast: 0.2s ease-out;
  --transition-base: 0.35s ease-out;
  --transition-slow: 0.6s ease-out;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  color: var(--c-navy);
  line-height: 1.8;
  background-color: var(--c-white);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.03em;
}

/* Sub-pages header solid background */
body:not(.home) .site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--c-navy);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

body:not(.home) .site-header .hamburger-line {
  background-color: var(--c-navy);
}

body:not(.home) .page-header {
  padding-top: var(--space-6);
}

body:not(.home) .site-main {
  min-height: 100vh;
}

a {
  color: var(--c-navy);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--c-gray-text);
}

/* Blog & News Content Links */
.entry-content a {
  color: #35608A;
  text-decoration: underline;
}

.entry-content a:hover {
  color: var(--c-navy);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Page Load Fade-in Effect
   ========================================================================== */
body.is-loading #page {
  opacity: 0;
  visibility: hidden;
}

body.is-loaded #page {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  /* Regular for elegance */
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.hero-catch {
  font-weight: 300;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--c-white);
}

@media (max-width: 768px) {
  .hero-catch {
    font-size: 18px;
  }
}

.section-title {
  font-size: 28px;
  text-align: center;
  position: relative;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  color: #304070;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: #304070;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 22px;
  }
}

/* ==========================================================================
   Layout & Grid
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-2);
  }
}

.section {
  padding: var(--space-7) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-5) 0;
  }
}

.grid {
  display: grid;
  gap: var(--space-3);
}

/* ==========================================================================
   Components
   ========================================================================== */
.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Make the entire card clickable if it contains a primary anchor link */
.card a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-4);
  height: 48px;
  border-radius: 24px;
  background-color: #304070;
  color: var(--c-white) !important;
  font-weight: 500;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.btn:hover {
  background-color: var(--c-gray-text);
  color: var(--c-white) !important;
}

.btn-light {
  background-color: var(--c-white);
  color: var(--c-navy) !important;
}

.btn-light:hover {
  background-color: var(--c-border);
  color: var(--c-navy) !important;
}

/* ==========================================================================
   Video Container Embeds
   ========================================================================== */
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 100;
  display: flex;
  align-items: center;
  /* Transitions: 0.4s ease-out per user request */
  transition: background-color 0.4s ease-out, box-shadow 0.4s ease-out, color 0.4s ease-out;
  background-color: #304070;
  color: var(--c-white);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--c-navy);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  /* Light drop shadow */
}

/* Base link color inherits from header color */
.site-header a {
  color: inherit;
  transition: color 0.4s ease-out;
}

.site-header a:hover {
  opacity: 0.7;
}

.site-title a.logo-link {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.main-navigation .header-menu {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation .header-menu a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

/* ==========================================================================
   Forms / Contact Form 7
   ========================================================================== */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
}

.wpcf7-submit {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.1em;
  background-color: var(--c-navy);
  color: var(--c-white);
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color var(--transition-base);
  display: block;
  margin: var(--space-4) auto 0;
  /* Center the button automatically */
  min-width: 140px;
}

.wpcf7-submit:hover {
  background-color: var(--c-gray-text);
}

/* ==========================================================================
   Mobile Menu Overlay
   ========================================================================== */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 999;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--c-white);
  transition: all 0.3s ease-in-out;
}

.site-header.is-scrolled .hamburger-line {
  background-color: var(--c-navy);
}

.menu-toggle.is-active .hamburger-line {
  background-color: var(--c-navy);
}

.menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .header-right {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 998;
    gap: 0 !important;
  }

  .header-right.is-active {
    opacity: 1;
    visibility: visible;
  }

  .main-navigation .header-menu {
    flex-direction: column;
    text-align: center;
    gap: var(--space-5);
  }

  .main-navigation .header-menu a {
    color: var(--c-navy);
    font-size: 20px;
    font-weight: 600;
  }

  .sns-links {
    margin-top: var(--space-6);
    color: var(--c-navy);
  }
}