/*
Theme Name: 勝連諸島ポータル
Theme URI: https://example.com
Author: Katsuren Portal
Author URI: https://example.com
Description: 沖縄・うるま市 勝連諸島の地域観光ポータルのためのミニマルな新聞風エディトリアルブロックテーマ。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: katsuren-portal
*/

:root {
  --paper: #faf6ec;
  --paper-deep: #f3edda;
  --ink: #1e3a5f;
  --vermilion: #d94f30;
  --vermilion-deep: #b23a1d;
  --body-text: #2b2b2b;
  --rule: 1px solid rgba(30, 58, 95, 0.85);
  --rule-thin: 1px solid rgba(30, 58, 95, 0.35);
  --font-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --font-gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
}

.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* ============================================================
   Header - masthead
   ============================================================ */
.masthead {
  border-bottom: var(--rule);
}

.masthead__kicker {
  letter-spacing: 0.32em;
  color: var(--ink);
}

.masthead__logo a {
  font-family: var(--font-mincho);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}

.masthead__meta {
  letter-spacing: 0.12em;
  color: var(--ink);
  line-height: 1.9;
}

/* Navigation: double rule below nav is the single double-rule in the theme */
.global-nav {
  border-bottom: 3px double rgba(30, 58, 95, 0.85);
}

.global-nav .wp-block-navigation-item__content {
  position: relative;
  display: block;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease;
}

.global-nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.45rem;
  height: 2px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.global-nav .wp-block-navigation-item__content:hover,
.global-nav .wp-block-navigation-item__content:focus-visible {
  color: var(--vermilion-deep);
}

.global-nav .wp-block-navigation-item__content:hover::after,
.global-nav .wp-block-navigation-item__content:focus-visible::after {
  transform: scaleX(1);
}

.global-nav .wp-block-navigation-item__content:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* ============================================================
   Shared editorial elements
   ============================================================ */

/* Vermilion accent rule: one of the two allowed vermilion roles */
.accent-rule {
  width: 4.5rem;
  height: 3px;
  background: var(--vermilion);
  border: none;
  margin-left: 0;
}

/* Section label: small mincho heading with thin rule below */
.section-label {
  font-family: var(--font-mincho);
  letter-spacing: 0.24em;
  color: var(--ink);
  padding-bottom: 0.7rem;
  border-bottom: var(--rule-thin);
}

/* Light photo frame: 1px ink line, small inner padding, no shadow */
.framed-photo {
  border: 1px solid var(--ink);
  background: var(--paper-deep);
  padding: 0.5rem;
}

.framed-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.framed-photo figcaption {
  text-align: left;
  padding-top: 0.6rem;
  margin-bottom: 0.2rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--ink);
}

/* ============================================================
   Hero
   ============================================================ */
.hero-title {
  letter-spacing: 0.08em;
  line-height: 1.28;
}

.hero-lead {
  max-width: 34em;
  line-height: 2.1;
}

/* ============================================================
   News section (query grid)
   ============================================================ */
.news-grid .wp-block-post {
  border-top: var(--rule-thin);
  padding-top: 1.2rem;
}

.news-grid .wp-block-post-date {
  font-family: var(--font-mincho);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.news-grid .wp-block-post-title {
  font-family: var(--font-mincho);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.news-grid .wp-block-post-title a {
  color: var(--ink);
  text-decoration: none;
}

.news-grid .wp-block-post-title a:hover,
.news-grid .wp-block-post-title a:focus-visible {
  color: var(--vermilion-deep);
  text-decoration: underline;
  text-decoration-color: var(--vermilion);
  text-underline-offset: 0.3em;
}

.news-grid .wp-block-post-excerpt {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--body-text);
}

.news-grid .wp-block-post-excerpt__more-link {
  font-family: var(--font-mincho);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
}

.news-grid .wp-block-post-excerpt__more-link:hover,
.news-grid .wp-block-post-excerpt__more-link:focus-visible {
  color: var(--vermilion-deep);
  text-decoration: underline;
  text-decoration-color: var(--vermilion);
  text-underline-offset: 0.3em;
}

/* ============================================================
   Single / page title area
   ============================================================ */
.entry-header {
  border-bottom: var(--rule-thin);
}

.entry-date {
  font-family: var(--font-mincho);
  letter-spacing: 0.14em;
  color: var(--ink);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: var(--rule);
}

.site-footer a {
  color: var(--ink);
}

.footer-credit {
  letter-spacing: 0.06em;
}

/* ============================================================
   Cards helper
   ============================================================ */
.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

/* ============================================================
   Motion (restrained, editorial)
   ============================================================ */
.slide-in-left {
  opacity: 0;
  transform: translateX(-1.2rem);
  animation: katsuren-slide-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.slide-in-left-delay {
  opacity: 0;
  transform: translateX(-1.2rem);
  animation: katsuren-slide-in 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-up {
  opacity: 0;
  transform: translateY(0.9rem);
  animation: katsuren-fade-up 0.9s 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.photo-reveal {
  opacity: 0;
  transform: translateY(0.6rem);
  animation: katsuren-fade-up 1.1s 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes katsuren-slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes katsuren-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .slide-in-left,
  .slide-in-left-delay,
  .fade-up,
  .photo-reveal,
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === Editor: keep animated content visible while editing === */
.editor-styles-wrapper .slide-in-left,
.editor-styles-wrapper .slide-in-left-delay,
.editor-styles-wrapper .fade-up,
.editor-styles-wrapper .photo-reveal,
.editor-styles-wrapper .animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 781px) {
  .masthead .masthead__meta {
    text-align: left;
  }
}
