:root {
  --color-primary: #1a56db;
  --color-primary-dark: #1444b0;
  --color-accent: #f59e0b;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
}

.logo-img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-text {
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--color-primary);
}

.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--color-primary-dark) !important;
  color: #fff !important;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 50%, #fffbeb 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-visual {
  margin: 0 0 32px;
}

.hero-banner {
  max-width: 960px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.hero-badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 24px;
}

.highlight {
  color: var(--color-primary);
  font-size: 1.2em;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-unit {
  font-size: 1rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 12px;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-visual {
  margin: 0 auto 32px;
  max-width: 960px;
}

.section-visual:last-child {
  margin-bottom: 0;
}

.section-banner,
.hero-banner {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.solution-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
}

.solution-box h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.solution-box ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.solution-box li {
  padding-left: 24px;
  position: relative;
  font-size: 0.95rem;
}

.solution-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* Works */
.works {
  background: var(--color-surface);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

.work-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.work-card-visual {
  padding: 0;
}

.work-shot-link,
.work-shot-wrap {
  display: block;
  background: #e8eef5;
  border-bottom: 1px solid var(--color-border);
}

.work-shot-link {
  text-decoration: none;
}

.work-shot {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
}

.work-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-tag {
  display: inline-block;
  background: #dbeafe;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
  width: fit-content;
}

.work-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.work-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 0;
}

.work-body .work-link {
  margin-top: 16px;
}

.work-link {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.work-link:hover {
  text-decoration: underline;
}

/* Pricing */
.pricing-single {
  max-width: 820px;
  margin: 0 auto 24px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pricing-head {
  padding: 32px 32px 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--color-border);
}

.pricing-label {
  text-align: center;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.pricing-costs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.pricing-cost {
  text-align: center;
  min-width: 200px;
}

.pricing-cost-step {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.pricing-cost-value {
  margin-bottom: 4px;
}

.pricing-cost-plus {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text-muted);
  line-height: 1;
}

.pricing-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.pricing-detail-block {
  padding: 28px 32px;
}

.pricing-detail-block:first-child {
  border-right: 1px solid var(--color-border);
}

.pricing-detail-block h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto 24px;
}

.price-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 2px solid var(--color-border);
  position: relative;
}

.price-card.featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
}

.price-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.price {
  text-align: center;
  margin-bottom: 4px;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-primary);
}

.price-unit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.price-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.pricing-detail-block .price-note {
  margin-top: 4px;
}

.price-card .price-note {
  margin-bottom: 24px;
}

.price-features {
  list-style: none;
}

.price-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border);
}

.price-features li:last-child {
  border-bottom: none;
}

.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.pricing-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 24px;
}

/* Flow */
.flow {
  background: var(--color-surface);
}

.flow-list {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.flow-list li {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.flow-list li:last-child {
  border-bottom: none;
}

.flow-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.4;
  flex-shrink: 0;
  width: 48px;
}

.flow-list h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.flow-list p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Contact */
.contact-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  max-width: 640px;
  margin: 32px auto 0;
  text-align: left;
}

.contact-form-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-text);
}

.contact-form {
  display: grid;
  gap: 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.required {
  color: #dc2626;
  font-size: 0.8rem;
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-group input.is-error,
.form-group textarea.is-error {
  border-color: #dc2626;
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group--checkbox {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-group--honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form-error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #dc2626;
  min-height: 1.2em;
}

.form-error--global {
  text-align: center;
  margin-top: 12px;
}

.btn-block {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-block:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.contact-success {
  text-align: center;
  padding: 24px 0 8px;
}

.contact-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 56px;
}

.contact-success h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.contact-success p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.contact-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.contact-note a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-note a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0;
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  font-weight: 900;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.85rem;
}

/* Tablet (768px–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .hero {
    padding: 128px 0 72px;
  }

  .section {
    padding: 72px 0;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-box {
    max-width: 560px;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  .container {
    padding: 0 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .menu-btn {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    display: block;
    padding: 14px 12px;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 44px;
    line-height: 1.4;
  }

  .nav a:not(.nav-cta):active {
    background: var(--color-bg);
  }

  .nav-cta {
    text-align: center;
    padding: 14px 20px !important;
    margin-top: 8px;
  }

  .hero {
    padding: 112px 0 56px;
  }

  .hero-badge {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 36px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
  }

  .hero-stats {
    gap: 20px 32px;
    justify-content: center;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .section {
    padding: 56px 0;
  }

  .section-lead {
    margin-bottom: 32px;
    font-size: 0.95rem;
  }

  .section-visual {
    margin-bottom: 24px;
  }

  .solution-box {
    padding: 28px 24px;
  }

  .work-body {
    padding: 20px;
  }

  .work-shot {
    height: 180px;
  }

  .contact-box {
    padding: 24px 20px;
    margin-top: 24px;
  }

  .form-group input,
  .form-group textarea {
    padding: 14px;
    font-size: 16px;
  }

  .btn-block {
    padding: 16px 24px;
    min-height: 48px;
  }

  .pricing-details {
    grid-template-columns: 1fr;
  }

  .pricing-detail-block:first-child {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .pricing-head {
    padding: 24px 20px;
  }

  .pricing-detail-block {
    padding: 24px 20px;
  }

  .pricing-cost-plus {
    transform: rotate(90deg);
  }

  .footer {
    padding: 32px 0;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .footer-copy {
    font-size: 0.8rem;
    line-height: 1.6;
  }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .logo {
    font-size: 1.1rem;
    gap: 8px;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding: 104px 0 48px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .stat {
    align-items: center;
    text-align: center;
  }

  .section {
    padding: 48px 0;
  }

  .contact-note {
    font-size: 0.8rem;
    word-break: break-all;
  }
}

/* Touch devices: reduce hover motion */
@media (hover: none) {
  .card:hover,
  .work-card:hover,
  .btn-primary:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
