/* ========================================
   MEDICALS, Inc. - Corporate Site
   ======================================== */

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

:root {
  --black: #1a1a1a;
  --dark: #222222;
  --gray-800: #333333;
  --gray-700: #444444;
  --gray-600: #666666;
  --gray-500: #888888;
  --gray-400: #aaaaaa;
  --gray-300: #cccccc;
  --gray-200: #dddddd;
  --gray-100: #eeeeee;
  --gray-50: #f5f5f5;
  --white: #ffffff;
  --bg: #f0f0f0;
  --font-en: 'Inter', sans-serif;
  --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --header-height: 72px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ja);
  color: var(--black);
  background: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

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

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--black);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg);
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin-bottom: 56px;
}

.hero-title span {
  display: block;
}

.hero-mission {
  position: relative;
}

.hero-mission-label {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-mission-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: 0.06em;
}

.hero-bg-mark {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 55%;
  max-width: 700px;
  opacity: 0.06;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-logo {
  width: 100%;
  height: auto;
}

/* --- Section Common --- */
.section {
  padding: 120px 0;
}

.section-header {
  margin-bottom: 56px;
}

.section-en {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.02em;
}

.section-cta {
  text-align: center;
  margin-top: 56px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 14px 48px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.06em;
}

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

.btn--outline:hover {
  background: var(--black);
  color: var(--white);
  opacity: 1;
}

.btn--dark {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}

.btn--dark:hover {
  background: transparent;
  color: var(--black);
  opacity: 1;
}

/* --- About --- */
.section--about {
  background: var(--white);
  padding: 100px 0 120px;
}

.about-body {
  max-width: 780px;
  margin: 0 auto;
}

.about-text {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 2.2;
  margin-bottom: 24px;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* --- Service --- */
.section--service {
  background: var(--gray-50);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.service-card-inner {
  padding: 56px 40px;
}

.service-card-name {
  font-family: var(--font-en);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.service-card-desc {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.8;
}

/* --- Recruit --- */
.section--recruit {
  background: var(--gray-50);
}

.recruit-content {
  max-width: 780px;
}

.recruit-heading {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.recruit-lead {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.7;
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}

.recruit-body {
  margin-bottom: 40px;
}

.recruit-body p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 2;
  margin-bottom: 16px;
}

.recruit-body p:last-child {
  margin-bottom: 0;
}

/* --- Company --- */
.section--company {
  background: var(--white);
}

.company-table-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table tr {
  border-bottom: 1px solid var(--gray-200);
}

.company-table tr:first-child {
  border-top: 1px solid var(--gray-200);
}

.company-table th,
.company-table td {
  padding: 24px 0;
  font-size: 0.9375rem;
  line-height: 1.9;
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 180px;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  padding-right: 40px;
}

.company-table td {
  color: var(--gray-700);
}

.company-note {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* --- Contact --- */
.section--contact {
  background: var(--gray-50);
  padding: 100px 0;
}

.contact-inner {
  text-align: center;
}

.contact-title {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.contact-text {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin-bottom: 40px;
}

.contact-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  padding: 16px 36px;
}

.btn-icon {
  flex-shrink: 0;
}

.btn--outline-dark {
  border: 1px solid var(--black);
  color: var(--black);
  background: transparent;
}

.btn--outline-dark:hover {
  background: var(--black);
  color: var(--white);
  opacity: 1;
}

.btn--outline-dark:hover .btn-icon {
  stroke: var(--white);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 56px 0 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-top {
  margin-bottom: 40px;
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-nav-list a {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.footer-nav-list a:hover {
  color: var(--white);
  opacity: 1;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--gray-500);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gray-300);
  opacity: 1;
}

.footer-copy {
  font-family: var(--font-en);
  font-size: 0.6875rem;
  color: var(--gray-500);
  letter-spacing: 0.03em;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s var(--ease-out-expo) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.5s var(--ease-out-expo);
    z-index: 1000;
  }

  .nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 32px;
  }

  .nav-link {
    font-size: 1.125rem;
  }

  .container {
    padding: 0 24px;
  }

  .header-inner {
    padding: 0 24px;
  }

  .hero-inner {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-bg-mark {
    width: 80%;
    right: -20%;
    opacity: 0.04;
  }

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

  .recruit-lead {
    font-size: 1.25rem;
  }

  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 0;
  }

  .company-table th {
    padding-top: 20px;
    padding-bottom: 4px;
    padding-right: 0;
  }

  .company-table td {
    padding-bottom: 20px;
  }

  .footer-top {
    margin-bottom: 32px;
  }

  .footer-nav-list {
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-bottom {
    flex-direction: column-reverse;
    gap: 16px;
    align-items: flex-start;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-buttons .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .footer-inner {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 60px;
  }

  .logo-img {
    height: 20px;
  }

  .section {
    padding: 64px 0;
  }

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

  .hero {
    min-height: 85vh;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 40px;
  }

  .hero-mission-text {
    font-size: 1.0625rem;
  }

  .hero-bg-mark {
    width: 100%;
    right: -30%;
    opacity: 0.03;
  }

  .service-card-inner {
    padding: 36px 24px;
  }

  .service-card-name {
    font-size: 1.375rem;
  }
}
