/* css/style.css */

/* 一時 */

/* ここから */
:root {
  --dark-color: #333;
  --dark-gray-color: #555;
  --light-gray-color: #ccc;
  --light-color: #f4f4f4;
  --color-primary: #4caf50;
  --color-secondary: #ffc107;
  --color-feature-icon: #15A0F6;
  --color-link: #369;
  --color-link-hover: #49b;
  --color-link-on-dark: #8bd;
  --color-link-on-dark-hover: #ace;
  --color-text-default: #333;
  --color-bg-white: #fff;
  --color-bg-black: #000;
  --color-bg-base: #f4f4f4;
  --bxsh-1: 0 0 4px rgb(0 0 0 / .25);
  --ff-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --ff-pixel: "Press Start 2P", cursive;
}

@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

body {
  font-family: var(--ff-sans-serif);
  line-height: 1.75;
  color: var(--color-text-default);
  margin: 0;
  padding: 0;
  background-color: #fff;
  word-break: auto-phrase;
}

body.no-scroll {
  overflow: hidden;
}

.container {
  width: 90%;
  /* Default width */
  max-width: 1100px;
  /* Max width for larger screens */
  margin: 0 auto;
  padding: 0 10px;
  /* Reduced base padding */
  box-sizing: border-box;
}

/* Adjust container padding for very small screens (320px range) */
@media (max-width: 400px) {
  .container {
    padding: 0 8px;
    /* Further reduced padding for very narrow screens */
  }
}

h1,
h2,
h3 {
  margin-bottom: 0.8em;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.2em;
  font-weight: 600;
}

p {
  margin-bottom: 1em;
  font-size: 1rem;
}

a:not(.btn) {
  color: var(--color-link);
  text-decoration: none;

  &:hover {
    color: var(--color-link-hover);
  }
}

.bg-dark a:not(.btn) {
  color: var(--color-link-on-dark);
  text-decoration: none;

  &:hover {
    color: var(--color-link-on-dark-hover);
  }
}

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

/* Header */
header {
  background: var(--dark-color);
  color: #fff;
  padding: 0.8rem 0;
  /* Slightly reduced padding */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
  /* Specific class for header's container */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  image-rendering: pixelated;
  margin-inline-end: 12px;

  & a {
    &:hover {
      filter: brightness(1.1) saturate(1.2);
    }
  }
}

/* Desktop Navigation */
.desktop-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.desktop-nav ul li {
  margin-left: 18px;
}

.desktop-nav ul li a:not(.btn) {
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.desktop-nav ul li a:not(.btn):hover {
  color: var(--light-gray-color);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1010;
  /* Above mobile nav background */
}

.hamburger-menu[aria-expanded="true"] {
  display: block;
  /* Menu might be open in desktop if window size changed. If that's the case, show button. So that user can close menu */
}

.hamburger-menu[aria-expanded="true"] .hamburger-menu__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] .hamburger-menu__line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu[aria-expanded="true"] .hamburger-menu__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger-menu__line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(33, 33, 33, 0.98);
  /* Slightly transparent dark */
  z-index: 1005;
  /* Below hamburger, above content */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-nav.active {
  transform: translateX(0);
  display: flex;
  /* Show when active */
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.mobile-nav ul li {
  margin: 20px 0;
}

.mobile-nav ul li a:not(.btn) {
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
  padding: 10px 20px;
  display: block;
  transition: color 0.3s ease;
}

.mobile-nav ul li a:not(.btn):hover {
  color: var(--light-gray-color);
}

.mobile-nav ul li .btn {
  /* Style for button inside mobile nav */
  font-size: 1.2rem;
  padding: 12px 30px;
}

/* Utilities */
.sp-only {
  display: none;
}

/* Buttons (general styles, can be overridden) */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  background: transparent;
  color: var(--color-text-default);
  border: 1px solid currentColor;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
}

:where(.bg-dark) .btn {
  color: var(--light-color);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

header .btn-secondary {
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  padding: 7px 15px;

}

header .btn-secondary:hover {
  background-color: var(--color-secondary);
  color: var(--dark-color);
}

.btn-large {
  font-size: 1.1rem;
  padding: 12px 30px;
}

/* Hero Section */
#hero {
  /* ... existing hero styles ... */
  padding: 60px 0;

  min-height: auto;
  /* Adjust if needed */
}

#hero h1 {
  font-size: 2.8rem;
}

#hero .subtitle {
  font-size: 1.2rem;
}

#hero .hero-image {}

#hero .hero-image img {
  height: 400px;
  margin: 0 auto;
  position: relative;
}

/* Section common styles */
.section {
  padding: 50px 0;

}

/* ... (bg-light, bg-dark styles remain the same) ... */
.bg-light {
  background-color: var(--light-color);
}

.bg-dark {
  background-color: var(--dark-color);
  color: #fff;
}

.bg-dark h2 {
  color: #fff;
}

.bg-dark p {
  color: #f0f0f0;
}

.bg-dark a:not(.btn) {
  color: var(--color-secondary);
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, calc(25% - 20px * 3 / 4));
  gap: 20px;
  margin-top: 30px;
  text-align: center;
}

.feature-item {
  padding: 20px;
  border-radius: 4px;
  box-shadow: var(--bxsh-1);
}

.feature-icon {
  color: #15A0F6;
  font-size: 100px;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 1.4rem;
}

/* How-to Section */
.steps-container {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.step-item {
  padding: 20px;
  border-radius: 4px;
  box-shadow: var(--bxsh-1);
}

.step-number {
  width: 45px;
  height: 45px;
  font-size: 1.3rem;
}

.step-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin: 15px auto 12px;
}

.step-item h3 {
  font-size: 1.2rem;
}

/* CTA Section */
#cta {
  text-align: center;
}

#cta h2 {
  font-size: 2.2rem;
}

#cta p {
  text-align: center;
  font-size: 1.1rem;
}

#cta .btn {}

/* Footer */
footer {
  padding: 18px 0;
  font-size: 0.85rem;
}



/* Responsive Header (Hamburger Menu) */
/* Breakpoint for hamburger menu (e.g., 768px, adjust as needed) */
/* This should match the new tablet breakpoint or be slightly below desktop */
@media (max-width: 833px) {

  /* General mobile styles */
  h1 {
    font-size: 2rem;
  }

  #hero h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  /* Show hamburger if screen is less than desktop breakpoint */
  .desktop-nav {
    display: none;
  }

  .hamburger-menu {
    display: block;
  }

  .features-grid {
    grid-template-columns: repeat(2, calc(50% - 20px / 2));
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
  }

  .step-item {
    width: 90%;
    max-width: 350px;
  }

  .sp-only {
    display: none;
  }

  .pc-only {
    display: none;
  }
}

@media (max-width: 580px) {
  #hero h1 {
    font-size: 1.8rem;
  }

  #hero .subtitle {
    font-size: 1rem;
  }

  .hamburger-menu {
    margin-block: -8px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .btn-large {
    font-size: 1rem;
    padding: 10px 25px;
  }

  .sp-only {
    display: revert;
  }

  .pc-only {
    display: none;
  }
}

& .faq-item {
  margin-block: 15px;
  box-shadow: var(--bxsh-l1);
  border-radius: 8px;
  color: var(--color-text-default);

  & .faq-item-question {
    display: block grid;
    grid-template: "Q . icon" / max-content 1fr max-content;
    align-items: center;
    column-gap: 8px;
    padding: 15px 15px;
    background-color: var(--color-bg-base);
    border-radius: 8px 8px 8px 8px;
    font-size: 1.1rem;
    line-height: 1.5;
    cursor: pointer;
    transition: border-radius 0.3s;

    &::before {
      content: "Q.";
      font-size: 18px;
      font-weight: 600;
    }
  }

  &[open] .faq-item-question {
    border-radius: 8px 8px 0 0;
  }

  & .faq-item-plus-icon {
    grid-area: icon;
    transition: rotate 0.3s;
  }

  &[open] .faq-item-plus-icon {
    rotate: 180deg;
  }

  &::details-content {
    background-color: #fcfcfc;
    overflow: clip;
    transition-duration: 0.3s;
    transition-property: content-visibility, height, opacity;
    transition-behavior: allow-discrete;
    height: 0;
    opacity: 0;
    border-radius: 0 0 8px 8px;
  }

  &[open]::details-content {
    height: auto;
    opacity: 1;
  }

  & .faq-item-answer p {
    margin: 0;
    padding: 15px 15px;
    color: var(--color-text-default);
  }
}

#faq .btn {
  display: block;
  width: max-content;
  margin-block-start: 30px;
  margin-inline: auto;
}

.material-symbols-rounded {
  user-select: none;
}