/*
Theme Name: SJ IP Law Office
Theme URI: https://example.com/
Author: Genspark
Description: SJ知財弁理士事務所の静的HTMLをWordPress向けに再構成したシングルページテーマ。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: sj-ip-law-office
*/

:root {
  --navy: #0f2537;
  --burgundy: #6b1d2f;
  --blue: #184e77;
  --gold: #b99147;
  --light-bg: #f4f7f9;
  --text: #1a2530;
  --muted: #4a5c6a;
  --line: #cedbe5;
  --white: #ffffff;
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Times New Roman", "YuMincho", "Hiragino Mincho ProN", "MS PMincho", serif;
  color: var(--text);
  background: var(--light-bg);
  line-height: 1.8;
}

body.admin-bar header.site-header {
  top: 32px;
}

.sans,
button,
input,
select,
textarea,
.site-nav,
.topbar {
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--burgundy); }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
}

.topbar-inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  flex-wrap: wrap;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--navy);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  background: linear-gradient(135deg, var(--navy), var(--burgundy));
  color: var(--white);
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
}
.logo-mark span {
  font-size: 0.38rem;
  letter-spacing: 0.01em;
  opacity: 0.8;
  margin-top: 3px;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  padding: 0 2px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand small {
  color: var(--burgundy);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.brand strong {
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: 0.05em;
}

.menu {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.menu li { margin: 0; }

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  transition: all .2s ease;
  font-size: 0.9rem;
  cursor: pointer;
}

.button-primary,
input[type="submit"],
button.button-primary {
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
}
.button-primary:hover,
input[type="submit"]:hover,
button.button-primary:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

.button-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}
.button-secondary:hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.hero {
  background: linear-gradient(135deg, #07131c 0%, #16354e 100%);
  color: var(--white);
  padding: 80px 0;
  border-bottom: 4px solid var(--burgundy);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.3;
  margin: 0 0 24px;
  font-weight: 500;
}

.hero-copy p {
  margin: 0 0 32px;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  text-align: justify;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.badge {
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  font-size: 0.8rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-img {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}
.hero-img img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 6px;
}

section {
  padding: 90px 0;
  border-bottom: 1px solid var(--line);
}

.section-bg {
  background: var(--white);
}

.section-heading {
  margin-bottom: 50px;
  text-align: center;
}

.section-heading span {
  display: block;
  color: var(--burgundy);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0 auto 16px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--navy);
  font-weight: 500;
  position: relative;
  padding-bottom: 12px;
  display: inline-block;
}
.section-heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 1px;
  background: var(--burgundy);
}

.section-heading p {
  margin: 0 auto;
  color: var(--muted);
  max-width: 740px;
  font-size: 0.95rem;
}

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

.card {
  background: var(--white);
  border-top: 3px solid var(--navy);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 24px;
  transition: transform 0.2s ease;
  border-radius: 4px;
}
.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 600;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}
tr:nth-child(even) td {
  background: var(--light-bg);
}
.price-text {
  font-weight: 700;
  color: var(--burgundy);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.profile-panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 36px;
}

.profile-list,
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.profile-list li,
.bullet-list li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.profile-list li::before,
.bullet-list li::before {
  content: "▪";
  color: var(--burgundy);
  position: absolute;
  left: 0;
  top: 0;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--light-bg);
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 2px;
}
.form-control:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.timeline-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  padding: 24px;
  border-radius: 4px;
}
.timeline-item h3 {
  margin-top: 0;
  color: var(--navy);
  font-size: 1.15rem;
}

.co-creation-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 30px;
  margin-top: 30px;
  border-radius: 0 4px 4px 0;
}
.co-creation-box h4 {
  margin-top: 0;
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.post-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap:25px;
}
.post-card {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  height:100%;
  position:relative;
}
.post-meta {
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
  flex-wrap: wrap;
}
.post-category {
  font-size:0.8rem;
  padding:2px 8px;
  font-weight:600;
  border-radius:2px;
  background: rgba(107,29,47,0.1);
  color: var(--burgundy);
}
.post-date {
  font-size:0.8rem;
  color:var(--muted);
}
.post-readmore {
  margin-top:20px;
  font-size:0.85rem;
  font-weight:600;
  color:var(--burgundy);
  text-align:right;
}

.notice-box {
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: #fdfbf7;
  margin-bottom: 18px;
  border-left: 4px solid var(--gold);
}
.notice-success { border-left-color: #2e7d32; }
.notice-error { border-left-color: #c62828; }

.page-shell {
  padding: 70px 0;
}
.entry-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px;
}
.entry-card h1,
.entry-card h2,
.entry-card h3,
.entry-card h4 { color: var(--navy); }
.entry-card a { color: var(--blue); }
.entry-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

footer.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 40px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-nav,
.footer-nav ul {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .hero-inner,
  .grid-3,
  .split,
  .timeline {
    grid-template-columns: 1fr;
  }
  .hero-img img { height: 240px; }
  .menu { display: none; }
}

@media (max-width: 782px) {
  body.admin-bar header.site-header {
    top: 46px;
  }
}
