/*
Theme Name: N36 Corporate
Theme URI: https://n-36.com
Author: 株式会社N36
Author URI: https://n-36.com
Description: 株式会社N36 コーポレートサイト用オリジナルテーマ（白磁 / White Porcelain）。もとの静的HTML/CSS一式をWordPressテーマ化したもの。
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: n36
*/

/* ============================================
   N36 Corporate Site — "白磁 / White Porcelain"
   Design System & Shared Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg:          #FAFAF9;
  --surface:     #FFFFFF;
  --surface-alt: #F5F5F4;
  --text:        #1C1917;
  --text-sub:    #57534E;
  --text-muted:  #A8A29E;
  --accent:      #1E3A5F;
  --accent-hover:#2B4F7A;
  --accent-light:#EDF1F6;
  --border:      #E7E5E4;
  --border-light:#F0EFED;

  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  --font-la: "Inter", "Noto Sans JP", sans-serif;

  --w-site:  960px;
  --w-narrow:720px;
  --pad-section: 96px 0;
  --pad-section-sm: 56px 0;
}

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

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

body {
  font-family: var(--font-ja);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol { list-style: none; }

/* --- Utility --- */
.container {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--w-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Typography --- */
.heading-xl {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.heading-lg {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.heading-md {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.heading-sm {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
}

.text-sub {
  color: var(--text-sub);
}

.text-muted {
  color: var(--text-muted);
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.8125rem;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-la);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  font-size: 0.8125rem;
  color: var(--text-sub);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

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

.site-nav a.current {
  color: var(--accent);
}

.site-nav a.current::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.2s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  padding: 120px 0 96px;
  text-align: center;
}

.hero-catch {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 0.9375rem;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  font-size: 0.875rem;
  font-family: var(--font-ja);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

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

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

.btn--outline:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.btn--ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--text-sub);
  color: var(--text);
}

/* --- Section --- */
.section {
  padding: var(--pad-section);
}

.section--alt {
  background: var(--surface-alt);
}

.section-label {
  font-family: var(--font-la);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 0.9375rem;
  color: var(--text-sub);
  line-height: 1.8;
  max-width: 560px;
}

.section-lead--center {
  margin: 0 auto;
  text-align: center;
}

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

.section-header--center {
  text-align: center;
}

/* --- Divider --- */
.divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 48px auto;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #D6D3D1;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 18px;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.8;
}

/* --- Info Table --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

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

.info-table th,
.info-table td {
  padding: 16px 0;
  font-size: 0.9375rem;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  font-weight: 500;
  width: 140px;
  color: var(--text-sub);
  white-space: nowrap;
  padding-right: 24px;
}

.info-table td {
  color: var(--text);
}

/* --- Notice list --- */
.notice-list {
  border-top: 1px solid var(--border);
}

.notice-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.notice-date {
  font-family: var(--font-la);
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 100px;
}

.notice-title {
  font-size: 0.9375rem;
}

.notice-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- Form --- */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.form-label .required {
  font-size: 0.75rem;
  color: #B45050;
  margin-left: 6px;
  font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: var(--font-ja);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
  line-height: 1.6;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.6;
}

/* --- Page Header (Sub pages) --- */
.page-header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.page-title-en {
  font-family: var(--font-la);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
}

/* --- Footer --- */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-la);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}

.footer-company {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--text-sub);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.footer-copy {
  font-family: var(--font-la);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* --- Service Detail --- */
.service-section {
  padding: 64px 0;
}

.service-section + .service-section {
  border-top: 1px solid var(--border);
}

.service-num {
  font-family: var(--font-la);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.service-text {
  font-size: 0.9375rem;
  color: var(--text-sub);
  line-height: 1.9;
  max-width: 600px;
  margin-bottom: 28px;
}

.service-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tag {
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 4px;
}

/* --- CTA band --- */
.cta-band {
  padding: 64px 0;
  text-align: center;
  background: var(--surface-alt);
}

.cta-band .section-title {
  margin-bottom: 8px;
}

.cta-band .section-lead {
  margin: 0 auto 28px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --pad-section: 64px 0;
    --pad-section-sm: 40px 0;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 249, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
  }

  .site-nav a::after {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 72px 0 56px;
  }

  .hero-catch {
    font-size: 1.625rem;
  }

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

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

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

  .info-table th {
    width: 100px;
    font-size: 0.875rem;
  }

  .info-table td {
    font-size: 0.875rem;
  }

  .notice-item {
    flex-direction: column;
    gap: 4px;
  }

  .page-header {
    padding: 40px 0 32px;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .service-section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .hero-catch {
    font-size: 1.375rem;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

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

/* ============================================
   WordPress化に伴う追加分
   もとのHTMLは <nav class="site-nav"><a>...</a></nav> のように
   aタグが直接並ぶ構造でしたが、WordPressの wp_nav_menu() は
   標準で <ul><li><a></a></li></ul> という構造を出力します。
   これに合わせて、ul/li に対して元のレイアウトを再現するための
   最小限のCSSを追加しています。
   ============================================ */

.site-nav > ul,
.footer-nav > ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer-nav > ul {
  gap: 28px;
}

.site-nav li,
.footer-nav li {
  list-style: none;
}

/* wp_nav_menuが自動付与する現在地クラスを、既存の .current スタイルに合わせる */
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: var(--accent);
}

.site-nav .current-menu-item > a::after,
.site-nav .current_page_item > a::after {
  width: 100%;
}

@media (max-width: 768px) {
  /* モバイルではul自体を縦積みに戻す（liの標準表示で自動的に縦積みになる） */
  .site-nav > ul {
    display: block;
  }

  .footer-nav > ul {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
}

/* お問い合わせフォーム送信完了メッセージ */
.form-success {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 6px;
  padding: 24px;
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.form-error {
  color: #B45050;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* 電子公告 詳細ページの本文 */
.notice-content {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--text);
}

.notice-content p {
  margin-bottom: 1.4em;
}
