/*
Theme Name: Spacle
Theme URI: https://example.com
Author: KSB
Author URI: https://www.ksb.co.jp/
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Spacle
*/

/* ============================================
   Design System - CSS Custom Properties
   ============================================ */

:root {
  /* Primary Colors */
  --color-primary: #EE86A1;
  --color-primary-dark: #059669;
  --color-primary-light: #D1FAE5;

  /* Secondary Colors */
  --color-secondary: #3B82F6;
  --color-secondary-light: #DBEAFE;

  /* Neutral Colors */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Section Colors */
  --color-news: #89CFD8;
  --color-shop: #F4AA55;
  --color-shop-light: #F9F3EC;
  --color-search: #65BFA1;
  --color-search-light: #F4FCF9;

  /* Feedback Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Rating */
  --color-star: #FBBF24;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem; /* 8 */
  --space-s: 0.625rem; /* 10 */
  --space-md: 1rem; /* 16 */
  --space-lg: 1.5rem; /* 20 */
  /*--space-xl: 2rem;  32 */
  --space-xl: 1.8rem;
  --space-2xl: 3rem; /* 64 */
  --space-3xl: 4rem;
  --space-4xl: 5rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-size-xs: 0.75rem; /* 12 */
  --font-size-sm: 0.875rem; /* 14 */
  --font-size-base: 1rem; /* 16 */
  --font-size-lg: 1.125rem; /* 18 */
  --font-size-xl: 1.25rem; /* 20 */
  --font-size-2xl: 1.5rem; /* 24 */
  --font-size-3xl: 1.875rem;
  --font-size-base2: 2rem;
  --font-size-4xl: 2.25rem;
  --font-size-70: 4rem;
  --font-size-28: 1.75rem;
  --font-size-22: 1.375rem;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max-width: 1100px;
  --header-height: 64px;
  --bottom-nav-height: 56px;
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
}

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: #595757;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 0;
}

body:not(.home) {
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  body {
    /* iOS PWA safe area対応 */
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   Utility Classes
   ============================================ */

@media (min-width: 769px) {
.site-main {
  overflow: hidden;
}
}

.container {
  width: 100%;
  max-width: calc(var(--container-max-width) + var(--space-xl) * 2);
  margin: 0 auto;
  /* padding: 0 var(--space-md); */
}

@media (min-width: 769px) {
  .container {
    padding: 0 var(--space-xl);
  }
  .container .page-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
    font-size: var(--font-size-base2);
    font-weight: 500;
  }
  .container .page-title img {
    width: 47px;
  }
}
@media (max-width: 768px) {
  .container .page-title {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

/* ============================================
   Animation Classes
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn var(--transition-base);
}

.slide-up {
  animation: slideUp var(--transition-base);
}

.scale-in {
  animation: scaleIn var(--transition-fast);
}
