/*
 * Yamabuki Lab Fixed Pages Design v1.1
 * DADS-inspired hierarchy, spacing and accessibility; original implementation.
 */

:root {
  --yl-yellow: #F8B500;
  --yl-yellow-hover: #E9AA00;
  --yl-yellow-soft: #FFF6D8;
  --yl-blue: #A0D8EF;
  --yl-blue-soft: #EAF7FC;
  --yl-ink: #1A1A1A;
  --yl-ink-2: #3F4650;
  --yl-muted: #65707D;
  --yl-line: #D9DEE5;
  --yl-line-strong: #BCC5CF;
  --yl-surface: #FFFFFF;
  --yl-surface-soft: #F7F9FB;
  --yl-focus: #005FCC;
  --yl-container: 1180px;
  --yl-page-width: 900px;
  --yl-radius-md: 16px;
}

/* Replace Cocoon chrome only on standard fixed pages. */
.page:not(.home) #header-container,
.page:not(.home) .header-container,
.page:not(.home) #footer,
.page:not(.home) .footer,
.page:not(.home) #sidebar,
.page:not(.home) .sidebar,
.page:not(.home) .mobile-footer-menu-buttons,
.page:not(.home) #mobile-footer-menu-buttons {
  display: none !important;
}

.page:not(.home) .content-in,
.page:not(.home) .main,
.page:not(.home) #main,
.page:not(.home) #content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.page:not(.home) {
  background: var(--yl-surface-soft);
}

.yl-fixed-pages-v1,
.yl-fixed-pages-v1 * {
  box-sizing: border-box;
}

.yl-fixed-pages-v1 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--yl-ink);
  background: var(--yl-surface-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
}

.admin-bar .yl-fixed-pages-v1 {
  min-height: calc(100vh - 32px);
}

.yl-fixed-pages-v1 #yl-fixed-page-main {
  flex: 1 0 auto;
}

.yl-fixed-pages-v1 a:focus-visible,
.yl-fixed-pages-v1 button:focus-visible,
.yl-fixed-pages-v1 input:focus-visible,
.yl-fixed-pages-v1 textarea:focus-visible,
.yl-fixed-pages-v1 select:focus-visible {
  outline: 3px solid var(--yl-focus) !important;
  outline-offset: 3px;
}

.yl-site-container {
  width: min(calc(100% - 40px), var(--yl-container));
  margin-inline: auto;
}

.yl-fixed-page-container {
  width: min(calc(100% - 40px), var(--yl-page-width));
  margin-inline: auto;
}

/* Header */
.yl-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--yl-line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}

.admin-bar .yl-site-header {
  top: 32px;
}

.yl-site-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.yl-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--yl-ink) !important;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none !important;
  white-space: nowrap;
}

.yl-brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yl-yellow);
  color: var(--yl-ink);
  font-weight: 900;
  line-height: 1;
}

.yl-brand__name {
  font-size: 1.15rem;
}

.yl-global-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: .94rem;
  font-weight: 700;
}

.yl-global-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--yl-ink) !important;
  text-decoration: none !important;
}

.yl-global-nav a:hover {
  border-bottom-color: var(--yl-yellow);
}

/* Hero */
.yl-fixed-page-hero {
  padding: 48px 0 44px;
  border-bottom: 1px solid #E8ECF1;
  background:
    radial-gradient(circle at 88% 18%, rgba(160,216,239,.30), transparent 25%),
    linear-gradient(120deg, #FFFFFF 0%, #FFFDF6 56%, #F2FAFD 100%);
}

.yl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--yl-muted);
  font-size: .78rem;
}

.yl-breadcrumb a {
  color: #315F77 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yl-eyebrow {
  margin: 0 0 12px;
  color: #6B5100;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.yl-fixed-page-hero h1 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--yl-ink) !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 900 !important;
  letter-spacing: -.035em;
  line-height: 1.3;
}

.yl-fixed-page-hero h1::before,
.yl-fixed-page-hero h1::after {
  display: none !important;
}

.yl-fixed-page-lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--yl-ink-2);
  font-size: 1rem;
  line-height: 1.9;
}

/* Reading card */
.yl-fixed-page-section {
  padding: 52px 0 88px;
}

.yl-fixed-page-card {
  padding: 42px 48px;
  border: 1px solid var(--yl-line);
  border-radius: var(--yl-radius-md);
  background: #fff;
  color: var(--yl-ink-2);
  font-size: 1rem;
  line-height: 1.95;
}

.yl-fixed-page-card > *:first-child {
  margin-top: 0 !important;
}

.yl-fixed-page-card > *:last-child {
  margin-bottom: 0 !important;
}

.yl-fixed-page-card p,
.yl-fixed-page-card ul,
.yl-fixed-page-card ol,
.yl-fixed-page-card blockquote,
.yl-fixed-page-card table,
.yl-fixed-page-card .wp-block-table,
.yl-fixed-page-card .wpcf7 {
  margin-top: 0;
  margin-bottom: 26px;
}

.yl-fixed-page-card h2 {
  margin: 52px 0 20px !important;
  padding: 0 0 0 15px !important;
  border: 0 !important;
  border-left: 5px solid var(--yl-yellow) !important;
  background: transparent !important;
  color: var(--yl-ink) !important;
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  line-height: 1.5;
}

.yl-fixed-page-card h3 {
  margin: 36px 0 16px !important;
  padding: 0 0 9px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--yl-line) !important;
  background: transparent !important;
  color: var(--yl-ink) !important;
  font-size: 1.22rem !important;
  font-weight: 850 !important;
}

.yl-fixed-page-card h4 {
  margin: 28px 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--yl-ink) !important;
  font-size: 1.05rem !important;
  font-weight: 850 !important;
}

.yl-fixed-page-card h2::before,
.yl-fixed-page-card h2::after,
.yl-fixed-page-card h3::before,
.yl-fixed-page-card h3::after,
.yl-fixed-page-card h4::before,
.yl-fixed-page-card h4::after {
  display: none !important;
}

.yl-fixed-page-card a {
  color: #245F7B;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.yl-fixed-page-card ul,
.yl-fixed-page-card ol {
  padding-left: 1.5em;
}

.yl-fixed-page-card li + li {
  margin-top: 7px;
}

.yl-fixed-page-card blockquote {
  padding: 18px 20px;
  border-left: 5px solid var(--yl-yellow);
  border-radius: 0 10px 10px 0;
  background: #FFF9E8;
}

.yl-fixed-page-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.yl-fixed-page-card th,
.yl-fixed-page-card td {
  padding: 12px 14px;
  border: 1px solid var(--yl-line);
  text-align: left;
  vertical-align: top;
}

.yl-fixed-page-card th {
  background: #F3F6F8;
  color: var(--yl-ink);
  font-weight: 800;
}

/* Fixed-page TOC: section numbers are part of the heading text, so hide Cocoon's list numbering. */
.yl-fixed-page-card .toc ol,
.yl-fixed-page-card .toc ul,
.yl-fixed-page-card #toc ol,
.yl-fixed-page-card #toc ul {
  list-style: none !important;
}

.yl-fixed-page-card .toc > ol,
.yl-fixed-page-card .toc > ul,
.yl-fixed-page-card #toc > ol,
.yl-fixed-page-card #toc > ul,
.yl-fixed-page-card .toc-content > ol,
.yl-fixed-page-card .toc-content > ul,
.yl-fixed-page-card .toc_content > ol,
.yl-fixed-page-card .toc_content > ul {
  padding-left: 0 !important;
}

.yl-fixed-page-card .toc li::before,
.yl-fixed-page-card .toc li::marker,
.yl-fixed-page-card #toc li::before,
.yl-fixed-page-card #toc li::marker {
  content: none !important;
  display: none !important;
}

.yl-fixed-page-card .toc li,
.yl-fixed-page-card #toc li {
  list-style: none !important;
}

/* Contact Form 7 */
.yl-fixed-page-card .wpcf7-form p {
  margin-bottom: 20px;
}

.yl-fixed-page-card .wpcf7-form label {
  display: block;
  color: var(--yl-ink);
  font-weight: 800;
}

.yl-fixed-page-card input[type="text"],
.yl-fixed-page-card input[type="email"],
.yl-fixed-page-card input[type="url"],
.yl-fixed-page-card input[type="tel"],
.yl-fixed-page-card input[type="search"],
.yl-fixed-page-card select,
.yl-fixed-page-card textarea {
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--yl-line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--yl-ink);
  font: inherit;
  line-height: 1.6;
}

.yl-fixed-page-card textarea {
  min-height: 180px;
  resize: vertical;
}

.yl-fixed-page-card input[type="submit"],
.yl-fixed-page-card button[type="submit"] {
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid var(--yl-yellow);
  border-radius: 10px;
  background: var(--yl-yellow);
  color: var(--yl-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.yl-fixed-page-card input[type="submit"]:hover,
.yl-fixed-page-card button[type="submit"]:hover {
  background: var(--yl-yellow-hover);
}

.yl-fixed-page-card .wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #9A2B24;
  font-size: .85rem;
}

.yl-fixed-page-card .wpcf7-response-output {
  margin: 20px 0 0 !important;
  padding: 14px 16px !important;
  border-radius: 9px;
}

/* Footer */
.yl-custom-footer {
  flex: 0 0 auto;
  padding: 48px 0 22px;
  background: #20262D;
  color: #E8EDF2;
}

.yl-custom-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: start;
}

.yl-custom-footer__brand {
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 900;
}

.yl-custom-footer p {
  margin: 0;
  color: #C8D0D8;
}

.yl-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  font-size: .85rem;
  font-weight: 700;
}

.yl-footer-nav a {
  color: #F2F5F7 !important;
  text-decoration: none !important;
}

.yl-footer-nav a:hover {
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.yl-custom-footer__bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #AEB8C2;
  font-size: .78rem;
}

.yl-page-links {
  margin-top: 38px;
}

@media (max-width: 782px) {
  .admin-bar .yl-site-header {
    top: 46px;
  }

  .admin-bar .yl-fixed-pages-v1 {
    min-height: calc(100vh - 46px);
  }
}

@media (max-width: 720px) {
  .yl-site-container,
  .yl-fixed-page-container {
    width: min(calc(100% - 28px), var(--yl-container));
  }

  .yl-site-header__inner {
    min-height: 52px;
    gap: 14px;
  }

  .yl-brand {
    gap: 8px;
  }

  .yl-brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: .78rem;
  }

  .yl-brand__name {
    font-size: .94rem;
  }

  .yl-global-nav {
    display: none;
  }

  .yl-fixed-page-hero {
    padding: 34px 0 32px;
  }

  .yl-breadcrumb {
    margin-bottom: 20px;
  }

  .yl-fixed-page-hero h1 {
    font-size: clamp(1.8rem, 8.3vw, 2.45rem) !important;
  }

  .yl-fixed-page-section {
    padding: 30px 0 60px;
  }

  .yl-fixed-page-card {
    padding: 24px 20px;
    border-radius: 12px;
    font-size: .98rem;
  }

  .yl-fixed-page-card h2 {
    margin-top: 42px !important;
    font-size: 1.42rem !important;
  }

  .yl-fixed-page-card h3 {
    margin-top: 30px !important;
    font-size: 1.15rem !important;
  }

  .yl-custom-footer__grid {
    grid-template-columns: 1fr;
  }

  .yl-footer-nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yl-fixed-pages-v1 *,
  .yl-fixed-pages-v1 *::before,
  .yl-fixed-pages-v1 *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
