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

:root {
  --primary: #2F3B69;
  --primary-light: #4a5a8a;
  --accent: #ed8936;
  --accent-dark: #dd6b20;
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;

  --font-sans: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1000px;
  --section-padding: 80px 24px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: #2F3B69;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(47, 59, 105, 0.95);
  backdrop-filter: blur(12px);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-icon {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 80px 24px 60px;
  background: #2F3B69;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-top-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 48px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hero-top-image img {
  width: 100%;
  height: auto;
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.hero-logo-icon {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
  display: block;
  margin-top: 8px;
  opacity: 0.95;
}

.hero-vision-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-vision-image img {
  width: 100%;
  height: auto;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.hero-message {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.9;
}

.hero-message--highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(237, 137, 54, 0.3);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1rem;
}

/* ===== Section Common ===== */
.section {
  padding: var(--section-padding);
  background: #2F3B69;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

/* ===== Vision Section ===== */
.section-vision {
  background: #2F3B69;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.vision-item {
  padding: 28px 24px;
  background: transparent;
  border-radius: 0;
  border: 2px solid var(--white);
}

.vision-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.vision-divider {
  width: 100%;
  height: 1px;
  background: var(--white);
  margin-bottom: 16px;
}

.vision-item p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* ===== App Intro Section ===== */
.section-apps {
  background: #2F3B69;
}

.app-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-intro:last-child {
  border-bottom: none;
}

.app-intro--reverse {
  direction: rtl;
}

.app-intro--reverse > * {
  direction: ltr;
}

.app-intro-body {
  padding: 0 16px;
}

.app-intro-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.app-intro-description {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 20px;
}

.app-intro-features {
  list-style: none;
  margin-bottom: 28px;
}

.app-intro-features li {
  position: relative;
  padding-left: 20px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 2;
}

.app-intro-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.app-intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-screenshot {
  max-width: 280px;
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}

.app-intro:hover .app-screenshot {
  transform: translateY(-8px);
}

.app-intro-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.btn-privacy {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
}

.btn-privacy:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.app-screenshot-placeholder {
  width: 280px;
  height: 420px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.app-screenshot-placeholder span {
  font-size: 3rem;
}

.app-screenshot-placeholder p {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ===== Web Services Section ===== */
.section-services {
  background: #2F3B69;
}

.service-item {
  display: flex;
  gap: 24px;
  padding: 32px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow var(--transition);
}

.service-item:last-child {
  margin-bottom: 0;
}

.service-item:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.service-item--with-image {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.service-item--with-image .service-body {
  padding: 24px 32px 32px;
}

.service-image-header {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.service-image-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.service-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.service-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.service-tagline {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
}

.service-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-item .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.service-item .btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* ===== Contact Section ===== */
.section-contact {
  position: relative;
  overflow: hidden;
  background: #2F3B69;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background: url('images/contact_me.png') center center / cover no-repeat;
  z-index: 0;
  opacity: 0.3;
}

.section-contact .section-inner {
  position: relative;
  z-index: 1;
}

.section-contact .section-label {
  color: var(--accent);
}

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

.contact-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact-box p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  line-height: 1.9;
}

.contact-methods {
  margin-bottom: 32px;
}

/* ===== SNS Links ===== */
.sns-links {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.sns-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--white);
}

.sns-link:hover {
  transform: translateY(-2px);
}

.sns-link img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sns-link svg {
  width: 48px;
  height: 48px;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 24px;
  background: #232c4a;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.footer p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Scroll Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #2F3B69;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 80px 20px 48px;
  }

  .hero-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-top-image {
    margin-bottom: 32px;
  }

  .app-intro {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }

  .app-intro--reverse {
    direction: ltr;
  }

  .app-intro-visual {
    order: -1;
  }

  .app-screenshot {
    max-width: 220px;
  }

  .service-item {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }

  .service-image-header {
    height: 140px;
  }

  .vision-grid {
    grid-template-columns: 1fr;
  }
}
