/* ============================================================
   社長の保健室 — HTML/CSS reproduction of the v0 design
   Original: Next.js + Tailwind v4 + shadcn/ui
   ============================================================ */

:root {
  /* design tokens (from globals.css) */
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --accent: oklch(0.577 0.245 27.325); /* vivid red */
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);

  /* tailwind slate scale */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-500: #ef4444;

  /* medical light-blue (sky) scale */
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  /* shadows (tailwind v4) */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
  font-weight: 400;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  background: #fff;
}

.accent {
  color: var(--accent);
}

.accent-blue {
  color: var(--sky-700);
  font-weight: 600;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--background);
}

.hero__frame {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  border: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--background);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  min-height: 85vh;
}

/* left content */
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  order: 2;
}

.hero__lead-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero__lead {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--foreground);
}

.accent {
  font-weight: 600;
}

.br-sm {
  display: none;
}

.hero__infobox-wrap {
  margin-top: 2rem;
}

.infobox {
  border: 2px solid var(--foreground);
  border-radius: 8px;
  padding: 1rem;
}

.infobox__title {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.infobox__body {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.infobox__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--foreground);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon--cross {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
}

.infobox__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.infobox__list p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check {
  font-weight: 400;
}

.infobox__map {
  margin-top: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.infobox__map iframe {
  display: block;
  width: 100%;
  height: 200px;
  border: 0;
}

/* Lenisのスムーズスクロール中もマップを操作できるようにする */
.lenis.lenis-smooth .infobox__map iframe {
  pointer-events: auto;
}

.infobox__cta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn-ghost:hover {
  color: var(--accent);
}

/* right vertical title */
.hero__title-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  order: 1;
}

.hero__title {
  display: flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
  font-size: 3rem;
  line-height: 1;
}

.hero__title-small {
  font-size: 0.6em;
  align-self: center;
  margin: 0 0.25rem;
}

.hero__title-tilt {
  display: inline-block;
  font-size: 1.3em; /* 「保」だけ少し大きく */
  transform: rotate(-8deg);
  transform-origin: center;
  will-change: transform;
}

/* ============================================================
   EMPATHY MESSAGE BAND
   ============================================================ */
.message-band {
  background: linear-gradient(180deg, #eef8fd 0%, #d6ecfa 100%);
  color: var(--slate-900);
  padding: 3rem 1rem;
  text-align: center;
}

.message-band__container {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.message-band__stetho {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--sky-700);
  margin-bottom: 0.5rem;
}

.message-band__sub {
  font-size: 1rem;
  color: var(--slate-600);
}

.message-band__main {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--slate-900);
}

.message-band__cta {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* ============================================================
   PAIN POINTS
   ============================================================ */
.pain {
  padding: 4rem 1rem;
  background: var(--sky-50);
}

.pain__container {
  max-width: 56rem;
  margin: 0 auto;
}

/* 診察券風カード */
.shindansho {
  max-width: 44rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--sky-200);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.shindansho__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, var(--sky-100), #cdeafb);
  border-bottom: 2px dashed var(--sky-300);
}

.shindansho__cross {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
}

.shindansho__brand {
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: 0.06em;
}

.shindansho__label {
  margin-left: auto;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--sky-700);
  border: 1px solid var(--sky-600);
  border-radius: 4px;
  padding: 0.15rem 0.35rem 0.15rem 0.6rem;
  white-space: nowrap;
}

.shindansho__body {
  padding: 1.5rem 1.25rem;
}

.pain__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pain__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
}

.pain__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pain-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--slate-900);
}

.pain-card .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.pain__note {
  margin-top: 2rem;
  text-align: center;
  font-size: 1rem;
  color: var(--slate-600);
}

@media (min-width: 768px) {
  .message-band {
    padding: 4rem 1rem;
  }
  .message-band__sub {
    font-size: 1.125rem;
  }
  .message-band__main {
    font-size: 1.875rem;
  }
  .message-band__cta {
    font-size: 2.25rem;
  }
  .message-band__stetho {
    width: 4rem;
    height: 4rem;
  }
  .pain {
    padding: 5rem 1rem;
  }
  .shindansho__body {
    padding: 2rem 1.75rem;
  }
  .pain__title {
    font-size: 1.875rem;
  }
  .pain__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .pain-card {
    font-size: 1.125rem;
    padding: 1.25rem 1.5rem;
  }
  .pain__note {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .pain__title {
    font-size: 2.25rem;
  }
}

/* ============================================================
   CONCEPT
   ============================================================ */
.concept {
  padding: 4rem 1rem;
  background: var(--slate-50);
}

.concept__container {
  max-width: 64rem;
  margin: 0 auto;
}

.concept__header {
  text-align: center;
  margin-bottom: 3rem;
}

.concept__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.concept__subtitle {
  font-size: 1rem;
  color: var(--slate-600);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.625;
}

.concept__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.concept-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 0;
  transition: box-shadow 0.3s ease;
}

.concept-card:hover {
  box-shadow: var(--shadow-md);
}

.concept-card__content {
  padding: 1.5rem;
  text-align: center;
}

.concept-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--slate-100);
  margin-bottom: 1.5rem;
  color: var(--slate-700);
}

.concept-icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.concept-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.concept-card__desc {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.625;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.disclaimer {
  padding: 2rem 1rem;
  background: #fff;
}

.disclaimer__container {
  max-width: 56rem;
  margin: 0 auto;
}

.disclaimer__text {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.625;
  text-align: center;
}

/* ============================================================
   APPLICATION FORM
   ============================================================ */
.form-section {
  padding: 4rem 1rem;
  background: var(--slate-50);
}

.form-section__container {
  max-width: 42rem;
  margin: 0 auto;
}

.form-section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-section__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.form-section__subtitle {
  font-size: 1rem;
  color: var(--slate-600);
}

.form-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-card__header {
  padding: 0 1.5rem;
}

.form-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-900);
  line-height: 1;
}

.form-card__content {
  padding: 0 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}

.req {
  color: var(--red-500);
}

input[type="text"],
input[type="tel"],
input[type="email"],
.select,
textarea {
  width: 100%;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

input[type="text"],
input[type="tel"],
input[type="email"],
.select {
  height: 2.25rem;
  padding: 0.25rem 0.75rem;
}

textarea {
  min-height: 120px;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-foreground);
}

input:focus-visible,
.select:focus-visible,
textarea:focus-visible {
  border-color: var(--slate-500);
  box-shadow: 0 0 0 3px rgb(100 116 139 / 0.25);
}

/* native select with chevron */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1rem 1rem;
  cursor: pointer;
}

.select:required:invalid {
  color: var(--muted-foreground);
}

.form-agreements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

.cancellation-box {
  padding: 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}

.cancellation-box__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.icon--alert {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--slate-600);
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.cancellation-box__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}

.cancellation-box__text {
  font-size: 0.875rem;
  color: var(--slate-600);
  margin-bottom: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-row label {
  font-size: 0.875rem;
  color: var(--slate-700);
  cursor: pointer;
}

/* custom checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--slate-300);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

input[type="checkbox"]:checked {
  background: var(--slate-900);
  border-color: var(--slate-900);
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e") no-repeat center / contain;
  mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e") no-repeat center / contain;
}

input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgb(100 116 139 / 0.25);
}

.privacy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.privacy__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}

.privacy__scroll {
  max-height: 16rem;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-50);
}

.privacy__text {
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--slate-600);
  white-space: pre-wrap;
  line-height: 1.625;
}

.submit-btn {
  width: 100%;
  padding: 1.5rem;
  background: var(--slate-900);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.submit-btn:hover {
  background: var(--slate-800);
}

/* enable submit only when all required fields are valid (pure CSS) */
.submit-btn {
  opacity: 0.5;
  pointer-events: none;
}

form:has(#companyName:valid):has(#name:valid):has(#phone:valid):has(#email:valid):has(#participationDate:valid):has(#cancellationPolicy:checked):has(#privacyPolicy:checked) .submit-btn {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   FORM: honeypot / status / success
   ============================================================ */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  min-height: 1.25rem;
}

.form-status.is-error {
  color: var(--accent);
}

.form-status.is-sending {
  color: var(--slate-600);
}

.submit-btn.is-sending {
  opacity: 0.7;
  pointer-events: none;
}

.form-success {
  text-align: center;
  padding: 2rem 1rem;
}

.form-success__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background: var(--sky-100);
  color: var(--sky-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.form-success__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.form-success__text {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.7;
}

/* ============================================================
   SCROLL ANIMATION（reveal + parallax）※JS有効時のみ作動
   ============================================================ */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js-anim [data-parallax] {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal,
  .js-anim .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2rem 1rem;
  background: #fff;
  border-top: 1px solid var(--slate-200);
}

.footer__container {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.footer__text {
  font-size: 0.875rem;
  color: var(--slate-500);
}

/* ============================================================
   RESPONSIVE — sm (640px)
   ============================================================ */
@media (min-width: 640px) {
  .br-sm {
    display: block;
  }
  .hero__title {
    font-size: 3.75rem;
  }
}

/* ============================================================
   RESPONSIVE — md (768px)
   ============================================================ */
@media (min-width: 768px) {
  .hero {
    padding: 2rem;
  }
  .hero__inner {
    flex-direction: row;
    min-height: 80vh;
  }
  .hero__content {
    padding: 2.5rem;
    order: 1;
  }
  .hero__lead {
    font-size: 1.125rem;
  }
  .infobox {
    padding: 1.5rem;
  }
  .infobox__title {
    font-size: 1rem;
  }
  .infobox__icon {
    width: 3.5rem;
    height: 3.5rem;
  }
  .icon--cross {
    width: 2rem;
    height: 2rem;
  }
  .infobox__list {
    font-size: 1rem;
  }
  .hero__title-area {
    width: auto;
    padding: 2.5rem;
    order: 2;
  }
  .hero__title {
    flex-direction: column;
    font-size: 4.5rem;
  }
  .hero__title-small {
    font-size: 0.5em;
    margin: 0.5rem 0;
  }

  .concept {
    padding: 6rem 1rem;
  }
  .concept__header {
    margin-bottom: 4rem;
  }
  .concept__title {
    font-size: 1.875rem;
  }
  .concept__subtitle {
    font-size: 1.125rem;
  }
  .concept__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .concept-card__content {
    padding: 2rem;
  }
  .concept-card__title {
    font-size: 1.25rem;
  }
  .concept-card__desc {
    font-size: 1rem;
  }

  .disclaimer__text {
    font-size: 0.875rem;
  }

  .form-section {
    padding: 6rem 1rem;
  }
  .form-section__title {
    font-size: 1.875rem;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  .select,
  textarea {
    font-size: 0.875rem;
  }

  .submit-btn {
    font-size: 1.125rem;
  }
}

/* ============================================================
   RESPONSIVE — lg (1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .hero__title {
    font-size: 6rem;
  }
  .concept__title {
    font-size: 2.25rem;
  }
  .form-section__title {
    font-size: 2.25rem;
  }
}
