/* =============================================
   ontsugi Corporate Site - Shared Styles
   ============================================= */

/* ===== Variables ===== */
:root {
  --primary: #EF780C;
  --primary-dark: #d96a08;
  --navy: #312E70;
  --bg: #FFFCF8;
  --bg-section: #F9F6F2;
  --text: #333333;
  --text-light: #666666;
  --dark-navy: #231F52;
  --white: #FFFFFF;
  --border-light: rgba(49, 46, 112, 0.06);
  --border-lighter: rgba(49, 46, 112, 0.04);
  --shadow-soft: rgba(49, 46, 112, 0.05);
  --shadow-mid: rgba(49, 46, 112, 0.06);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 2;
  font-weight: 400;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.4s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 24px var(--shadow-mid);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-navy);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-logo-img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--dark-navy);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--dark-navy);
}

/* ===== Dropdown Menu ===== */

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(49, 46, 112, 0.1);
  padding: 12px 0;
  min-width: 180px;
  z-index: 1001;
  margin-top: 8px;
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-item:hover .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block !important;
  padding: 8px 20px !important;
  font-size: 0.78rem !important;
  color: var(--text) !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown a::after {
  display: none !important;
}

.nav-dropdown a:hover {
  background: var(--bg-section) !important;
  color: var(--primary) !important;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--dark-navy);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ===== Mobile Menu Overlay ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--dark-navy);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--primary);
}

/* ===== Page Header ===== */
.page-header {
  padding: 180px 40px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: #312E70 !important;
}

.page-header-bg-text {
  font-family: 'Outfit', sans-serif;
  font-size: 7rem;
  font-weight: 700;
  color: var(--dark-navy);
  opacity: 0.025;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.page-header-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(239, 120, 12, 0.8);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
}

.page-header-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: white;
  line-height: 1.5;
  letter-spacing: 0.06em;
  position: relative;
}

.page-header-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 28px;
  line-height: 2.2;
  position: relative;
}

.page-header-bg-text {
  color: white;
  opacity: 0.04;
}

/* ===== Sections ===== */
.section {
  padding: 120px 40px;
}

.section-alt {
  background: var(--bg-section);
}

.section-dark {
  background: var(--navy);
}

.section-dark .section-label {
  color: rgba(239, 120, 12, 0.8);
}

.section-dark .section-title {
  color: var(--white);
}

.section-dark .section-desc {
  color: rgba(255, 255, 255, 0.7);
}

.section-dark .section-bg-text {
  color: white;
  opacity: 0.04;
}

.section-inner {
  max-width: 880px;
  margin: 0 auto;
}

.section-header {
  position: relative;
  margin-bottom: 24px;
}

.section-bg-text {
  font-family: 'Outfit', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  color: var(--dark-navy);
  opacity: 0.03;
  position: absolute;
  top: -32px;
  left: -8px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 24px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  position: relative;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 2.2;
  margin-bottom: 56px;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding: 100px 40px;
  background: var(--bg-section);
}

.cta-lead {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 2;
}

.cta-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 16px;
  line-height: 1.8;
}

.cta-sub {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 44px;
  line-height: 2;
}

.cta-btn {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  background: var(--primary);
  text-decoration: none;
  padding: 16px 52px;
  border-radius: 60px;
  letter-spacing: 0.12em;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(239, 120, 12, 0.2);
}

/* ===== Footer ===== */
.footer {
  padding: 64px 40px 48px;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-nav a {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--dark-navy);
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-logo img {
  height: 32px;
  width: auto;
  display: inline-block;
}

.footer-company {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.footer-copy {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ===== Illustrations ===== */
.illust {
  display: block;
  pointer-events: none;
  user-select: none;
}

.illust-inline {
  width: 180px;
  height: auto;
  margin: 0 auto 40px;
}

.illust-side {
  position: absolute;
  width: 140px;
  height: auto;
  opacity: 0.85;
}

.illust-float {
  position: absolute;
  width: 120px;
  height: auto;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .illust-inline {
    width: 140px;
    margin-bottom: 28px;
  }

  .illust-side {
    display: none;
  }

  .illust-float {
    width: 80px;
    opacity: 0.4;
  }
}

/* ===== Approach / Flow Cards ===== */
.approach-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  list-style: none !important;
  position: relative;
}

.approach-grid > li {
  opacity: 1 !important;
  transform: none !important;
}

.approach-grid::before {
  content: '';
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 32px;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--navy));
  opacity: 0.12;
  z-index: 0;
}

.approach-card {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: flex-start !important;
  gap: 28px !important;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.approach-card:hover {
  transform: translateX(8px);
}

.approach-num-circle {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  background: var(--primary);
  transition: transform 0.3s ease;
}

.approach-card:nth-child(even) .approach-num-circle {
  background: var(--navy);
}

.approach-card:hover .approach-num-circle {
  transform: scale(1.1);
}

.approach-card-inner {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 32px 36px;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.4s ease;
}

.approach-card:nth-child(even) .approach-card-inner {
  border-left-color: var(--navy);
}

.approach-card:hover .approach-card-inner {
  box-shadow: 0 12px 36px rgba(49, 46, 112, 0.08);
}

.approach-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 10px;
  line-height: 1.5;
}

.approach-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 2.2;
}

/* ===== Logo Watermark (as background) ===== */
.has-watermark {
  position: relative !important;
  overflow: hidden !important;
}

.has-watermark::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: url('img/logo_marksk.png') no-repeat center / contain;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

.has-watermark > * {
  position: relative;
  z-index: 1;
}

.has-watermark--br::after { bottom: -40px; right: -40px; }
.has-watermark--tl::after { top: -30px; left: -40px; }
.has-watermark--tr::after { top: -20px; right: -30px; }
.has-watermark--bl::after { bottom: -40px; left: -40px; }

@media (max-width: 768px) {
  .has-watermark::after {
    width: 200px;
    height: 200px;
  }
}

/* ===== Section Dividers ===== */
.wave-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}

.wave-divider--flip svg {
  transform: scaleY(-1);
}

.wave-divider--sm svg {
  height: 32px;
}

/* ===== Background Decorations ===== */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.04;
}

.deco-circle--primary {
  background: var(--primary);
}

.deco-circle--navy {
  background: var(--navy);
}

.section-decorated {
  position: relative;
  overflow: hidden;
}

/* ===== Scroll Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children animation */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-children.visible > *:nth-child(6) { transition-delay: 0.5s; }

.fade-in-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Icons ===== */
.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 28px;
  height: 28px;
}

.icon-primary {
  color: var(--primary);
}

.icon-navy {
  color: var(--navy);
}

.icon-light {
  color: var(--text-light);
}

/* ===== Shared Components ===== */

/* Cards */
.card {
  padding: 44px 36px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--shadow-soft);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow-mid);
}

/* Tags */
.tag {
  font-size: 0.73rem;
  color: var(--navy);
  background: var(--border-lighter);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 400;
  display: inline-block;
}

/* Accent line */
.accent-line {
  width: 32px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 20px;
    height: 56px;
  }

  .nav-logo-img {
    height: 22px;
  }

  .nav-links--desktop {
    display: none;
  }

  .nav-hamburger {
    display: block;
    position: relative;
    z-index: 10001;
  }

  .page-header {
    padding: 110px 20px 52px;
  }

  .page-header-title {
    font-size: 1.5rem;
  }

  .page-header-bg-text {
    font-size: 3.5rem;
    color: white;
    opacity: 0.04;
  }

  .page-header-desc {
    font-size: 0.85rem;
    margin-top: 20px;
  }

  .page-header-desc br {
    display: none;
  }

  .section {
    padding: 72px 20px;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }

  .section-bg-text {
    font-size: 2.8rem;
    top: -18px;
  }

  .section-desc {
    font-size: 0.85rem;
    margin-bottom: 40px;
  }

  .section-desc br {
    display: none;
  }

  .cta {
    padding: 72px 20px;
  }

  .cta-text {
    font-size: 1.25rem;
  }

  .cta-sub br {
    display: none;
  }

  .footer {
    padding: 48px 20px 36px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
  }

  .footer-logo img {
    height: 26px;
  }

  .approach-num-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 0.9rem;
  }

  .approach-card {
    gap: 16px;
  }

  .approach-card-inner {
    padding: 24px 20px;
  }

  .approach-title {
    font-size: 0.95rem;
  }

  .approach-grid::before {
    left: 24px;
  }

  .mobile-menu {
    gap: 36px;
  }

  .mobile-menu a {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .page-header-title {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.2rem;
  }
}
