/*
  TERACO.LABO White Theme Override
  - Keep blue→green gradient as accent
  - Shift overall base to white, reduce heavy glass/blur
  - Do not alter content/structure; style-only overrides
  - Add mobile-friendly defaults shared across all pages
  - Modern minimal UI to match logotype (fonts + outline buttons + chips)
*/

/* Google Font: M PLUS Rounded 1c */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700&display=swap');

:root {
  --primary-blue: #2563eb;
  --accent-green: #059669;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 16px rgba(0,0,0,0.04);
  --gradient: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
  --header-height: 72px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Base */
html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* Unify font across the site (keeps fallbacks) */
body {
  font-family: 'M PLUS Rounded 1c', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  letter-spacing: 0.01em;
}

/* Prevent accidental horizontal scrolling on small screens */
body { overflow-x: hidden; }

/* Make media responsive by default */
img, svg, video { max-width: 100%; height: auto; }

/* Remove gradient accent bar for cleaner white design */

/* Header */
header {
  background: rgba(255,255,255,1) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
  /* Allow header to expand if logo is slightly taller */
  min-height: var(--header-height) !important;
}

/* Keep nav bar height thin regardless of logo size */
/* Keep a baseline height but allow content to define actual height */
nav { padding: 0 !important; min-height: var(--header-height) !important; }
nav .container { height: 100%; display: flex; align-items: center; }

/* Compact header navigation: keep menu closer to the logo */
/* Center the logo + menu group on desktop */
header nav .container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.75rem;
  margin-left: auto !important;
  margin-right: auto !important;
}
.logo { margin-right: 0; }
.nav-menu { margin-left: 0 !important; gap: 0.75rem !important; }
.nav-menu a { padding: 0.45rem 0.6rem !important; }

/* On mobile keep space-between so hamburger stays at right */
@media (max-width: 768px) {
  header nav .container { justify-content: space-between !important; }
}

.logo h1 {
  color: var(--text) !important;
  font-weight: 700 !important;
}

.logo p { color: var(--muted) !important; }

.nav-menu a {
  color: var(--text) !important;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-blue) !important;
  background: rgba(91, 82, 255, 0.08) !important;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 4px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  opacity: 0;
  transform: translateY(2px);
  transition: all .25s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after { opacity: 1; transform: translateY(0); }

/* Generic affordances */
a, button { cursor: pointer; }
[onclick] { cursor: pointer !important; }

/* Accessible focus ring for interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none !important;
  box-shadow: var(--ring) !important;
  border-color: var(--primary-blue) !important;
}

/* Hero */
.hero { color: var(--text) !important; }
.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}
.hero-logo img { filter: none !important; }
.hero-subtitle { color: var(--muted) !important; opacity: 1 !important; }
/* Hero tagline: blue→green gradient text */
.hero-description {
  background: var(--gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  padding: 0 .1rem;
}

/* Sections */
.section-digital,
.section-instructor,
.section-video,
.section-space {
  background: var(--surface) !important;
  backdrop-filter: none !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

/* Section titles: clean solid text, subtle gradient underline */
.section-title {
  color: var(--text) !important;
  text-shadow: none !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--gradient);
  border-radius: 2px;
}

/* Cards */
.service-card-large,
.space-card {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  position: relative !important;
  /* デフォルトは静的。クリック可能要素だけにアニメ付与 */
}

.service-card-large[role="link"]:hover,
.space-card[role="link"]:hover,
.service-card-large[onclick]:hover,
.space-card[onclick]:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 44px rgba(20,28,38,0.12) !important;
  border-color: transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
              var(--gradient) border-box !important;
}

/* Click cue: subtle chevron appears on hover */
.service-card-large[role="link"]::after,
.space-card[role="link"]::after,
.service-card-large[onclick]::after,
.space-card[onclick]::after {
  content: "\2192"; /* → */
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-weight: 700;
  color: var(--primary-blue);
  opacity: 0;
  transform: translateX(-4px);
  transition: transform .2s var(--ease-out), opacity .2s var(--ease-out);
  pointer-events: none;
}
.service-card-large[role="link"]:hover::after,
.space-card[role="link"]:hover::after,
.service-card-large[onclick]:hover::after,
.space-card[onclick]:hover::after { opacity: 1; transform: translateX(0); }

/* Press/tap feedback */
.service-card-large[role="link"]:active,
.space-card[role="link"]:active,
.service-card-large[onclick]:active,
.space-card[onclick]:active { transform: translateY(-2px) scale(0.99); }

/* Image overlay cards keep their white veil */
.smartphone-card::before,
.ai-card::before,
.instructor-card::before,
.video-card::before,
.rental-card::before {
  background: rgba(255,255,255,0.95) !important;
}

/* Headings inside cards use clean black text */
.service-card-large h3,
.space-card h3,
.smartphone-card h3,
.ai-card h3,
.instructor-card h3,
.video-card h3,
.rental-card h3 {
  color: var(--text) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

/* Buttons: modern outline style (keeps markup/links intact) */
.cta-button,
.back-link,
.contact-button,
.contact-btn,
.submit-button,
.submit-btn,
.all-videos-btn,
.plan-cta {
  background: transparent !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  letter-spacing: 0.02em !important;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background-color .2s ease, color .2s ease, border-color .2s ease !important;
}

.cta-button:hover,
.back-link:hover,
.contact-button:hover,
.contact-btn:hover,
.submit-button:hover,
.submit-btn:hover,
.all-videos-btn:hover,
.plan-cta:hover {
  background: #f6f8fb !important;
  transform: translateY(-2px);
  box-shadow: none !important;
  filter: none !important;
}

/* Button arrows animate slightly on hover to suggest forward move */
.cta-button::after,
.back-link::after,
.contact-button::after,
.contact-btn::after,
.submit-button::after,
.submit-btn::after,
.all-videos-btn::after,
.plan-cta::after {
  content: "\2192"; /* → */
  display: inline-block;
  transform: translateX(0);
  transition: transform .18s var(--ease-out), opacity .18s var(--ease-out);
  opacity: .8;
}
.cta-button:hover::after,
.back-link:hover::after,
.contact-button:hover::after,
.contact-btn:hover::after,
.submit-button:hover::after,
.submit-btn:hover::after,
.all-videos-btn:hover::after,
.plan-cta:hover::after { transform: translateX(3px); opacity: 1; }

/* Active/tap state for buttons */
.cta-button:active,
.back-link:active,
.contact-button:active,
.contact-btn:active,
.submit-button:active,
.submit-btn:active,
.all-videos-btn:active,
.plan-cta:active { transform: translateY(0) scale(0.98); }

/* LINE button: use green outline style */
.line-btn {
  background: transparent !important;
  color: #00B900 !important;
  border: 1.5px solid #00B900 !important;
  border-radius: 12px !important;
}
.line-btn:hover { background: rgba(0,185,0,0.06) !important; box-shadow: none !important; }

/* Tags/Chips: outlined, lighter tone */
.feature-tag,
.feature-item,
.price-tag,
.status-tag,
.scope-tag,
.type-tag {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
  font-weight: 500 !important;
}

.duration-tag,
.description-tag,
.contact-tag {
  background: #f9fafb !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
}

/* Forms (where present) */
input, textarea, select {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* Form containers and service details: reduce heavy blur and fills */
.form-container,
.service-detail {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: none !important;
  border-radius: 16px !important;
}

/* Neutral contact section blocks */
.contact-section {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
}

/* Content paragraphs keep solid readable color */
p, li, label, small { color: var(--text) !important; }

/* Links: simple underline with subtle color */
main a:not(.cta-button):not(.back-link),
.content a {
  color: var(--primary-blue) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  transition: color .2s ease, text-underline-offset .2s var(--ease-out);
}
main a:hover:not(.cta-button):not(.back-link),
.content a:hover {
  color: #1d4ed8 !important;
  text-underline-offset: 5px;
}

/* Footer (if any appear inside pages) */
footer {
  background: #fff !important;
  border-top: 1px solid var(--border) !important;
}

/* Logo image sizing */
.logo { display: flex; align-items: center; }
.logo a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
/* Keep logo within header height on all devices */
.logo img {
  /* Restore original visual balance: logo slightly larger than header baseline */
  height: calc(var(--header-height) + 8px);
  width: auto;
  display: block;
  object-fit: contain;
}
/* Enlarge header baseline on mobile so the logo doesn't look cramped */
@media (max-width: 768px) { :root { --header-height: 80px; } }
@media (max-width: 480px) { :root { --header-height: 76px; } }

/* Pricing: unify to white cards with gradient accents */
.pricing-section {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.pricing-title {
  color: var(--text) !important;
}

.pricing-card,
.pricing-table {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text) !important;
}

/* Hero logo: use original wide logotype, avoid upscaling blur */
.hero-logo img {
  max-width: 820px;
  width: min(92%, 820px);
  height: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  /* Reduce large headings a bit */
  .section-title { font-size: 1.9rem !important; }
  .service-card-large { padding: 2rem !important; }
  .space-card { padding: 2rem !important; }
  /* Ensure service grids stack safely */
  .service-grid-large { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  /* Keep absolutely-positioned credits inside cards */
  .ai-credit { right: 8px !important; bottom: 8px !important; }
  /* Keep full width on very small screens as well */
  .hero-logo img { max-width: 100%; }
}

/* Center single or narrow cards within their sections */
.service-grid-large,
.service-grid-single,
.space-card-container { justify-content: center !important; }

/* Make individual cards center with automatic side margins */
.service-card-large,
.space-card { margin-left: auto !important; margin-right: auto !important; }

/* When grids leave extra space, keep items centered */
.service-grid-large { justify-items: center; }
.service-grid-large > * { width: 100%; }

.pricing-details { color: var(--muted) !important; }

.price {
  color: var(--text) !important;
}

.pricing-row { border-bottom: 1px solid var(--border) !important; }

.plan-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  background: transparent !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border) !important;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease;
}

.plan-cta:hover { transform: translateY(-1px); background: #f6f8fb; }

.plan-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: #f9fafb !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
}

/* Subtle pulse for primary calls-to-action to draw attention */
.cta-button,.contact-button,.contact-btn,.all-videos-btn {
  animation: ctaPulse 4.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.0); }
  50%      { box-shadow: 0 0 0 6px rgba(37,99,235,0.06); }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
