/*
Theme Name: iewotateruzo
Theme URI: https://iewotateruzo.com/
Author: iewotateruzo
Description: 建築作品集と施主記録の中間を狙った、余白と写真を重視するミニマルなWordPressテーマ。
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: iewotateruzo
*/

:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #222420;
  --muted: #73756d;
  --line: #d9d8d2;
  --accent: #5b6256;
  --content: 46rem;
  --wide: 76rem;
  --gutter: clamp(1.25rem, 3vw, 3rem);
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;
  --radius: 0;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  position: relative;
  z-index: 100;
  padding: 1.5rem var(--gutter);
}
.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-branding { min-width: 0; }
.site-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.2;
}
.site-title a { text-decoration: none; }
.custom-logo-link { display: inline-block; }
.custom-logo { max-height: 40px; width: auto; }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .08em;
}
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: .25rem 0;
  cursor: pointer;
  font-size: .82rem;
  letter-spacing: .08em;
}

.site-main { min-height: 60vh; }
.content-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content));
  margin-inline: auto;
}
.wide-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--wide));
  margin-inline: auto;
}

.front-content,
.page-article,
.single-article {
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 9rem);
}
.front-content { padding-top: clamp(2.5rem, 7vw, 6rem); }

.entry-header { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.entry-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .035em;
}
.entry-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
}

.entry-content > * {
  width: min(100%, var(--content));
  margin-left: auto;
  margin-right: auto;
}
.entry-content > .alignwide {
  width: min(calc(100vw - (var(--gutter) * 2)), var(--wide));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}
.entry-content > .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content p { margin-top: 0; margin-bottom: 1.75rem; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .035em;
  text-wrap: balance;
}
.entry-content h1 { font-size: clamp(2.15rem, 5vw, 4rem); margin: 0 0 3.5rem; }
.entry-content h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  margin-top: clamp(5rem, 10vw, 8rem);
  margin-bottom: 2.25rem;
}
.entry-content h3 {
  font-size: clamp(1.16rem, 2vw, 1.4rem);
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
}
.entry-content h4 { font-size: 1rem; margin-top: 2.75rem; margin-bottom: 1rem; }
.entry-content ul,
.entry-content ol { padding-left: 1.3em; margin-bottom: 2rem; }
.entry-content li + li { margin-top: .55rem; }
.entry-content blockquote {
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.entry-content hr,
.wp-block-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: 5rem;
  margin-bottom: 5rem;
}
.entry-content strong { font-weight: 650; }
.entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}

.wp-block-image,
.wp-block-gallery,
.wp-block-cover,
.wp-block-video { margin-top: clamp(2.5rem, 6vw, 5rem); margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.wp-block-image figcaption,
.wp-block-gallery figcaption,
.wp-element-caption {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.65;
  margin-top: .65rem;
  text-align: left;
}
.wp-block-gallery { gap: clamp(.5rem, 1.5vw, 1rem); }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  background: none;
  color: var(--muted);
  padding: .4rem 0 0;
  position: static;
}

.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.7;
  background: transparent;
}
.entry-content th,
.entry-content td,
.wp-block-table th,
.wp-block-table td {
  padding: .8rem .35rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.entry-content th,
.wp-block-table th {
  text-align: left;
  font-weight: 600;
}
.wp-block-table { overflow-x: auto; margin-top: 2.5rem; margin-bottom: 2.5rem; }

.wp-block-footnotes {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.post-list__item { border-bottom: 1px solid var(--line); }
.post-list__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: baseline;
  padding: 1.35rem 0;
  text-decoration: none;
}
.post-list__title {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.post-list__date { color: var(--muted); font-size: .75rem; white-space: nowrap; }

.post-navigation {
  border-top: 1px solid var(--line);
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 2rem;
}
.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.post-navigation a { text-decoration: none; }
.post-navigation .nav-subtitle {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  margin-bottom: .35rem;
}
.post-navigation .nav-title { font-family: var(--serif); }
.nav-next { text-align: right; }

.site-footer {
  padding: 3rem var(--gutter) 2rem;
  border-top: 1px solid var(--line);
}
.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  color: var(--muted);
  font-size: .72rem;
}
.footer-nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; }

.archive-header,
.search-header {
  margin-bottom: 3rem;
}
.archive-title,
.search-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
}
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.page-numbers { padding: .25rem .45rem; }

.not-found {
  padding: clamp(5rem, 12vw, 10rem) 0;
  text-align: center;
}
.not-found h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 4rem);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@media (max-width: 760px) {
  body { font-size: 15px; line-height: 1.9; }
  .site-header { padding-top: 1.15rem; padding-bottom: 1.15rem; }
  .menu-toggle { display: inline-block; }
  .primary-nav {
    display: none;
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: 4.25rem;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav li + li { margin-top: .65rem; }
  .primary-nav a { display: block; padding: .35rem 0; }
  .entry-title { font-size: clamp(1.9rem, 10vw, 3rem); }
  .post-list__link { grid-template-columns: 1fr; gap: .25rem; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .site-footer__inner { display: block; }
  .footer-nav { margin-top: 1rem; }
  .footer-nav ul { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
