/*
Theme Name: Aqua Simple
Theme URI: https://marihirotsuru.local/
Author: 垣迫
Description: Aqua Simple デザイン参考ページを元にしたブロックエディタ対応テーマ。header.php / footer.php / style.css で骨組みを作り、コンテンツ本体は固定ページのブロックエディタ＋ブロックパターンで組み立てる構成。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aqua-simple
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wp--preset--color--bg, #fff);
  color: var(--wp--preset--color--ink, #21343a);
  font-family: var(--wp--preset--font-family--body, "Noto Sans JP", sans-serif);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wp--preset--font-family--body, "Noto Sans JP", sans-serif);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.4em;
}
p { margin: 0 0 1em; }
a { color: var(--wp--preset--color--accent); text-decoration: none; }
a:hover { color: var(--wp--preset--color--accent-bright); }
img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.aqua-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 880px) {
  body { font-size: 14px; }
  .aqua-wrap { padding: 0 20px; }
}

/*
 * WordPress's core "alignfull" breakout and constrained-layout child-width
 * rules only ship scoped to .wp-site-blocks, which is a full-site-editing
 * (block theme) wrapper this classic (page.php-based) theme never outputs —
 * so a block set to "Full width" alignment (e.g. the front page's Cover
 * hero) has no CSS making it actually break out of .aqua-wrap. Reimplement
 * just the pieces a classic theme needs, front end and editor alike.
 */
.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.wp-block-cover.alignfull > .wp-block-cover__inner-container {
  max-width: 1100px;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 880px) {
  .wp-block-cover.alignfull > .wp-block-cover__inner-container { padding-left: 20px; padding-right: 20px; }
  .wp-block-cover.alignfull { padding-top: 56px; }
}

/* ==========================================================================
   Editor-only: match the block editor canvas width to page.php's .aqua-wrap
   ========================================================================== */
/*
 * page.php wraps the_content() in .aqua-wrap on the front end, but the block
 * editor never runs page.php — for a classic (non full-site-editing) theme,
 * the editor's own root block container defaults to an unconstrained
 * "is-layout-flow" (no max-width), even though child blocks that explicitly
 * opt into "layout":{"type":"constrained"} (e.g. the section-background
 * group styles below) already respect theme.json's contentSize correctly.
 * `.editor-styles-wrapper` only exists inside the editor iframe, never on
 * the front end, so this is editor-only and mirrors .aqua-wrap exactly.
 */
.editor-styles-wrapper .is-root-container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 880px) {
  .editor-styles-wrapper .is-root-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.aqua-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--wp--preset--color--border, #dceef1);
}
.aqua-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.aqua-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--wp--preset--color--ink);
  font-weight: 700;
  font-size: 17px;
}
.aqua-brand .aqua-brand-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--wp--preset--color--accent);
}
.aqua-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.aqua-nav a { color: var(--wp--preset--color--ink); }
.aqua-nav a:hover { color: var(--wp--preset--color--accent); }
.aqua-nav .aqua-nav-cta > a,
.aqua-nav a.aqua-nav-cta {
  color: #fff !important;
  background: var(--wp--preset--color--accent-strong);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
}
.aqua-nav .aqua-nav-cta:hover > a,
.aqua-nav a.aqua-nav-cta:hover {
  background: #2596a4;
  color: #fff !important;
}

.aqua-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  position: relative;
  z-index: 61;
  border: 0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.aqua-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--wp--preset--color--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.aqua-menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.aqua-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.aqua-menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .aqua-nav {
    display: none;
    position: fixed;
    inset: 0;
    height: 100vh;
    z-index: 60;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: #fff;
  }
  .aqua-nav.is-open { display: flex; }
  .aqua-nav a {
    padding: 0;
    font-size: 18px;
  }
  .aqua-nav .aqua-nav-cta > a,
  .aqua-nav a.aqua-nav-cta {
    padding: 14px 32px;
  }
  .aqua-menu-toggle { display: inline-flex; }
}

/* ==========================================================================
   Section heading (eyebrow + title + underline) — used by the
   "section-heading" pattern
   ========================================================================== */
.aqua-section-head { text-align: center; }
.is-style-aqua-eyebrow {
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--wp--preset--color--accent);
  margin: 10px 0 0;
}
.aqua-section-head .aqua-underline {
  width: 48px;
  height: 3px;
  background: var(--wp--preset--color--accent-bright);
  margin: 18px auto 0;
}

/* ==========================================================================
   Cards (block styles: core/group, and core/paragraph where noted)
   ========================================================================== */
.is-style-aqua-card {
  background: #fff;
  border-radius: 8px;
  padding: 32px 34px;
  height: 100%;
}
.is-style-aqua-card-bordered {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--wp--preset--color--border);
  padding: 26px 28px;
  height: 100%;
}
/* Book cards (image + text side by side via flex "nowrap" layout, e.g. the
   book-review-card pattern). ".is-nowrap" only shows up on this flex
   variant, not on the plain "constrained" bordered cards elsewhere
   (contribution cards etc.), so it scopes this to book cards only. */
.is-style-aqua-card-bordered.is-nowrap {
  align-items: flex-start;
  gap: 1rem;
}
@media (max-width: 600px) {
  .is-style-aqua-card-bordered.is-nowrap {
    flex-wrap: wrap;
  }
  .is-style-aqua-card-bordered.is-nowrap > .wp-block-image {
    width: 150px !important;
    margin: 0 auto;
  }
}
/* Also used on core/paragraph (two-col-tinted pattern), not just core/group.
   height:100% + box-sizing so a paragraph version stretches to match its
   sibling columns instead of only being as tall as its own wrapped text. */
.is-style-aqua-card-tinted {
  background: var(--wp--preset--color--surface);
  padding: 18px 20px;
  border-radius: 6px;
  height: 100%;
  box-sizing: border-box;
}
.is-style-aqua-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--wp--preset--color--ink);
}
.is-style-aqua-card-link:hover { border-color: var(--wp--preset--color--accent-bright); }
.is-style-aqua-card-link img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.is-style-aqua-card-title {
  font-size: 18px;
  padding: 20px 22px;
  color: var(--wp--preset--color--accent);
  margin-top: auto;
}

/* Quick-link strip under the hero. height:100% + box-sizing so cards with
   different amounts of wrapped text still stretch to match column height. */
.is-style-aqua-strip-item {
  background: #fff;
  border-top: 3px solid var(--wp--preset--color--accent-bright);
  border-radius: 0 0 6px 6px;
  padding: 20px 22px;
  height: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Section backgrounds (core/group block styles) — the block itself keeps
   its normal (aqua-wrap-constrained) width, only its background bleeds to
   the full screen width via box-shadow + clip-path, so no alignfull / nested
   group is needed.
   ========================================================================== */
.is-style-aqua-section-white,
.is-style-aqua-section-tint {
  padding: 88px 0;
  clip-path: inset(0 -100vmax);
}
.is-style-aqua-section-white {
  background-color: var(--wp--preset--color--bg, #fff);
  box-shadow: 0 0 0 100vmax var(--wp--preset--color--bg, #fff);
}
.is-style-aqua-section-tint {
  background-color: var(--wp--preset--color--surface, #eaf8fa);
  box-shadow: 0 0 0 100vmax var(--wp--preset--color--surface, #eaf8fa);
}
@media (max-width: 880px) {
  .is-style-aqua-section-white,
  .is-style-aqua-section-tint { padding: 56px 0; }
}

/* Quote strip: full-bleed background plus full-bleed top/bottom rule lines.
   The background uses the same box-shadow bleed as the section styles above;
   the rule lines can't bleed that way (box-shadow can't be inset AND full
   width at once), so they're drawn as separately-bled pseudo-elements. */
.is-style-aqua-quote-strip {
  position: relative;
  background-color: var(--wp--preset--color--surface-alt, #eef8fa);
  box-shadow: 0 0 0 100vmax var(--wp--preset--color--surface-alt, #eef8fa);
  clip-path: inset(0 -100vmax);
  padding: 44px 0;
  text-align: center;
}
.is-style-aqua-quote-strip::before,
.is-style-aqua-quote-strip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
}
.is-style-aqua-quote-strip::before {
  top: 0;
  height: 3px;
  background: var(--wp--preset--color--accent-bright);
}
.is-style-aqua-quote-strip::after {
  bottom: 0;
  height: 1px;
  background: var(--wp--preset--color--border);
}

/* Narrow a group block below the page's default aqua-wrap width. */
.is-style-aqua-narrow-800 {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.is-style-aqua-narrow-600 {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Profile circular photo (core/image block style; width/height stay inline
   per-instance on the block itself). */
.is-style-aqua-circle {
  border-radius: 999px;
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}
.is-style-aqua-circle img { width: 100%; height: 100%; object-fit: cover; }

/* Badge / tag (core/paragraph block styles) */
.is-style-aqua-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--wp--preset--color--accent-strong);
  padding: 8px 16px;
  border-radius: 6px;
}
.is-style-aqua-badge-alt {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--wp--preset--color--badge-ink);
  background: var(--wp--preset--color--badge-bg);
  padding: 8px 16px;
  border-radius: 6px;
}

/* Heading styles (core/heading block styles) */
.is-style-aqua-h-accent {
  color: var(--wp--preset--color--accent);
}
.is-style-aqua-h-underline {
  display: inline-block;
  font-size: 17px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wp--preset--color--accent-bright);
}

/* Large CTA button (core/button block style) */
.is-style-aqua-btn-large .wp-block-button__link {
  padding: 17px 44px;
  font-size: 16px;
  font-weight: 700;
}

/* Book review card image */
.aqua-book-cover { width: 100%; display: block; }

/* News list (core/list block style) */
.is-style-aqua-news { list-style: none; margin: 0; padding: 0; }
.is-style-aqua-news li {
  font-size: 15px;
  line-height: 1.68;
  padding: 16px 0;
  border-top: 1px solid var(--wp--preset--color--border, #e3f1f4);
}
.is-style-aqua-news li.is-hidden { display: none; }
.aqua-news-toggle {
  background: none; border: none; padding: 0; margin-top: 12px;
  color: var(--wp--preset--color--accent); font-size: 14px; cursor: pointer;
}
.aqua-news-toggle:hover { color: var(--wp--preset--color--accent-bright); }

/* ==========================================================================
   Footer
   ========================================================================== */
.aqua-footer {
  background: var(--wp--preset--color--footer-bg);
  color: rgba(255, 255, 255, .88);
}
.aqua-footer a { color: rgba(255, 255, 255, .88); }
.aqua-footer a:hover { color: #fff; }
.aqua-footer-inner { max-width: 1100px; margin: 0 auto; padding: 64px 24px 40px; }
.aqua-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 600px) {
  .aqua-footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.aqua-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.aqua-footer-social { display: flex; gap: 12px; margin-top: 24px; }
.aqua-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}
.aqua-social-icon svg { width: 18px; height: 18px; fill: #fff; }
.aqua-social-icon:hover { background: var(--wp--preset--color--accent-bright); }
.aqua-social-icon:hover svg { fill: var(--wp--preset--color--footer-bg); }
.aqua-footer-links {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.aqua-footer-links-label { font-size: 13px; color: rgba(255, 255, 255, .62); margin: 0; }
.aqua-footer-links-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.aqua-footer-links-row a {
  display: block;
  background: #fff;
  color: var(--wp--preset--color--accent) !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 5px;
}
.aqua-footer-links-row a:hover { color: var(--wp--preset--color--accent-bright) !important; }
.aqua-footer-bottom {
  margin-top: 24px;
  font-size: 13px; color: rgba(255, 255, 255, .62);
}

/* ==========================================================================
   Contact Form 7 — match the site's input/button look (CF7 ships with no
   styling of its own beyond layout-neutral markup).
   ========================================================================== */
.wpcf7-form p { margin: 0 0 20px; }
.wpcf7-form label { display: block; font-size: 14px; }
.wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7-form .wpcf7-form-control {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 13px 16px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
  background: #fff;
  color: var(--wp--preset--color--ink);
  box-sizing: border-box;
}
.wpcf7-form textarea.wpcf7-form-control { resize: vertical; }
.wpcf7-form input[type="submit"] {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--wp--preset--color--accent-strong);
  border: none;
  padding: 13px 36px;
  border-radius: 6px;
  cursor: pointer;
}
.wpcf7-form input[type="submit"]:hover { background: #2596a4; }
.wpcf7-response-output {
  margin: 20px 0 0;
  padding: 13px 16px;
  border-radius: 6px;
  font-size: 14px;
}

/* ==========================================================================
   Reveal-on-scroll (optional, matches original design's fade-up)
   ========================================================================== */
[data-aqua-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1);
}
[data-aqua-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-aqua-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
