/*
Theme Name: Craftcore
Theme URI: https://craftcore.co.jp
Author: Craftcore Inc.
Description: クラフトコア株式会社コーポレートサイト用カスタムテーマ。
Version: 1.0.0
Requires PHP: 7.4
Text Domain: craftcore
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7f9;
  --color-navy: #061222;
  --color-navy-deep: #04101f;
  --color-navy-panel: #0d1c30;
  --color-accent: #d03721;
  --color-accent-hover: #a82a19;
  --color-accent-soft: #ff8a6b;

  --color-heading: #061222;
  --color-body: #3a4150;
  --color-body-light: #c7ccd6;
  --color-muted: #8a90a0;
  --color-muted-dark: #5b6272;
  --color-meta: #8a8f99;

  --container-width: 1200px;
  --section-padding-y: 80px;
  --section-padding-x: 64px;

  --radius: 4px;
  --font-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;

  --header-height: 90px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: #0b1220;
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

button { font-family: inherit; }

.skip-link,
.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus,
.screen-reader-text:focus {
  left: 0;
  width: auto;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
}

.section { padding: var(--section-padding-y) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--navy { background: var(--color-navy); color: #fff; }

.section-head { text-align: center; margin-bottom: 56px; }
.section-head--split {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 44px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-head .eyebrow { text-align: center; }
.eyebrow--light { color: var(--color-accent-soft); }

.heading {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-heading);
}
.heading--light { color: #fff; }

.lead {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-body);
}
.lead--light { color: var(--color-body-light); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}

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

.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); }
.btn-outline:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }

.btn-sm { padding: 12px 24px; font-size: 14px; }

.btn__icon { width: 18px; filter: brightness(0) invert(1); }

.icon-invert { filter: brightness(0) invert(1); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
}

.site-header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--section-padding-x);
  gap: 24px;
}

.site-header__logo { flex-shrink: 0; display: flex; }
.site-header__logo img { width: 169px; height: 54px; object-fit: contain; }

.site-nav {
  display: flex;
  gap: 36px;
  flex-shrink: 0;
}
.site-nav a {
  color: #e6e9ef;
  font-size: 15px;
  white-space: nowrap;
}
.site-nav a:hover { color: #fff; }

.site-header__cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: var(--color-navy);
  padding: var(--section-padding-y) 0;
  overflow: hidden;
}

.hero__grid {
  display: flex;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.hero__content {
  flex: 1 1 460px;
  min-width: 300px;
  max-width: 640px;
}

.hero__visual {
  flex: 1 1 420px;
  min-width: 280px;
  height: 420px;
  position: relative;
}
.hero__visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__title {
  color: #fff;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 24px;
}

.hero__lead {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-body-light);
  margin: 0 0 40px;
  max-width: 560px;
}

.hero__actions { display: flex; gap: 20px; flex-wrap: wrap; }

/* ==========================================================================
   Business pillars
   ========================================================================== */

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

.pillar-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  border-top: 3px solid var(--color-navy);
}
.pillar-card--accent { border-top-color: var(--color-accent); }

.pillar-card__icon { width: 48px; margin-bottom: 20px; }

.pillar-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-navy);
  line-height: 1.5;
}

.pillar-card__text { font-size: 15px; line-height: 1.9; color: var(--color-body); }

/* ==========================================================================
   Service
   ========================================================================== */

.service__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}
.service-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  padding-bottom: 18px;
  color: #fff;
}
.service-list li a:hover { color: var(--color-body-light); }
.service-list li a span { font-size: 16px; }
.service-list li a img { width: 20px; flex-shrink: 0; }

.service__cta { margin-top: 32px; }

.service__media { position: relative; }
.service__media-main { width: 100%; border-radius: var(--radius); }
.service__media-sub {
  width: 56%;
  border-radius: var(--radius);
  position: absolute;
  bottom: -32px;
  left: -32px;
  border: 6px solid var(--color-navy);
}

/* ==========================================================================
   Message
   ========================================================================== */

.message__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.message__media img { border-radius: var(--radius); }

.message__text .lead { margin: 20px 0 28px; }

.tag-list { display: flex; gap: 14px; flex-wrap: wrap; }
.tag-list li {
  border: 1.5px solid var(--color-navy);
  border-radius: var(--radius);
  padding: 8px 18px;
  font-size: 14px;
  color: var(--color-navy);
}

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.link-arrow { font-size: 15px; font-weight: 700; }

.blog-card { background: #fff; border-radius: var(--radius); overflow: hidden; }
.blog-card__body { padding: 28px; }
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--color-meta);
}
.blog-card__meta img { width: 20px; height: 20px; object-fit: cover; border-radius: 2px; }
.blog-card__title { font-size: 16px; font-weight: 700; color: var(--color-heading); line-height: 1.6; }
.blog-card__title a { color: inherit; }
.blog-card__title a:hover { color: var(--color-accent); }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact__inner { max-width: 760px; text-align: center; }
.contact__inner .lead { margin: 16px 0 44px; }

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.contact-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.contact-method img { width: 36px; }
.contact-method span { font-size: 14px; color: var(--color-body-light); }

.contact-form,
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.field { display: flex; flex-direction: column; }
.field label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-form input,
.contact-form textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  background: var(--color-navy-panel);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder,
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder { color: rgba(255, 255, 255, .45); }
.contact-form input:focus,
.contact-form textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.contact-form textarea,
.wpcf7-form textarea { height: 100px; resize: vertical; }

.contact-form__submit,
.wpcf7-form input[type="submit"] {
  justify-content: center;
  margin-top: 8px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  background: var(--color-accent);
  color: #fff;
}
.wpcf7-form input[type="submit"]:hover { background: var(--color-accent-hover); }

.form-status {
  min-height: 20px;
  font-size: 14px;
  text-align: center;
  color: var(--color-body-light);
}
.form-status[data-state="success"] { color: #7fd9a0; }
.form-status[data-state="error"] { color: #ff9d8a; }

/* Contact Form 7 own status/validation UI */
.wpcf7-not-valid-tip { color: #ff9d8a; font-size: 13px; margin-top: 4px; }
.wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--color-body-light);
  font-size: 14px;
  text-align: center;
}
.wpcf7-form.sent .wpcf7-response-output { color: #7fd9a0; border-color: #7fd9a0; }
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.unaccepted .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.aborted .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output { color: #ff9d8a; border-color: #ff9d8a; }
.wpcf7-spinner { margin: 0 auto; display: block; }

/* ==========================================================================
   Interior page hero + breadcrumb
   ========================================================================== */

.page-hero {
  background: var(--color-navy);
  color: #fff;
  padding: 56px 0 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--color-body-light); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-hidden] { color: var(--color-muted-dark); }

.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero .heading { margin-bottom: 0; }
.page-hero .lead { margin-top: 16px; max-width: 640px; }

/* ==========================================================================
   Info table (会社概要)
   ========================================================================== */

.info-table {
  width: 100%;
  border-collapse: collapse;
}
.info-table tr { border-bottom: 1px solid #e7e9ee; }
.info-table tr:first-child { border-top: 1px solid #e7e9ee; }
.info-table th,
.info-table td {
  text-align: left;
  padding: 22px 16px;
  font-size: 15px;
  line-height: 1.8;
  vertical-align: top;
}
.info-table th {
  width: 220px;
  color: var(--color-muted-dark);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.info-table td { color: var(--color-body); }
.info-table td.is-placeholder {
  color: var(--color-muted);
  font-style: italic;
}

.pillar-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.pillar-summary li {
  border: 1.5px solid #e7e9ee;
  border-radius: var(--radius);
  padding: 24px;
}
.pillar-summary li strong {
  display: block;
  color: var(--color-heading);
  font-size: 15px;
  margin-bottom: 8px;
}
.pillar-summary li span {
  font-size: 14px;
  color: var(--color-body);
  line-height: 1.8;
}

/* ==========================================================================
   Service detail sections
   ========================================================================== */

.service-detail {
  padding: 64px 0;
  border-bottom: 1px solid #ececec;
  scroll-margin-top: var(--header-height);
}
.service-detail:last-of-type { border-bottom: none; }

.service-detail__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.service-detail__number {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: .08em;
}

.service-detail__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.scope-list { display: flex; flex-direction: column; gap: 12px; }
.scope-list li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-body);
}
.scope-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--color-accent);
}

.flow-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.flow-list li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #ececec;
}
.flow-list li:last-child { border-bottom: none; }
.flow-list__index {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow-list__text { font-size: 14px; color: var(--color-body); line-height: 1.7; padding-top: 3px; }

/* ==========================================================================
   Apps / coming soon
   ========================================================================== */

.coming-soon {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 40px;
  border: 1.5px dashed #c9cdd6;
  border-radius: var(--radius);
}
.coming-soon__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* ==========================================================================
   Blog list page + single post content
   ========================================================================== */

.blog-list {
  display: flex;
  flex-direction: column;
}
.blog-list__item {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid #e7e9ee;
}
.blog-list__item:first-child { border-top: 1px solid #e7e9ee; }
.blog-list__meta {
  flex-shrink: 0;
  width: 190px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-meta);
}
.blog-list__meta img { width: 18px; height: 18px; object-fit: cover; border-radius: 2px; }
.blog-list__title { font-size: 16px; font-weight: 700; color: var(--color-heading); }
.blog-list__title a { color: inherit; }
.blog-list__title a:hover { color: var(--color-accent); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  font-size: 14px;
}
.pagination a,
.pagination span { padding: 8px 14px; border: 1px solid #e7e9ee; border-radius: var(--radius); }
.pagination .current { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.entry-header { margin-bottom: 32px; }
.entry-title { font-size: 30px; font-weight: 700; color: var(--color-heading); line-height: 1.5; margin-bottom: 12px; }
.entry-meta { font-size: 13px; color: var(--color-meta); }
.entry-thumbnail { margin-bottom: 32px; }
.entry-thumbnail img { border-radius: var(--radius); width: 100%; }

.entry-content { font-size: 16px; line-height: 1.9; color: var(--color-body); }
.entry-content p { margin: 0 0 1.6em; }
.entry-content h2 { font-size: 24px; font-weight: 700; color: var(--color-heading); margin: 2em 0 .8em; }
.entry-content h3 { font-size: 19px; font-weight: 700; color: var(--color-heading); margin: 1.8em 0 .6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.6em; padding-left: 1.4em; list-style: revert; }
.entry-content li { margin-bottom: .4em; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 1.6em 0; }
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 16px 24px;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
  color: var(--color-body);
}

.entry-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; font-size: 14px; }
.entry-nav a { font-weight: 700; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-navy-deep);
  color: var(--color-muted);
  padding: 56px 0 32px;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.site-footer__brand img { width: 169px; height: 54px; object-fit: contain; }

.site-footer__nav { display: flex; gap: 56px; font-size: 14px; flex-wrap: wrap; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__label { color: var(--color-muted-dark); font-size: 12px; }
.site-footer__nav a { color: var(--color-body-light); }
.site-footer__nav a:hover { color: #fff; }

.site-footer__copy { font-size: 12px; color: var(--color-muted-dark); margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --section-padding-y: 64px;
    --section-padding-x: 32px;
  }

  .pillar-grid,
  .blog-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

  .service__grid,
  .message__grid { grid-template-columns: 1fr; }

  .message__media { max-width: 420px; }

  .service__media { margin-top: 40px; }
  .service__media-sub { width: 60%; }

  .pillar-summary { grid-template-columns: 1fr; }
  .service-detail__body { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .site-nav, .site-header__cta { display: none; }
  .nav-toggle { display: flex; }

  .site-header__inner { padding: 16px 24px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-navy);
    border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .site-nav a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .site-header.is-nav-open .site-nav,
  .site-header.is-nav-open .site-header__cta {
    display: flex;
  }
  .site-header.is-nav-open .site-header__cta {
    order: 3;
    margin: 16px 24px 20px;
    justify-content: center;
  }
  .site-header.is-nav-open .site-nav { flex-direction: column; }

  .pillar-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  .hero__grid { flex-direction: column; }
  .hero__content { max-width: 100%; }
  .hero__visual { width: 100%; height: 280px; }
}

@media (max-width: 640px) {
  :root {
    --section-padding-x: 20px;
    --section-padding-y: 56px;
  }

  .site-header__inner { padding: 14px 20px; }
  .site-header__logo img { width: 132px; height: 42px; }

  .hero__visual { height: 220px; }
  .hero__title { font-size: 30px; }
  .hero__lead { font-size: 15px; max-width: 100%; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }

  .heading { font-size: 26px; }

  .section-head--split { flex-direction: column; align-items: flex-start; gap: 12px; }

  .service__media-sub { position: static; width: 100%; border: none; margin-top: 16px; }

  .contact-methods { gap: 28px; }

  .site-footer__inner { flex-direction: column; gap: 32px; }
  .site-footer__nav { gap: 32px; }

  .info-table th { width: auto; display: block; padding-bottom: 4px; }
  .info-table td { display: block; padding-top: 0; padding-bottom: 22px; }
  .info-table tr { display: block; }

  .blog-list__item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .blog-list__meta { width: auto; }

  .entry-nav { flex-direction: column; }
}
