/*
Theme Name: Likha Lab.
*/

/* =========================
   00. Tokens
   ========================= */
:root {
  --bg: #f4f1e8;
  --text: #222;
  --accent: #943936;
  --container: 1140px;
  --gutter: 24px;
}
* {
  /* outline: 1px solid blue; */
}
/* =========================
   01. Base / Reset
   ========================= */
html {
  box-sizing: border-box;
  background: var(--bg);
  position: relative;
}
html::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(./img/graphy.png);
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  /* background: var(--bg); */
  color: var(--text);
  line-height: 1.75;
  padding-top: 80px; /* fixed header分 */
  position: relative;
}
img {
  display: block;
  width: 100%;
}

li {
  list-style: none;
}

a {
  color: var(--text);
  text-decoration: none;
}

/* =========================
   10. Layout
   ========================= */
/* 固定幅をやめる：PCは1140px、スマホは画面にフィット */
.container,
.inner {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

/* セクション間の余白ルール（提出用の最低限） */
.services,
.flow,
.samples,
.prices,
.cta {
  padding-block: clamp(2.5rem, 4vw, 4rem);
}

/* 見出しの余白とサイズをブレさせない */
h3 {
  text-align: center;
  margin: 20px auto 30px;
  font-size: clamp(24px, 2.2vw, 32px);
  position: relative;
}
.eyebrow {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin: 0 0 10px;
}

/* =========================
   20. Components - Header
   ========================= */
header.wrapper {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: var(--bg);
}

.site-title img {
  display: flex;
  width: 180px;
}

header h1 {
  margin-inline: 5px;
}

header nav {
  margin: 5px;
}
header .global-nav {
  align-items: center;
  display: flex;
}
header .global-nav li {
  padding-left: 10px;
}

/* =========================
   20. Components - Buttons
   ========================= */
/* From Uiverse.io by SujitAdroja */
.btn {
  color: var(--accent);
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--accent);
  padding: 10px 20px;
  font-size: 17px;
  cursor: pointer;
  font-weight: bold;
  background: transparent;
  position: relative;
  transition: all 1s;
  overflow: hidden;
  display: inline-block; /* aタグのinline問題を潰す */
  position: relative;
  isolation: isolate;
}

.btn:hover {
  color: white;
}

.btn::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 0%;
  top: 0;
  left: -40px;
  transform: skewX(45deg);
  background-color: var(--accent);
  z-index: -1;
  transition: all 1s;
}

.btn:hover::before {
  width: 160%;
}

/* .btn:active {
  transform: translateY(0);
  opacity: 0.92;
} */

/* .btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(34, 34, 34, 0.25);
} */
@media (max-width: 768px) {
  .btn {
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }
}
/* =========================
   30. Sections - Hero
   ========================= */
.hero {
  background-image: url("./img/hero_bg1.png");
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 70vh;
  display: grid;
  align-items: center;
  transition: 2s ease-in-out;
  z-index: 1;
}
.hero:hover {
  background-image: url("./img/hero_bg2.png");
  background-size: cover;
  background-position: center;
  cursor: crosshair;
}

/* 背景が明るい/暗いで文字が死ぬのを防ぐ */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(245, 241, 232, 0.88) 0%,
    rgba(245, 241, 232, 0.65) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.hero-sub {
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.hero .inner {
  position: relative;
  padding: 72px 0;
  max-width: 720px;
}

.hero .inner h2 {
  margin: 0 0 14px;
  color: var(--text);
  text-shadow: none;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.2;
}

.hero .inner p {
  margin: 0 0 22px;
  color: rgba(34, 34, 34, 0.9);
  text-shadow: none;
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions .link {
  color: rgba(34, 34, 34, 0.85);
  text-shadow: none;
  font-weight: 600;
}

/* =========================
   30. Sections - Services
   ========================= */
.services {
  text-align: center;
  max-width: var(--container);
}

.services p {
  margin-bottom: 30px;
}

.services .cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.services article {
  width: 100%;
  position: relative;
}

.services article img {
  border-radius: 25px;
}

.services article p:first-of-type {
  position: absolute;
  top: 5%;
  left: 5%;
  background: rgba(220, 220, 220, 0.9);
  box-shadow: 0px 0px 25px 5px rgba(220, 220, 220, 1);
  color: var(--bg);
  border-radius: 5px;
  padding-inline: 2px;
}

.services article p:last-of-type {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  background-color: rgba(220, 220, 220, 0.9);
  box-shadow: 0px 0px 25px 25px rgba(220, 220, 220, 1);
}
/* =========================
   SERVICES - Readability
   ========================= */
@media (max-width: 768px) {
  .services article p:first-of-type {
    font-weight: 700;
    font-size: 14px;
  }

  .services article p:last-of-type {
    font-size: 13px;
    line-height: 1.6;
  }
}

/* =========================
   30. Sections - Flow
   ========================= */
.flow-wrapper {
  background: #f5f3ef;
  cursor: crosshair;
}
.flow li {
  display: flex;
  align-items: center;
  padding-block: 2rem;
}

.flow li img {
  width: 330px;
  max-width: 100%;
}

.flow li .text {
  margin-left: 80px;
}

.flow li .text .step-num {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  width: 50px;
  font-size: 24px;
  background: var(--accent);
  border-radius: 10px;
  border: 3px solid #2a4b7c;
  margin-right: 20px;
}

.flow li .text h4 {
  font-size: 24px;
  margin-bottom: 20px;
}

.flow li .text h5 {
  font-size: 20px;
  margin-bottom: 20px;
}
/* =========================
   FLOW - Text Lightening
   ========================= */
@media (max-width: 768px) {
  .flow li .text p {
    max-width: 42ch; /* 行を短くする */
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.85;
  }
  .flow li .text h4 {
    gap: 12px;
  }

  .flow li .text .step-num {
    flex-shrink: 0;
  }
}
/* =========================
   FLOW - Mobile Fix
   ========================= */
@media (max-width: 768px) {
  .flow li {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .flow li img {
    width: 100%;
    max-width: 100%;
  }

  .flow li .text {
    margin: 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .flow li .text h4 {
    display: flex;
    align-items: center;
    font-size: 20px;
  }

  .flow li .text h5 {
    font-size: 16px;
    line-height: 1.6;
  }

  .flow li .text p {
    font-size: 14px;
    line-height: 1.7;
  }
}
/* =========================
   Samples - Productized
   ========================= */
#samples .samples {
  margin: 0 auto;
  /* width: 100%; */
}
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.sample {
  background: rgba(220, 220, 220, 0.55);
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 24px;
  overflow: hidden;
}

.sample-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: crosshair;
}

.sample-fig img {
  height: 240px;
  object-fit: cover;
}

.sample-cap {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
}

.sample-tag {
  display: inline-flex;
  width: max-content;
  background: rgba(244, 241, 232, 0.95);
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.sample-ttl {
  font-weight: 800;
  line-height: 1.35;
}

.sample-sub {
  font-size: 12px;
  opacity: 0.8;
}

.sample-btn:focus-visible {
  outline: 3px solid rgba(148, 57, 54, 0.6);
  outline-offset: 4px;
  border-radius: 24px;
}

/* hover: うるさくしない。少しだけ浮かせる */
.sample:hover {
  transform: translateY(-2px);
  transition: transform 0.18s ease;
}

/* Dialog (Lightbox) */
.sample-dialog {
  width: min(1100px, calc(100% - 32px));
  border: none;
  border-radius: 20px;
  padding: 18px 18px 22px;
  margin: 1rem auto 1rem;
  background: var(--bg);
}

.sample-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(34, 34, 34, 0.18);
  background: rgba(244, 241, 232, 0.95);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dialog-head {
  padding: 10px 8px 14px;
}

.dialog-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
}

.dialog-desc {
  margin: 0;
  opacity: 0.85;
  line-height: 1.7;
}
.dialog-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.65);
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 12px;
  background: rgba(244, 241, 232, 0.7);
}
.dialog-body {
  display: grid;
  gap: 16px;
}

.dialog-main img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(34, 34, 34, 0.12);
}

.dialog-crops {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.crop {
  background: rgba(220, 220, 220, 0.45);
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: 14px;
  padding: 10px;
}

.crop-label {
  margin: 0 0 8px;
  font-size: 12px;
  opacity: 0.85;
}

.crop img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(34, 34, 34, 0.12);
}

/* Responsive */
@media (max-width: 900px) {
  .sample-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
  .sample-fig img {
    height: 220px;
  }
  .dialog-crops {
    grid-template-columns: 1fr;
  }
}

/* =========================
30. Sections - Prices
========================= */
.prices dl {
  background: #dededd;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 30px;
}

.prices dt {
  width: 70%;
  text-align: left;
  padding-bottom: 10px;
}

.prices dd {
  width: 30%;
  text-align: right;
  padding-bottom: 10px;
}

.prices dt:last-of-type,
.prices dd:last-of-type {
  padding-bottom: 0;
}

/* =========================
30. Sections - CTA
========================= */
.cta {
  text-align: center;
}

.cta p {
  margin-bottom: 30px;
}

/* =========================
40. Footer
========================= */
.site-footer {
  background: #f5f3ef;
  padding: 60px 0 40px;
}

.footer-inner {
  width: min(var(--container), 100% - 48px);
  margin: 0 auto;
  text-align: center;
}

.footer-brand img {
  width: 120px;
  margin: 0 auto 16px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.8;
  margin-bottom: 32px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
  font-size: 14px;
  opacity: 0.9;
}

.footer-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 34, 34, 0.12);
  background: rgba(244, 241, 232, 0.6);
}

.footer-nav a:hover {
  border-color: rgba(34, 34, 34, 0.28);
}
.footer-copy {
  font-size: 12px;
  opacity: 0.6;
}

/* =========================
50. Page (page.php etc)
========================= */
.page-id-13 .wp-block-cover {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.page-title {
  display: none;
  /* font-size: 32px;
  font-weight: 600; */
}

.page-content {
  padding-bottom: 120px;
}

.page-content p,
.page-content li {
  line-height: 1.8;
  margin-bottom: 1em;
}

.about-text {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;

  outline: 1px solid blue;
  object-fit: cover;
}

/* =========================
50. Contact Page
========================= */

/* =========================
   Contact Form 7 (Likha Lab.)
   ========================= */

.wpcf7 {
  max-width: 720px;
  margin-top: 24px;
}

.wpcf7 form p {
  margin: 0 0 16px;
}

.wpcf7 label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

/* inputs */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(34, 34, 34, 0.25);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.wpcf7 textarea {
  min-height: 180px;
  resize: vertical;
}

.wpcf7 input[type="file"] {
  width: 100%;
}

/* focus */
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(148, 57, 54, 0.12);
}

/* checkbox layout */
.wpcf7 .wpcf7-form-control.wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 8px;
}

.wpcf7 .wpcf7-checkbox .wpcf7-list-item {
  margin: 0;
}

.wpcf7 .wpcf7-checkbox .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin: 0;
}

/* submit button */
.wpcf7 input[type="submit"] {
  display: inline-block;
  width: auto;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.wpcf7 input[type="submit"]:hover {
  opacity: 0.92;
}

/* response messages */
.wpcf7 .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
}

.wpcf7 .wpcf7-not-valid-tip {
  font-size: 13px;
  margin-top: 6px;
}

/* =========================
   Service Page (page-services.php)
   ========================= */

.page-services .inner {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  max-width: 720px;
  margin-inline: auto;
}

.page-services .page-hero {
  background-image: url("./img/page-services_bg1.png");
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
  min-height: 70vh;
  display: grid;
  align-items: center;
  padding: 64px 0 28px;
  z-index: 1;
  transition: 2s ease-in-out;
}
.page-services .page-hero:hover {
  background-image: url("./img/page-services_bg2.png");
  background-size: cover;
  background-position: center;
  cursor: crosshair;
}
.page-services .page-hero > .inner {
  position: relative;
  z-index: 1;
}
.page-services .page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(244, 241, 232, 0.9) 0%,
    rgba(244, 241, 232, 0) 20%,
    rgba(244, 241, 232, 0) 80%,
    rgba(244, 241, 232, 0.9) 100%
  );
}
/* 背景が明るい/暗いで文字が死ぬのを防ぐ */
.page-services .page-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(245, 241, 232, 0.88) 0%,
    rgba(245, 241, 232, 0.65) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.page-services .title {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  margin: 0 0 12px;
}

.page-services .lead {
  font-size: 16px;
  line-height: 1.9;
  opacity: 0.9;
  margin: 0 0 18px;
}

.page-services .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

/* Sections */
.page-services .sec-title {
  font-size: 22px;
  margin: 0 0 10px;
  text-align: center;
}

.page-services .h3 {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 22px;
  opacity: 0.9;
  line-height: 1.8;
  font-size: clamp(24px, 2.2vw, 32px);
}

/* Grid */
.page-services .svc-list {
  padding: 36px 0 20px;
}
.page-services .svc-list .sec-lead {
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}

.page-services .svc-list > .inner {
  max-width: 1200px; /* 1080〜1200で好み */
}

.page-services .svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px; /* 好みで 900〜1040 くらい */
  margin-inline: auto;
}

.page-services .svc-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(./img/groovepaper.png);
  background-repeat: repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.page-services .svc-card {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: auto;
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: 18px;
  padding: 18px 16px;
}
.page-services .first {
  background-image: url(./img/svc-scaffold1.jpg);
}
.page-services .second {
  background-image: url(./img/svc-crane1.jpg);
}
.page-services .third {
  background-image: url(./img/svc-installment1.jpg);
}

.page-services .svc-name {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.page-services .svc-text {
  margin: 0 0 12px;
  line-height: 1.7;
  opacity: 0.9;
}

.page-services .svc-points {
  padding-left: 1.2em;
  margin: 0 0 14px;
}

.page-services .svc-points li {
  margin: 6px 0;
  line-height: 1.6;
}

.page-services .svc-meta {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  opacity: 0.9;
}

.page-services .svc-card--highlight {
  background: rgba(148, 57, 54, 0.1);
  border-color: rgba(148, 57, 54, 0.35);
}

.page-services .svc-card--highlight .btn {
  margin-top: 6px;
  width: 100%;
}

/* CTA box */
.page-services .svc-cta {
  padding: 36px 0 72px;
}

.page-services .svc-cta-box {
  background: rgba(220, 220, 220, 0.55);
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.page-services .svc-cta-text h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.page-services .svc-cta-text p {
  margin: 0;
  line-height: 1.8;
  opacity: 0.9;
}

.page-services .svc-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .page-services .svc-grid {
    max-width: 620px;
  }
}

@media (max-width: 768px) {
  .page-services .actions .btn,
  .page-services .svc-cta-actions .btn {
    width: 100%;
  }
}
/* =========================
80. Responsive
========================= */
@media (max-width: 900px) {
  header.wrapper {
    padding: 5px 12px;
  }
  .services .cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
  .samples .cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
  .sample-media img {
    height: 200px;
  }
  .prices dl dt,
  .prices dl dd {
    width: 50%;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 72px;
  }

  .services,
  .samples,
  .prices,
  .cta {
    padding: 28px 0;
  }

  .hero {
    min-height: 62vh;
  }

  .hero .inner {
    padding: 48px 0;
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .link {
    text-align: center;
  }

  .btn {
    width: 100%;
  }
}

/* =========================
   90. Utilities / Overrides - Footer logo emergency fix
   ========================= */
.page-service .svc-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px;
}

/* =========================
   95.Fade effect 
========================= */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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