/*
Theme Name: APPLE loves BLUE
Theme URI: http://www.aoi-jam.jp
Author: Brachio Design
Description: 青い森の天然青色りんごジャム専用LP WordPressテーマ。カスタマイザーで全セクションの表示/非表示、テキスト、画像を変更可能。
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: apple-loves-blue
*/

:root {
  --blue-deep: #1a3a5c;
  --blue-primary: #2d5a87;
  --blue-light: #4a7fb3;
  --blue-pale: #e8f1f8;
  --blue-mist: #f4f8fb;
  --gold: #c9a962;
  --cream: #fdfbf7;
  --text: #2c3e4a;
  --text-light: #5a6d7a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
  background: var(--cream);
  overflow-x: hidden;
  padding-bottom: calc(72px + var(--safe-bottom));
}

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

a {
  -webkit-tap-highlight-color: transparent;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-primary) 100%);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(26, 58, 92, 0.3);
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-logo .logo-image {
  height: 40px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.nav-links {
  display: none;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--blue-deep);
  flex-direction: column;
  padding: 1rem 1.25rem 2rem;
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-links.active { display: flex; }

.nav-links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-links a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: white;
  font-size: 1rem;
}

/* ===== HERO ===== */
.hero-section {
  padding-top: 120px;
  padding-bottom: 2.5rem;
  padding-left: 0;
  padding-right: 0;
  background: linear-gradient(180deg, var(--blue-mist) 0%, var(--cream) 100%);
  text-align: center;
}

.hero-inner {
  display: block;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.hero-text {
  display: block;
}

.hero-image {
  margin-bottom: 1.5rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
}

.hero-image img {
  width: 100%;
  max-width: 100%;
  border-radius: 0;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--blue-deep);
  color: white;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.875rem;
}

.hero-section h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--blue-deep);
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

.hero-section h1 small {
  display: block;
  font-size: 0.6rem;
  color: var(--text-light);
  letter-spacing: 0.12em;
  margin-top: 0.5rem;
  font-weight: 400;
}

.hero-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  min-height: 52px;
  background: var(--blue-primary);
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  text-align: center;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:active {
  transform: scale(0.98);
  background: var(--blue-deep);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--blue-primary);
  color: var(--blue-primary);
}

.btn-outline:active {
  background: var(--blue-pale);
}

.btn-gold {
  background: var(--gold);
  color: var(--blue-deep);
  font-weight: 500;
}

.btn-gold:active {
  background: #b89952;
}

/* ===== SECTIONS COMMON ===== */
.lp-section {
  padding: 3rem 1.25rem;
}

.section-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--blue-light);
  margin-bottom: 0.4rem;
  display: block;
}

.section-header h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 0.625rem;
  line-height: 1.4;
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== STORY ===== */
.story-section {
  background: white;
}

.story-content {
  display: block;
}

.story-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--blue-pale) 0%, var(--blue-mist) 100%);
  margin-bottom: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-text h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  color: var(--blue-deep);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.story-text p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.story-text p:last-child {
  margin-bottom: 0;
}

/* ===== FEATURES ===== */
.features-section {
  background: var(--blue-mist);
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-card {
  background: white;
  padding: 1.5rem 1.25rem;
  border-radius: 4px;
}

.feature-card h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  color: var(--blue-deep);
  margin-bottom: 0.625rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* ===== PRODUCT ===== */
.product-section {
  background: white;
}

.product-showcase {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-primary) 100%);
  padding: 1.5rem;
  border-radius: 6px;
  color: white;
}

.product-image {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.product-info > p {
  font-size: 0.85rem;
  opacity: 0.8;
}

.product-price {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.875rem 0;
}

.product-price span {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
}

.product-details {
  list-style: none;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.7;
}

.product-details li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== RECIPE ===== */
.recipe-section {
  background: linear-gradient(180deg, #c5e8e8 0%, #daf3f3 50%, #eefafa 100%);
}

.recipe-section .section-header h2 {
  color: var(--blue-primary);
}

.recipe-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recipe-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  border-radius: 4px;
}

.recipe-card h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  color: #00a0c6;
  text-align: center;
  margin-bottom: 0.875rem;
}

.recipe-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--blue-pale);
  margin-bottom: 0.875rem;
  border-radius: 4px;
  overflow: hidden;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-card p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.75;
}

/* ===== INSTAGRAM ===== */
.instagram-section {
  background: var(--cream);
}

.instagram-section .section-header,
.instagram-widget,
.instagram-grid,
.instagram-follow {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.instagram-widget {
  margin-bottom: 1.25rem;
  min-height: 200px;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.instagram-item {
  aspect-ratio: 1;
  background: var(--blue-pale);
  overflow: hidden;
}

.instagram-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--blue-light);
}

.instagram-follow {
  text-align: center;
}

.instagram-follow a {
  color: var(--blue-primary);
  text-decoration: none;
  font-size: 0.85rem;
}

/* ===== COMPANY ===== */
.company-section {
  background: var(--blue-mist);
}

.company-content {
  display: block;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  display: block;
  text-align: left;
}

.company-table th {
  padding: 0.875rem 0 0.25rem;
  font-weight: 500;
  color: var(--blue-deep);
  font-size: 0.8rem;
}

.company-table td {
  padding: 0.25rem 0 0.875rem;
  color: var(--text);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(45, 90, 135, 0.1);
}

.company-table td a {
  color: var(--blue-primary);
  text-decoration: none;
}

/* ===== CONTACT ===== */
.contact-section {
  background: var(--blue-deep);
  color: white;
}

.contact-section .section-header h2 {
  color: white;
}

.contact-section .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.contact-section .section-label {
  color: var(--gold);
}

.contact-form {
  max-width: 100%;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.9);
}

.form-group .required {
  color: var(--gold);
  margin-left: 0.2rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.9rem 1rem;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: white;
  font-family: inherit;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.15);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--blue-deep);
  color: white;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  margin-top: 1.5rem;
}

.btn-submit {
  width: 100%;
  background: var(--gold);
  color: var(--blue-deep);
  font-weight: 500;
}

.form-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0f2538;
  color: rgba(255, 255, 255, 0.6);
  padding: 2.5rem 1.25rem 1.5rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  color: white;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-logo-image {
  height: 40px;
  width: auto;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.8rem;
}

.site-footer .copyright {
  font-size: 0.7rem;
}

/* ===== FIXED CTA ===== */
.fixed-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.75rem + var(--safe-bottom));
  background: rgba(253, 251, 247, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 12px rgba(26, 58, 92, 0.1);
  z-index: 99;
}

.fixed-cta .btn {
  flex: 1;
  padding: 0.8rem 0.5rem;
  font-size: 0.85rem;
  min-height: 48px;
}

.btn-tel {
  background: white;
  color: var(--blue-deep);
  border: 1px solid var(--blue-deep);
}

/* ===== PAGETOP ===== */
.pagetop {
  position: fixed;
  right: 1rem;
  bottom: 90px;
  width: 44px;
  height: 44px;
  background: var(--blue-primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  z-index: 98;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2);
}

.pagetop.visible {
  opacity: 1;
  visibility: visible;
}

.pagetop:active {
  background: var(--blue-deep);
}

.pagetop svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 900px) {
  .pagetop {
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
  }
  
  .pagetop:hover {
    background: var(--blue-deep);
  }
}

/* ===== ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== TABLET (min-width: 600px) ===== */
@media (min-width: 600px) {
  .hero-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .hero-image {
    margin-left: 0;
    margin-right: 0;
  }
  
  .hero-image img {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgba(26, 58, 92, 0.2);
  }
  
  .hero-section h1 { font-size: 1.75rem; }
  .section-header h2 { font-size: 1.5rem; }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .instagram-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ===== DESKTOP (min-width: 900px) ===== */
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .nav-toggle { display: none; }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    gap: 2rem;
    background: transparent;
  }

  .nav-links li {
    border-bottom: none;
  }

  .nav-links a {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s;
  }

  .nav-links a:hover {
    color: white;
  }

  .site-header {
    padding: 1rem 2rem;
  }

  .site-logo {
    font-size: 1.1rem;
  }

  .site-logo .logo-image {
    height: 44px;
  }

  .lp-section {
    padding: 5rem 2rem;
  }

  .hero-section {
    padding: 120px 2rem 4rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    width: 100%;
    text-align: left;
  }

  .hero-text {
    order: 1;
  }

  .hero-image {
    order: 2;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-image img {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgba(26, 58, 92, 0.2);
  }

  .hero-section h1 {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }

  .hero-buttons .btn {
    padding: 1rem 2rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .story-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
  }

  .story-image {
    margin-bottom: 0;
    aspect-ratio: 4/5;
  }

  .story-text h3 {
    font-size: 1.5rem;
  }

  .features-grid,
  .recipe-grid {
    max-width: 900px;
    margin: 0 auto;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
  }

  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(26, 58, 92, 0.1);
  }

  .product-showcase {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
  }

  .product-image {
    margin-bottom: 0;
  }

  .recipe-card {
    transition: transform 0.3s, box-shadow 0.3s;
  }

  .recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(45, 90, 135, 0.15);
  }

  .instagram-grid {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    gap: 0.5rem;
  }

  .contact-form {
    max-width: 600px;
    margin: 0 auto;
  }

  .company-content {
    max-width: 700px;
    margin: 0 auto;
  }

  .company-table th,
  .company-table td {
    display: table-cell;
    padding: 1rem 1.25rem;
    vertical-align: top;
  }

  .company-table th {
    width: 140px;
    background: rgba(45, 90, 135, 0.05);
    border-bottom: 1px solid rgba(45, 90, 135, 0.1);
  }

  .fixed-cta {
    display: none;
  }

  .site-footer {
    padding: 3rem 2rem 2rem;
  }
}

/* ===== LARGE DESKTOP (min-width: 1200px) ===== */
@media (min-width: 1200px) {
  .hero-section h1 {
    font-size: 2.75rem;
  }

  .hero-inner {
    gap: 4rem;
  }
}

/* ===== WordPress Admin Bar対応 ===== */
.admin-bar .site-header {
  top: 32px;
}

.admin-bar .nav-links {
  top: 90px;
}

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