/*
Theme Name: K計画事務所 NEWS
Theme URI: https://www.k-keikaku.co.jp/news/
Author: K計画事務所
Description: K計画事務所公式サイトと統一した、お知らせ専用テーマです。
Version: 1.0.1
Text Domain: kkeikaku-news
*/

:root {
  --ink: #303437;
  --muted: #687077;
  --page-background: #f7f7f3;
  --accent-circle: #dfe5dd;
  --pale: #eeeeea;
  --line: #b7b9b8;
  --page: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 400;
  line-height: 1.75;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: min(100% - 9vw, var(--page));
  min-height: 126px;
  margin: 0 auto;
  padding-top: clamp(22px, 3.1vw, 46px);
}

.site-brand {
  display: grid;
  line-height: 1.28;
}

.site-brand__en {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 500;
}

.site-brand__ja {
  font-size: clamp(16px, 1.4vw, 21px);
  font-weight: 300;
}

.global-nav ul {
  display: flex;
  gap: clamp(20px, 2.6vw, 42px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a,
.footer-nav a {
  display: inline-block;
}

.global-nav a {
  padding: 4px 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 300;
}

.global-nav a::after,
.footer-nav a::after {
  display: block;
  width: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transition: width 0.25s ease;
}

.global-nav a:hover::after,
.global-nav a[aria-current="page"]::after,
.footer-nav a:hover::after,
.footer-nav a[aria-current="page"]::after {
  width: 100%;
}

.menu-button {
  display: none;
}

.news-main {
  width: min(100% - 10vw, 1100px);
  margin: 0 auto;
  padding: 18px 0 150px;
}

.page-heading {
  margin: 0 0 70px 28px;
}

.page-heading h1 {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 200;
  letter-spacing: -0.025em;
}

.page-heading h1::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: -28px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--accent-circle);
  content: "";
  transform: translateY(-50%);
}

.news-list {
  width: min(100%, 850px);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.news-list__item {
  margin: 0;
}

.news-list__link {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 40px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.news-list__link:hover,
.news-list__link:focus-visible {
  background: var(--pale);
}

.news-list__date {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.news-list__title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.news-empty {
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.news-article {
  width: min(100%, 960px);
  margin: 0 auto;
}

.news-article__header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.news-article__title {
  max-width: 960px;
  margin: 0 0 22px;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.news-article__date {
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.news-article__content {
  padding: 54px 0 70px;
  font-size: 16px;
  line-height: 2.05;
}

.news-article__content > * {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.news-article__content p {
  margin-top: 0;
  margin-bottom: 1.6em;
}

.news-article__content h2,
.news-article__content h3 {
  margin-top: 2.4em;
  margin-bottom: 0.8em;
  font-weight: 500;
  line-height: 1.5;
}

.news-article__content a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.news-article__content .wp-block-image,
.news-article__content .alignwide,
.news-article__content .alignfull {
  max-width: 100%;
}

.back-to-news {
  display: inline-block;
  padding: 8px 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.back-to-news::after {
  display: block;
  width: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transition: width 0.25s ease;
}

.back-to-news:hover::after {
  width: 100%;
}

.pagination {
  width: min(100%, 850px);
  margin: 46px auto 0;
}

.pagination .nav-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.pagination .page-numbers {
  min-width: 34px;
  padding: 4px 8px;
  text-align: center;
}

.pagination .current {
  border-bottom: 1px solid currentColor;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 25px 50px;
  padding: 30px max(7vw, calc((100% - 1100px) / 2));
  background: var(--pale);
  font-size: 14px;
  line-height: 1.55;
}

.company-info {
  color: #555;
  font-style: normal;
  font-weight: 500;
}

.company-info strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.footer-nav {
  display: flex;
  gap: 34px;
  align-self: start;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

.copyright {
  grid-column: 1 / -1;
  text-align: center;
}

@media (max-width: 800px) {
  .site-header {
    width: calc(100% - 40px);
    min-height: 100px;
    padding-top: 24px;
  }

  .site-brand__en {
    font-size: 13px;
  }

  .site-brand__ja {
    font-size: 12px;
  }

  .menu-button {
    position: relative;
    z-index: 30;
    display: grid;
    gap: 7px;
    width: 36px;
    height: 32px;
    padding: 8px 3px;
    border: 0;
    background: transparent;
  }

  .menu-button span:not(.visually-hidden) {
    display: block;
    height: 1px;
    background: var(--ink);
    transition: transform 0.25s ease;
  }

  .menu-button.is-open span:first-child {
    background: #fff;
    transform: translateY(4px) rotate(45deg);
  }

  .menu-button.is-open span:nth-child(2) {
    background: #fff;
    transform: translateY(-4px) rotate(-45deg);
  }

  .global-nav {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgb(36 42 45 / 96%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .global-nav.is-open {
    color: #f7f7f3;
    opacity: 1;
    pointer-events: auto;
  }

  .global-nav ul {
    display: grid;
    gap: 22px;
    text-align: center;
  }

  .global-nav a {
    font-size: 18px;
  }

  .news-main {
    width: calc(100% - 48px);
    padding-top: 0;
    padding-bottom: 100px;
  }

  .page-heading {
    margin: 8px 0 48px 20px;
  }

  .news-list__link {
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 16px 4px;
  }

  .news-article__content {
    padding-top: 40px;
    font-size: 15px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 15px 25px;
  }
}

@media (max-width: 480px) {
  .news-list__link {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .news-article__title {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
