/*
Theme Name: 車中泊てふてふ
Theme URI: https://shachuhaku-tefutefu.com
Author: 車中泊てふてふ運営者
Description: 車中泊・キャンピングカーの個人メディア「車中泊てふてふ」のためのオリジナルテーマ。
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: shachuhaku-tefutefu
*/

  :root {
    --paper: #F2EEF5;
    --paper-raised: #E9E1EF;
    --ink: #2B2530;
    --ink-soft: #6B6072;
    --pine: #33513F;
    --pine-deep: #24382C;
    --ember: #6E4C8F;
    --ember-soft: #9B7FB5;
    --dusk: #2A2130;
    --amber: #C98A2C;
    --line: rgba(43, 37, 48, 0.14);
    --font-display: "Shippori Mincho", serif;
    --font-body: "Zen Kaku Gothic New", sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #201B26;
      --paper-raised: #2A2333;
      --ink: #EDE7F2;
      --ink-soft: #B3A8BD;
      --pine: #7FA88C;
      --pine-deep: #9CC2A8;
      --ember: #C7A8E0;
      --ember-soft: #9B7FB5;
      --dusk: #14101A;
      --amber: #E0AE5D;
      --line: rgba(237, 231, 242, 0.16);
    }
  }
  :root[data-theme="dark"] {
    --paper: #201B26;
    --paper-raised: #2A2333;
    --ink: #EDE7F2;
    --ink-soft: #B3A8BD;
    --pine: #7FA88C;
    --pine-deep: #9CC2A8;
    --ember: #C7A8E0;
    --ember-soft: #9B7FB5;
    --dusk: #14101A;
    --amber: #E0AE5D;
    --line: rgba(237, 231, 242, 0.16);
  }

  * { box-sizing: border-box; }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); }
  html, body { height: 100%; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }

  .wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
  }

  /* Header */
  header.site {
    position: sticky;
    top: 0;
    top: env(safe-area-inset-top, 0px);
    z-index: 10;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    max-width: 1080px;
    margin: 0 auto;
  }
  .logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .logo span.mark {
    color: var(--ember);
  }
  .logo-butterfly {
    width: 22px;
    height: 22px;
    color: var(--ember);
    flex-shrink: 0;
    align-self: center;
  }
  nav.site-nav {
    display: flex;
    gap: 28px;
    font-size: 0.95rem;
  }
  nav.site-nav a {
    text-decoration: none;
    color: var(--ink-soft);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
  }
  nav.site-nav a:hover { color: var(--ink); border-color: var(--ember); }
  .nav-toggle { display: none; }

  @media (max-width: 720px) {
    nav.site-nav { display: none; }
  }

  /* Hero */
  .hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
  }
  .hero-topo {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    pointer-events: none;
  }
  .hero-inner {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 88px 24px 76px;
  }
  .hero-eyebrow-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    color: var(--ink-soft);
    font-size: 0.92rem;
  }
  .hero-eyebrow-line .dash {
    width: 32px;
    height: 1px;
    background: var(--ember);
  }
  h1.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    line-height: 0.98;
    margin: 0 0 28px;
    max-width: 14ch;
    letter-spacing: 0.005em;
  }
  .hero-lede {
    max-width: 46ch;
    font-size: 1.15rem;
    color: var(--ink-soft);
    margin: 0 0 36px;
  }
  .hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    background: var(--pine);
    color: #F4F1E6;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3px;
    font-size: 1rem;
  }
  .hero-cta:hover { background: var(--pine-deep); }

  @media (prefers-reduced-motion: no-preference) {
    .hero-title, .hero-lede, .hero-cta, .hero-eyebrow-line {
      animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both;
    }
    .hero-lede { animation-delay: 0.08s; }
    .hero-cta { animation-delay: 0.16s; }
    @keyframes rise {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }

  .hero-van {
    position: absolute;
    right: -40px;
    bottom: -10px;
    width: 340px;
    max-width: 42vw;
    color: var(--pine);
    opacity: 0.9;
    pointer-events: none;
  }
  @media (max-width: 720px) {
    .hero-van { display: none; }
  }

  /* Intro strip */
  .intro {
    border-bottom: 1px solid var(--line);
    background: var(--paper-raised);
  }
  .intro-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
  }
  .intro-label {
    font-size: 0.9rem;
    color: var(--ink-soft);
  }
  .intro-body p {
    margin: 0;
    max-width: 62ch;
  }
  @media (max-width: 720px) {
    .intro-inner { grid-template-columns: 1fr; gap: 12px; }
  }

  /* Section heading pattern */
  .section {
    padding: 72px 0;
    border-bottom: 1px solid var(--line);
  }
  .section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
    gap: 24px;
    flex-wrap: wrap;
  }
  h2.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.1rem;
    margin: 0;
  }
  .section-sub {
    color: var(--ink-soft);
    font-size: 0.98rem;
    max-width: 40ch;
  }

  /* Categories */
  .cat-list {
    display: flex;
    flex-direction: column;
  }
  .cat-row {
    display: grid;
    grid-template-columns: 44px 2fr 3fr auto;
    gap: 24px;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
  }
  .cat-row:last-child { border-bottom: 1px solid var(--line); }
  .cat-icon {
    width: 26px;
    height: 26px;
    color: var(--ember);
  }
  .cat-icon svg { width: 100%; height: 100%; }
  .cat-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
  }
  .cat-desc {
    color: var(--ink-soft);
    font-size: 0.96rem;
  }
  .cat-arrow {
    color: var(--ember);
    font-size: 1.3rem;
    justify-self: end;
    transition: transform 0.15s ease;
  }
  .cat-row:hover .cat-arrow { transform: translateX(4px); }
  @media (max-width: 720px) {
    .cat-row { grid-template-columns: 32px 1fr; gap: 6px 16px; }
    .cat-icon { width: 20px; height: 20px; grid-row: span 2; }
    .cat-arrow { display: none; }
  }

  /* Articles */
  .article-list {
    display: grid;
    gap: 28px;
  }
  .article-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    text-decoration: none;
    color: var(--ink);
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
  }
  .article-card:last-child { border-bottom: none; padding-bottom: 0; }
  .article-tag {
    font-size: 0.82rem;
    color: var(--pine);
    font-weight: 700;
  }
  .article-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 6px 0 8px;
    line-height: 1.15;
  }
  .article-excerpt {
    color: var(--ink-soft);
    font-size: 0.96rem;
    max-width: 60ch;
  }
  .article-date {
    color: var(--ink-soft);
    font-size: 0.85rem;
  }
  @media (max-width: 620px) {
    .article-card { grid-template-columns: 1fr; }
  }
  .photo-slot {
    margin-top: 14px;
    border: 1px dashed var(--line);
    border-radius: 4px;
    padding: 18px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .photo-slot svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--ink-soft); }

  /* Ad slot */
  .ad-slot {
    border: 1px dashed var(--line);
    border-radius: 4px;
    padding: 28px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.88rem;
    background: var(--paper-raised);
  }
  .ad-slot .ad-label {
    font-size: 0.72rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
    display: block;
  }

  /* Transparency block */
  .transparency {
    background: var(--dusk);
    color: #EFEBDF;
  }
  .transparency .section-title { color: #EFEBDF; }
  .transparency .section-sub { color: #C7CBCE; }
  .transparency p { max-width: 68ch; color: #D9DBD6; }
  .transparency a { color: var(--amber); text-decoration: underline; }

  /* Footer */
  footer.site {
    padding: 48px 0 40px;
  }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
  }
  .footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
  }
  .footer-links {
    display: flex;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    flex-wrap: wrap;
  }
  .footer-links a { text-decoration: none; }
  .footer-links a:hover { color: var(--ember); }
  .footer-note {
    margin-top: 24px;
    font-size: 0.82rem;
    color: var(--ink-soft);
  }

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

  /* Category page additions */
  .breadcrumb {
    padding: 20px 0 0;
    font-size: 0.85rem;
    color: var(--ink-soft);
  }
  .breadcrumb a { text-decoration: none; }
  .breadcrumb a:hover { color: var(--ember); }
  .cat-hero {
    padding: 28px 0 44px;
    border-bottom: 1px solid var(--line);
  }
  .cat-hero-icon {
    width: 46px;
    height: 46px;
    color: var(--ember);
    margin-bottom: 18px;
  }
  .cat-hero-icon svg { width: 100%; height: 100%; }
  h1.cat-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    margin: 0 0 14px;
  }
  .cat-hero-lede {
    max-width: 56ch;
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin: 0;
  }
  .cat-count {
    display: inline-block;
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 14px;
  }
  .filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
  }
  .filter-chip {
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
  }
  .filter-chip.active {
    background: var(--pine);
    color: #F4F1E6;
    border-color: var(--pine);
  }

  /* Article page */
  .article-header {
    padding: 8px 0 40px;
    border-bottom: 1px solid var(--line);
  }
  .article-header .article-tag {
    font-size: 0.88rem;
  }
  h1.article-h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 4.5vw, 2.7rem);
    line-height: 1.15;
    margin: 12px 0 16px;
    max-width: 22ch;
  }
  .article-meta {
    color: var(--ink-soft);
    font-size: 0.88rem;
  }
  .article-body {
    max-width: 68ch;
    padding: 44px 0;
    font-size: 1.04rem;
  }
  .article-body p {
    margin: 0 0 22px;
  }
  .article-body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 40px 0 14px;
  }
  .article-body h2:first-child { margin-top: 0; }
  .article-note {
    font-size: 0.86rem;
    color: var(--ink-soft);
    border-left: 2px solid var(--ember);
    padding-left: 14px;
    margin: 28px 0;
  }
  .closing-note {
    font-style: italic;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    padding-top: 26px;
    margin-top: 12px;
  }
  .source-list {
    max-width: 68ch;
    padding: 24px 0 56px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
  }
  .source-list a { color: var(--ink-soft); }
  .source-list a:hover { color: var(--ember); }
  .back-link {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    text-decoration: none;
  }
  .back-link:hover { color: var(--ember); }
