/* TOP page sections. */

/* ---------- Hero ---------- */

.at-hero {
  padding-block: calc(var(--at-section-y) + var(--at-space-5)) var(--at-section-y-loose);
  background-color: var(--at-color-bg);
  background-image: url("../img/front/hero.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.at-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--at-space-5), 4vw, var(--at-space-8));
}

.at-hero__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--at-space-6);
  text-align: center;
}

.at-hero__ribbon {
  color: var(--at-color-primary-soft);
  font-size: var(--at-text-lg);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.at-hero__ribbon::before {
  content: "＼ ";
}

.at-hero__ribbon::after {
  content: " ／";
}

.at-hero__ribbon:hover {
  color: var(--at-color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.at-hero__title {
  font-size: var(--at-text-5xl);
}

.at-hero__lead {
  color: var(--at-color-fg);
  font-size: var(--at-text-lg);
  font-weight: 600;
  line-height: var(--at-leading-relaxed);
}

.at-hero__actions {
  justify-content: center;
  margin-top: var(--at-space-2);
}

.at-hero__actions .at-button {
  border-radius: var(--at-radius-pill);
}

.at-hero__actions .at-button--accent {
  min-height: 40px;
  padding: 0 30px;
  font-size: var(--at-text-base);
}

.at-hero__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--at-space-2) var(--at-space-3);
  margin-top: var(--at-space-2);
}

.at-hero__point {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--at-color-line);
  border-radius: var(--at-radius-pill);
  background-color: var(--at-color-bg);
  color: var(--at-color-fg);
  font-size: var(--at-text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.at-hero__point::before {
  content: "✓";
  color: var(--at-color-accent);
  font-size: 0.8em;
  font-weight: 700;
}

.at-hero__point--campaign {
  border-color: var(--at-color-primary-soft);
  background-color: var(--at-color-bg);
  color: var(--at-color-primary-soft);
}

.at-hero__point--campaign::before {
  color: var(--at-color-primary-soft);
}

.at-hero__media img {
  width: 100%;
  height: auto;
}

.at-intro__text {
  max-width: 48em;
  margin: var(--at-space-5) auto 0;
  text-align: center;
}

.at-intro__label {
  max-width: 322px;
  margin: var(--at-space-7) auto 0;
}

.at-intro__actions {
  margin-top: var(--at-space-5);
}

.at-intro__wide {
  width: 100%;
  margin-top: var(--at-space-7);
}

.at-simple__text {
  max-width: 48em;
  margin: var(--at-space-5) auto 0;
  text-align: center;
}

.at-simple__media {
  max-width: 759px;
  margin: var(--at-space-7) auto 0;
}

@media (max-width: 600px) {
  .at-hero {
    padding-block: calc(var(--at-section-y-loose) + var(--at-space-4)) var(--at-section-y-loose);
  }

  .at-hero__inner {
    grid-template-columns: 1fr;
  }

  .at-hero__body {
    align-items: flex-start;
    text-align: left;
  }

  .at-hero__ribbon {
    font-size: var(--at-text-sm);
  }

  .at-hero__actions,
  .at-hero__points {
    justify-content: flex-start;
  }

  .at-hero__actions {
    width: 100%;
    max-width: 360px;
  }

  .at-hero__media {
    display: none;
  }

  .at-intro__text,
  .at-simple__text,
  .at-showcase__note,
  .at-pricing {
    text-align: left;
    margin-inline: 0;
  }

  .at-simple__media {
    margin-inline: 0;
  }

  .at-patronbook__banner {
    margin-inline: auto;
  }

  .at-patronbook__body {
    margin-top: var(--at-space-5);
  }

  .at-intro__label {
    margin-inline: auto;
  }

  .at-intro__wide {
    display: none;
  }

  .at-intro,
  .at-simple {
    padding-block: var(--at-space-9);
  }

  .at-intro__text,
  .at-simple__text {
    margin-top: var(--at-space-4);
  }

  .at-intro__label {
    margin-top: var(--at-space-6);
  }

  .at-intro__actions {
    margin-top: var(--at-space-4);
  }

  .at-simple__media {
    margin-top: var(--at-space-6);
  }

  .at-pricing__amount {
    justify-content: flex-start;
  }

  .at-pricing__benefits {
    margin-inline: 0;
  }
}

/* ---------- Showcase ---------- */

.at-showcase {
  margin-top: var(--at-space-5);
}

.at-showcase__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--at-space-3);
}

.at-showcase__card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--at-radius-sm);
}

.at-showcase__card img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.at-showcase__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--at-space-2);
  background-color: rgba(0, 0, 0, 0.45);
  color: var(--at-color-fg-inverse);
  font-size: var(--at-text-sm);
  line-height: 1.4;
  text-align: center;
  word-break: break-all;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.at-showcase__label::before {
  content: "[";
}

.at-showcase__label::after {
  content: "]";
}

.at-showcase__card:hover .at-showcase__label,
.at-showcase__card:focus .at-showcase__label,
.at-showcase__card:focus-visible .at-showcase__label {
  opacity: 1;
}

.at-showcase__dots {
  display: none;
}

.at-showcase__note {
  margin-top: var(--at-space-6);
  text-align: center;
}

@media (max-width: 960px) {
  .at-showcase__track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .at-showcase__track {
    display: flex;
    overflow-x: auto;
    gap: var(--at-space-3);
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 10%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }

  .at-showcase__track::-webkit-scrollbar {
    display: none;
  }

  .at-showcase__item {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  .at-showcase__dots {
    display: flex;
    justify-content: center;
    gap: var(--at-space-2);
    margin-top: 14px;
  }

  .at-showcase__dots[hidden] {
    display: none;
  }

  .at-showcase__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
  }

  .at-showcase__dot.is-active {
    background-color: rgba(0, 0, 0, 0.65);
  }
}

/* ---------- PatronBook ---------- */

.at-patronbook__banner {
  max-width: 560px;
  margin: var(--at-space-6) auto 0;
}

.at-patronbook__body {
  margin-top: var(--at-space-8);
}

.at-patronbook__summary {
  font-size: var(--at-text-xl);
  line-height: var(--at-leading-tight);
}

.at-patronbook__notes {
  color: var(--at-color-accent);
}

/* ---------- Customize ---------- */

.at-customize-wrap {
  margin-top: var(--at-space-8);
}

.at-customize {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--at-space-5);
}

.at-customize__dots {
  display: none;
}

@media (max-width: 600px) {
  .at-customize {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
  }

  .at-customize img {
    -webkit-user-drag: none;
    pointer-events: none;
  }

  .at-customize__item {
    grid-area: 1 / 1;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(0);
  }

  .at-customize__item.is-prep-right,
  .at-customize__item.is-prep-left,
  .at-customize__item.is-leaving-left,
  .at-customize__item.is-leaving-right,
  .at-customize__item.is-active {
    visibility: visible;
  }

  .at-customize__item.is-prep-right {
    transform: translateX(100%);
  }

  .at-customize__item.is-prep-left {
    transform: translateX(-100%);
  }

  .at-customize__item.is-active {
    z-index: 2;
    transform: translateX(0);
    pointer-events: auto;
    transition: transform 0.55s ease;
  }

  .at-customize__item.is-leaving-left,
  .at-customize__item.is-leaving-right {
    z-index: 1;
    transition: transform 0.55s ease;
  }

  .at-customize__item.is-leaving-left {
    transform: translateX(-100%);
  }

  .at-customize__item.is-leaving-right {
    transform: translateX(100%);
  }

  .at-customize__dots {
    display: flex;
    justify-content: center;
    gap: var(--at-space-2);
    margin-top: 14px;
  }

  .at-customize__dots[hidden] {
    display: none;
  }

  .at-customize__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
  }

  .at-customize__dot.is-active {
    background-color: rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .at-customize__item.is-active,
  .at-customize__item.is-leaving-left,
  .at-customize__item.is-leaving-right {
    transition: none;
  }
}

/* ---------- Icon grid ---------- */

.at-other-features .at-heading__title {
  font-size: var(--at-text-5xl);
  font-weight: 700;
}

.at-other-features .at-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: var(--at-space-6) var(--at-space-5);
  margin-top: var(--at-space-8);
}

.at-other-features .at-icon-grid__item {
  display: flex;
  align-items: center;
  gap: var(--at-space-3);
  width: max-content;
  max-width: 100%;
  text-align: left;
}

.at-other-features .at-icon-grid__icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
}

.at-other-features .at-icon-grid__title {
  font-size: var(--at-text-lg);
  font-weight: 700;
  line-height: var(--at-leading-tight);
}

@media (max-width: 600px) {
  .at-other-features .at-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
    column-gap: var(--at-space-4);
    row-gap: var(--at-space-5);
  }

  .at-other-features .at-icon-grid__item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    max-width: none;
    gap: var(--at-space-2);
  }

  .at-other-features .at-icon-grid__icon {
    width: 44px;
    height: 44px;
  }
}

/* ---------- About ---------- */

.at-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--at-space-6), 5vw, var(--at-space-10));
  overflow-x: clip;
}

.at-about__lead,
.at-about__copy {
  display: flex;
  flex-direction: column;
  gap: var(--at-space-5);
}

.at-about .at-heading__title {
  color: var(--at-color-heading-wine);
}

.at-about__copy .at-button-group {
  margin-top: var(--at-space-1);
}

@media (max-width: 600px) {
  .at-about {
    grid-template-columns: 1fr;
  }

  .at-about__copy p {
    margin-inline: var(--at-space-4);
    color: var(--at-color-fg-muted);
    font-size: var(--at-text-sm);
    font-weight: 400;
    line-height: var(--at-leading-normal);
  }
}

.at-section__actions {
  margin-top: var(--at-space-8);
}

/* ---------- Pricing background (articul.jp の 10.jpg) ---------- */

.at-pricing-section {
  background-color: var(--at-color-bg-subtle);
  background-image: url("../img/front/pricing-bg.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ---------- Pricing ---------- */

.at-pricing-section .at-heading__title {
  color: var(--at-color-accent);
}

.at-pricing {
  max-width: 520px;
  margin: var(--at-space-5) auto 0;
  padding: var(--at-space-6) var(--at-space-6) var(--at-space-5);
  border-radius: var(--at-radius);
  background-color: var(--at-color-bg);
  text-align: center;
}

.at-pricing__flag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 16px;
  border-radius: var(--at-radius-pill);
  background-color: var(--at-color-primary);
  color: var(--at-color-fg-inverse);
  font-size: var(--at-text-sm);
  font-weight: 700;
}

.at-pricing__amount {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--at-space-3);
  line-height: 1;
}

.at-pricing__labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--at-space-1);
}

.at-pricing__figure {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.2em;
  min-width: 0;
}

.at-pricing__term {
  padding: var(--at-space-1) var(--at-space-3);
  border: 1px solid var(--at-color-primary);
  border-radius: var(--at-radius-sm);
  color: var(--at-color-primary);
  font-size: var(--at-text-xs);
}

.at-pricing__note {
  color: var(--at-color-fg-muted);
  font-size: var(--at-text-sm);
}

.at-pricing__value {
  color: var(--at-color-fg);
  font-size: clamp(2.25rem, 5vw + 1rem, 4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.95;
  white-space: nowrap;
}

.at-pricing__unit {
  font-size: var(--at-text-md);
  font-weight: 700;
  white-space: nowrap;
}

.at-pricing__regular {
  margin-top: var(--at-space-3);
  color: var(--at-color-fg-faint);
  font-size: var(--at-text-sm);
}

.at-pricing__benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--at-space-3) var(--at-space-5);
  max-width: 360px;
  margin: var(--at-space-6) auto 0;
  padding-top: var(--at-space-5);
  border-top: 1px solid var(--at-color-line);
}

.at-pricing__benefit {
  display: flex;
  align-items: center;
  gap: var(--at-space-2);
  font-size: var(--at-text-base);
  font-weight: 700;
}

.at-pricing__benefit::before {
  content: "✓";
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background-color: var(--at-color-primary);
  color: var(--at-color-fg-inverse);
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1;
}

.at-pricing__benefits + .at-button-group {
  margin-top: var(--at-space-7);
}

.at-pricing__notes {
  margin-top: var(--at-space-6);
  gap: var(--at-space-1);
  font-size: var(--at-text-sm);
  font-weight: 600;
  line-height: var(--at-leading-tight);
}

@media (max-width: 600px) {
  .at-pricing__notes {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }
}

.at-pricing__notes li:nth-child(-n + 3) {
  color: var(--at-color-primary);
}

/* ---------- FAQ ---------- */

.at-faq {
  margin-top: var(--at-space-8);
  border-top: 1px solid var(--at-color-line);
}

.at-faq__item {
  border-bottom: 1px solid var(--at-color-line);
}

.at-faq__question {
  font-size: inherit;
  font-weight: inherit;
}

.at-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--at-space-4);
  width: 100%;
  min-height: 64px;
  padding-block: var(--at-space-4);
  text-align: left;
}

.at-faq__label {
  color: var(--at-color-fg-strong);
  font-size: var(--at-text-body);
  font-weight: 700;
  line-height: var(--at-leading-tight);
}

.at-faq__icon {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.at-faq__icon::before,
.at-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background-color: var(--at-color-primary);
  transform: translate(-50%, -50%);
  transition: transform var(--at-transition), opacity var(--at-transition);
}

.at-faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.at-faq__item.is-open .at-faq__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

.at-faq__panel {
  padding-bottom: var(--at-space-5);
  color: var(--at-color-fg-muted);
}

.at-faq__panel > * + * {
  margin-top: var(--at-space-4);
}
