/* ==========================================================================
   Foundation - Reset, CSS Custom Properties, Base Styles, Utilities
   kakuyasu-hp Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-primary: #1a2744;
  --color-primary-light: #2d3f5e;
  --color-accent: #e67e22;
  --color-accent-hover: #d35400;
  --color-accent-light: #fdf2e6;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-border: #e0e0e0;
  --color-bg: #ffffff;
  --color-bg-gray: #f8f9fa;
  --color-bg-dark: #1a2744;
  --color-white: #ffffff;
  --color-gold: #f1c40f;

  /* Fonts */
  --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-en: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-base: var(--font-ja);

  /* Modular Scale (base 16px, ratio ~1.25) */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.8125rem;  /* 13px */
  --fs-base: 1rem;     /* 16px */
  --fs-md: 1.125rem;   /* 18px */
  --fs-lg: 1.25rem;    /* 20px */
  --fs-xl: 1.5rem;     /* 24px */
  --fs-2xl: 1.75rem;   /* 28px */
  --fs-3xl: 2rem;      /* 32px */
  --fs-4xl: 2.625rem;  /* 42px */
  --fs-5xl: 3.25rem;   /* 52px */

  /* Spacing Scale */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
  --sp-64: 64px;
  --sp-80: 80px;
  --sp-96: 96px;
  --sp-120: 120px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.16);
  --shadow-header: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --max-width: 1200px;
  --header-height-mobile: 70px;
  --header-height-desktop: 80px;
}

/* --------------------------------------------------------------------------
   Modern CSS Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  line-height: 1.15;
}

body {
  min-height: 100vh;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
  height: auto;
}

/* SVGs inside flex/inline-flex containers should not be block */
a svg,
button svg,
span svg {
  display: inline-block;
  flex-shrink: 0;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Base Element Styles
   -------------------------------------------------------------------------- */
a:not(.btn) {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:not(.btn):hover {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img {
  vertical-align: middle;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

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

/* Accent color */
.u-accent {
  color: var(--color-accent);
}

/* Responsive visibility */
.u-show-pc {
  display: none !important;
}

.u-show-sp {
  display: block !important;
}

@media (min-width: 768px) {
  .u-show-pc {
    display: block !important;
  }

  .u-show-sp {
    display: none !important;
  }
}

/* Section Header (used in template parts) */
.section-header {
  margin-bottom: var(--sp-48);
}

.section-header__title,
.section__title {
  font-size: var(--fs-xl);
  font-weight: 900;
  text-align: center;
  margin-bottom: var(--sp-16);
  padding-bottom: var(--sp-16);
  position: relative;
  line-height: 1.4;
}

.section-header__title::after,
.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

@media (min-width: 768px) {
  .section-header__title,
  .section__title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--sp-24);
    padding-bottom: var(--sp-24);
  }
}

.section-header__subtitle,
.section__subtitle {
  font-size: var(--fs-sm);
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.8;
}

@media (min-width: 768px) {
  .section-header__subtitle,
  .section__subtitle {
    font-size: var(--fs-base);
  }
}

/* Section Gray Background */
.section--gray {
  background-color: var(--color-bg-gray);
}

/* Generic section padding (fallback) */
.section {
  padding: var(--sp-64) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--sp-96) 0;
  }
}

/* Front-page sections: consistent vertical padding */
.problems,
.features,
.price-table,
.works-gallery,
.flow-steps,
.testimonials,
.comparison,
.faq-accordion,
.blog-latest,
.industries,
.area,
.numbers,
.news,
.greeting {
  padding: var(--sp-64) 0;
}

@media (min-width: 768px) {
  .problems,
  .features,
  .price-table,
  .works-gallery,
  .flow-steps,
  .testimonials,
  .comparison,
  .faq-accordion,
  .blog-latest,
  .industries,
  .area,
  .numbers,
  .news,
  .greeting {
    padding: var(--sp-96) 0;
  }
}

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

/* Text alignment utilities */
.u-text-center {
  text-align: center;
}

.u-text-left {
  text-align: left;
}

/* Font family utility for numbers/English */
.u-font-en {
  font-family: var(--font-en);
}
