/*
Theme Name: Saunterer Base Theme
Version: 1.0
*/

/* =========================
   Front
========================= */
.sa-front {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.sa-front__inner {
  width: min(900px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Logo */
.sa-front__mark {
  margin-bottom: clamp(50px, 10vh, 100px);
}

.sa-front__markImg {
  width: min(580px, 78vw);
  height: auto;
  display: block;
}

/* Statement images (shape.png + vii.png) */
.sa-front__statementImgWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.sa-front__statementImg {
  width: min(540px, 82vw);
  height: auto;
  display: block;
}

/* Contact trigger button */
.sa-front__contactBtn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.sa-front__contactImg {
  width: min(280px, 46vw);
  height: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 160ms ease;
}

.sa-front__contactBtn:hover .sa-front__contactImg,
.sa-front__contactBtn:focus-visible .sa-front__contactImg {
  opacity: 1;
}

.sa-front__contactBtn:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 8px;
}

/* Thanks message (optional) */
.sa-front__thanks {
  margin-top: 12px;
  font-size: 15px;
  letter-spacing: 0.04em;
  opacity: 0.6;
  font-weight: 700;
}

/* Visually hidden (SEO/accessibility) */
.sa-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   Modal
========================= */
.sa-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9999;

  /* open/close */
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;

  /* スマホの余白（安全領域） */
  padding: max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.sa-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.sa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: #ffffffad;
}

.sa-modal__panel {
  position: relative;
  width: min(860px, 100%); /* PCは少し広めに */
  max-height: 100%;
  overflow: auto;

  background: #fff;
  border-radius: 18px;
  padding: clamp(18px, 3vw, 32px); /* 余白を増やす */
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);

  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.sa-modal.is-open .sa-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.sa-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sa-modal__title {
  font-size: 16px;
  letter-spacing: 0.08em;
  margin: 0;
}

.sa-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.sa-modal__close:hover {
  background: rgba(0, 0, 0, 0.03);
}

.sa-modal__close:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

/* =========================
   Form
========================= */
.sa-form {
  margin-top: 10px;
}

.sa-field {
  margin: 14px 0;
  text-align: left;
}

.sa-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.sa-input,
.sa-textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
}

.sa-input:focus,
.sa-textarea:focus {
  border-color: rgba(0, 0, 0, 0.45);
}

.sa-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.sa-btn {
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  letter-spacing: 0.08em;
}

.sa-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.sa-note {
  margin: 12px 0 0;
  font-size: 12px;
  opacity: 0.7;
}

/* Honeypot hidden */
.sa-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
/* Thankspage */
.page-thanks .l-content,
.page-thanks #main {
  min-height: calc(100vh - 0px);
  display: grid;
  place-items: center;
}

.page-thanks .entry-content {
  text-align: center;
}
/* ===== Subtle focus reveal (slower) ===== */
.sa-reveal {
  opacity: 0.18; /* ← 最初からうっすら見せる */
  filter: blur(10px);
  animation: saSoftReveal 2800ms cubic-bezier(0.12, 1, 0.22, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: opacity, filter;
}

@keyframes saSoftReveal {
  /* しばらく“ほぼ変わらない時間”を作る */
  0% {
    opacity: 0.18;
    filter: blur(10px);
  }
  50% {
    opacity: 0.22;
    filter: blur(9px);
  }
  75% {
    opacity: 0.55;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-reveal {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-reveal {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

/* 動きを苦手な人向け */
@media (prefers-reduced-motion: reduce) {
  .sa-reveal {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

@media (max-width: 600px) {
  .sa-front__markImg {
    width: 100%;
  }

  .sa-front__statementImg {
    width: 100%;
    height: auto;
    display: block;
  }

  .sa-modal__panel {
    border-radius: 16px;
    padding: 18px;
  }

  .sa-modal__title {
    font-size: 15px;
  }

  .sa-input,
  .sa-textarea {
    font-size: 16px; /* iOSの自動ズーム防止 */
  }

  .sa-textarea {
    min-height: 140px;
  }
}
