/*
Theme Name: EAF Theme
Theme URI: https://eaf.thebridge.jp
Author: THE BRIDGE, Inc.
Author URI: https://thebridge.jp
Description: Enable AI Foundry official website theme
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: eaf
*/

/* ==========================================
   Enable AI Foundry - WordPress Theme CSS
   Mobile-first, beige theme, Nunito font
   ========================================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #222;
  background: #ebeae5;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   Shared
   ========================================== */
.section-divider {
  max-width: 720px;
  margin: 0 auto 32px;
  border-top: 2px dotted #d5d4cf;
}

/* ==========================================
   Header
   ========================================== */
.header {
  position: sticky;
  top: 0;
  background: rgba(235, 234, 229, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #d5d4cf;
  z-index: 100;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 24px;
  width: auto;
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 1px;
  transition: transform 0.2s;
}

/* Nav */
.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ebeae5;
  border-bottom: 1px solid #d5d4cf;
  padding: 12px 20px;
}

.nav.open {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav a {
  color: #4A4A4A;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0;
}

.nav a:hover {
  color: #251086;
}

.nav-active {
  color: #251086 !important;
}

/* ==========================================
   Hero
   ========================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #251086 0%, #3a1ca8 40%, #72DDC3 100%);
  padding: 56px 20px 48px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: rgba(114, 221, 195, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -30px;
  width: 160px;
  height: 160px;
  background: rgba(255, 0, 70, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-tagline {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  text-align: left;
}

/* ==========================================
   Email Signup
   ========================================== */
.signup {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.signup-card {
  background: #fff;
  border: 1px solid #d5d4cf;
  border-radius: 12px;
  padding: 24px;
}

.signup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
}

.section-icon {
  width: 22px;
  height: 22px;
  color: #251086;
}

.signup-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4A4A4A;
  margin-bottom: 8px;
}

.signup-input-group {
  display: flex;
  gap: 8px;
}

.signup-input-group input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  border: 1px solid #d5d4cf;
  border-radius: 8px;
  outline: none;
  background: #f9f9f7;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-input-group input:focus {
  border-color: #251086;
  box-shadow: 0 0 0 3px rgba(37, 16, 134, 0.12);
}

.signup-input-group button {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  color: #fff;
  background: #251086;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.signup-input-group button:hover {
  background: #1a0b60;
}

.signup-input-group button:active {
  transform: scale(0.98);
}

/* ==========================================
   About
   ========================================== */
.about {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px;
  text-align: center;
}

.about-icon-wrap {
  margin-bottom: 16px;
}

.about-logo {
  width: 64px;
  height: auto;
  opacity: 0.7;
}

.about h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4A4A4A;
  margin-bottom: 16px;
}

.about > p {
  font-size: 0.95rem;
  color: #222;
  line-height: 2;
  text-align: left;
}

/* ==========================================
   5 Domains
   ========================================== */
.domains {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
  text-align: center;
}

.domains h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4A4A4A;
  text-align: center;
  margin-bottom: 24px;
}

.domains-image-wrap {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}

.domains-image {
  width: 100%;
  height: auto;
  display: block;
}

.domains-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.domain-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #d5d4cf;
  border-radius: 10px;
}

.domain-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ebeae5;
}

.domain-icon {
  width: 22px;
  height: 22px;
  color: #251086;
}

.domain-body {
  flex: 1;
  min-width: 0;
}

.domain-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #222;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.domain-desc {
  display: block;
  font-size: 0.8rem;
  color: #686868;
  line-height: 1.4;
}

/* ==========================================
   Bases
   ========================================== */
.bases {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
  text-align: center;
}

.bases h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4A4A4A;
  text-align: center;
  margin-bottom: 16px;
}

.bases-lead {
  font-size: 0.95rem;
  color: #222;
  line-height: 1.9;
  margin-bottom: 24px;
}

.bases-image-wrap {
  border-radius: 12px;
  overflow: hidden;
}

.bases-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   Links
   ========================================== */
.links {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #d5d4cf;
  border-radius: 12px;
  text-decoration: none;
  color: #222;
  transition: background 0.2s, box-shadow 0.2s;
}

.link-card:hover {
  background: #f5f5f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.link-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-icon-blue { background: #e8e0f7; }
.link-icon-blue .link-icon { color: #251086; }
.link-icon-red { background: #ffe0ea; }
.link-icon-red .link-icon { color: #FF0046; }

.link-icon {
  width: 22px;
  height: 22px;
}

.link-body {
  flex: 1;
  min-width: 0;
}

.link-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.link-desc {
  display: block;
  font-size: 0.8rem;
  color: #686868;
  line-height: 1.4;
}

.link-arrow {
  width: 18px;
  height: 18px;
  color: #bbb;
  flex-shrink: 0;
}

/* ==========================================
   Notice
   ========================================== */
.notice {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.notice p {
  font-size: 0.8rem;
  color: #686868;
  line-height: 1.8;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px dashed #aaa;
  text-align: center;
}

.footer-logo {
  width: 120px;
  height: auto;
  margin-bottom: 16px;
}

.footer-links {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.85rem;
  color: #4A4A4A;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 0.75rem;
  color: #999;
}

/* ==========================================
   Page Header (News etc.)
   ========================================== */
.page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #251086 0%, #3a1ca8 40%, #72DDC3 100%);
  padding: 40px 20px 36px;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(114, 221, 195, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.page-header-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   News List
   ========================================== */
.news-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-card {
  background: #fff;
  border: 1px solid #d5d4cf;
  border-radius: 12px;
  overflow: hidden;
}

.news-card-image {
  display: block;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
  transform: scale(1.03);
}

.news-card-body {
  padding: 20px 24px 24px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.news-meta time {
  font-size: 0.8rem;
  color: #686868;
  font-weight: 600;
}

.news-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #251086;
  background: #e8e0f7;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.news-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
}

.news-title a {
  color: #222;
  text-decoration: none;
}

.news-title a:hover {
  color: #251086;
}

.news-excerpt {
  font-size: 0.9rem;
  color: #4A4A4A;
  line-height: 1.8;
  margin-bottom: 16px;
}

.news-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #251086;
  text-decoration: none;
}

.news-readmore:hover {
  text-decoration: underline;
}

.news-readmore-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================
   Article Single
   ========================================== */
.article-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #251086 0%, #3a1ca8 40%, #72DDC3 100%);
  padding: 32px 20px 36px;
}

.article-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(114, 221, 195, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.article-header-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 20px;
}

.article-back:hover { color: #fff; }

.article-back-icon {
  width: 16px;
  height: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.article-meta time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.article-meta .news-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.article-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
}

/* Article Cover Image */
.article-cover {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  margin-top: -8px;
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 12px 12px;
}

.article-cover-caption {
  font-size: 0.8rem;
  color: #686868;
  line-height: 1.6;
  margin-top: 10px;
  padding-left: 12px;
  border-left: 3px solid #d5d4cf;
}

/* Article Body */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.article-body p {
  font-size: 0.95rem;
  color: #222;
  line-height: 2;
  margin-bottom: 24px;
}

.article-body h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
  line-height: 1.5;
  margin-top: 40px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ebeae5;
}

.article-body a {
  color: #251086;
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 28px 0;
}

.article-body figure {
  margin: 28px 0;
}

.article-body figure img {
  margin: 0;
}

.article-body figcaption {
  font-size: 0.8rem;
  color: #686868;
  line-height: 1.6;
  margin-top: 10px;
  padding-left: 12px;
  border-left: 3px solid #d5d4cf;
}

.article-body blockquote {
  font-size: 0.9rem;
  color: #4A4A4A;
  line-height: 1.9;
  margin: 24px 0;
  padding: 20px 24px;
  background: #f5f5f0;
  border-left: 4px solid #251086;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
}

/* Article Source */
.article-source {
  margin-top: 40px;
  padding: 16px 20px;
  background: #f5f5f0;
  border: 1px solid #d5d4cf;
  border-radius: 8px;
}

.article-source p {
  font-size: 0.85rem !important;
  color: #686868 !important;
  margin-bottom: 0 !important;
}

/* Article Footer Nav */
.article-footer-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.article-back-bottom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #251086;
  text-decoration: none;
  padding: 12px 20px;
  background: #f5f5f0;
  border: 1px solid #d5d4cf;
  border-radius: 8px;
  transition: background 0.2s;
}

.article-back-bottom:hover {
  background: #ebeae5;
}

/* ==========================================
   Desktop (768px+)
   ========================================== */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav {
    display: flex;
    position: static;
    background: none;
    border: none;
    padding: 0;
    gap: 24px;
  }

  .hero {
    padding: 80px 20px 64px;
  }

  .hero::before {
    width: 380px;
    height: 380px;
    top: -120px;
    right: -80px;
  }

  .hero::after {
    width: 220px;
    height: 220px;
  }

  .hero-tagline {
    font-size: 2.5rem;
  }

  .hero-lead {
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
  }

  .signup-input-group input {
    max-width: 400px;
  }

  .domains-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .about h2,
  .domains h2,
  .bases h2 {
    font-size: 1.8rem;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-body h2 {
    font-size: 1.4rem;
  }
}
