/*
Theme Name: Project 3 Theme
Author: Wakako Hatta
Description: A custom WordPress theme developed for the Tourism Office client. This theme includes custom post types, ACF fields, and dynamic templates.
Version: 1.0
*/

:root {
  --ratio: 0.625; /* 10px / 16px */

  /* Neutral Color */
  --neutral-color: #ffffff;
  --neutral-800: #1a202c;
  --neutral-600: #4a5568;

  /* Accent Color */
  --accent-100: #1e3a5f;
  --accent-200: #2c5282;
  --accent-300: #2f6f73;
  --accent-400: #f8fafc;
  --accent-500: #e6f0f2;

  /* Accent (warm) Color  */
  --accent-warm: #e6a96d; /* subtle warm highlight */

  /* Fonts */
  --font-heading: "Poppins", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

/* TYPOGRAPHY ------------------------------------------------*/
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin-block: 0;
  margin-inline: 0;
}

h1 {
  font-size: calc(4.5rem * var(--ratio));
  line-height: 0.85;
}

h2 {
  font-size: calc(2.6rem * var(--ratio));
  color: var(--accent-100);
}

h3 {
  font-size: calc(2.4rem * var(--ratio));
  color: var(--accent-200);
}

p {
  font-family: var(--font-body);
  color: var(--neutral-800);
  line-height: 1.5;
}

body{
  margin:0;
  background: var(--accent-400);
  color: var(--neutral-800);
  font-family: var(--font-body);
}

/* Whole page wide */
.site-container{
  width: min(61.5rem, 100%);
  margin-inline: auto;
}

/* Header & Navigation ------------------------------------------------- */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-300);
  padding: 0.75rem 1rem;
}

.custom-logo {
  display: block;
  width: 2rem;
  height: auto;
}

/* Hide checkbox but keep it usable by label */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Hamburger button */
.nav-toggle-label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
}

.nav-toggle-label span:not(.screen-reader-text) {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  margin-inline: auto;
  background: var(--neutral-color);
  border-radius: 999rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Mobile-first nav */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--accent-300);
  padding: 0 1rem 1rem;
  z-index: 50;
}

.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.menu-item a {
  display: block;
  font-family: var(--font-body);
  text-decoration: none;
  color: var(--neutral-color);
  padding: 0.25rem 0;
}

.current-menu-item > a,
.current-menu-ancestor > a,
.current_page_item > a {
  text-decoration: underline;
}

/* Open mobile menu */
.nav-toggle:checked ~ .site-nav {
  display: block;
}

/* Animate hamburger into X */
.nav-toggle:checked + .nav-toggle-label span:nth-of-type(2) {
  transform: translateY(0.4rem) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span:nth-of-type(3) {
  opacity: 0;
}

.nav-toggle:checked + .nav-toggle-label span:nth-of-type(4) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

/* Tablet and up */
@media screen and (min-width: 48.75rem) {
  .site-header {
    padding: 0.75rem 1.5rem;
  }

  .nav-toggle-label {
    display: none;
  }

  .site-nav {
    position: static;
    display: block;
    padding: 0;
    background: transparent;
  }

  .site-nav .menu {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

/* Header large desktop */
@media screen and (min-width: 68.75rem) {
  .site-header {
    padding-inline: 2rem;
  }

  .site-nav .menu {
    gap: 2rem;
  }
}

/* Footer ------------------------------------------------- */
footer{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;  
  gap: 1.5rem;
  padding-block: 1rem;
  padding-inline: 0.5rem;
  background: var(--accent-300);
}

/* copyright */
footer p{
  margin: 0;
  color: var(--neutral-color);
}

/* footer menu */
footer .menu,
.site-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;  
  gap: 0.75rem;
}

footer .menu a{
  text-decoration: none;
  color: var(--neutral-color);
}

/* Footer PC Size */
@media screen and (min-width: 68.75rem){
  /* 2 columns*/
  footer{
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    text-align: center;
  }

  footer .menu{
    align-items: center;
  }
}

/* --------------------- */
/* Global Layout         */
/* --------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.section,
.archive-page,
.page-entry,
.single-entry {
  padding: 1.5rem 1rem;
}

.section__inner,
.archive-page__inner,
.page-entry__inner,
.single-entry__inner,
.hero__inner {
  width: min(68rem, 100%);
  margin-inline: auto;
}

/* --------------------- */
/* Hero                  */
/* --------------------- */

.hero {
  padding: 3rem 1rem;
}

.hero__title {
  margin-bottom: 1rem;
}

.hero__text {
  max-width: 40rem;
}

/* --------------------- */
/* Common Titles         */
/* --------------------- */

.section__title,
.archive-page__title,
.page-entry__title,
.single-entry__title {
  margin-bottom: 1rem;
}

/* --------------------- */
/* Card Grid             */
/* --------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid #d9d9d9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.card__body {
  padding: 1rem;
}

.card__title {
  margin-bottom: 0.75rem;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__text {
  margin-bottom: 1rem;
}

.card__image {
  width: 100%;
  aspect-ratio: 3 / 3;
  object-fit: cover;
}

/* --------------------- */
/* Buttons               */
/* --------------------- */

.button-link {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  background: var(--accent-100);
  color: white;
}
.button-link:hover {
  background: var(--accent-200);
}

/* --------------------- */
/* Archive               */
/* --------------------- */

.archive-page__intro {
  max-width: 46rem;
  margin-top: 1rem;
}

/* --------------------- */
/* Archive List          */
/* --------------------- */

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.archive-list__item {
  display: flex;
  flex-direction: column;
  border: 1px solid #d9d9d9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.archive-list__image-link {
  display: block;
}

.archive-list__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.archive-list__content {
  padding: 1rem;
}

.archive-list__title {
  margin-bottom: 0.75rem;
}

.archive-list__title a {
  color: inherit;
  text-decoration: none;
}

.archive-list__text {
  margin-bottom: 1rem;
}

/* --------------------- */
/* About Page            */
/* --------------------- */

.page-entry__intro {
  max-width: 46rem;
  margin-top: 1rem;
}

.about {
  margin-top: 2rem;
}

.about__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about__image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.about__text {
  max-width: 46rem;
}

@media screen and (min-width: 48.75rem) {
  .about__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .about__image,
  .about__text {
    flex: 1;
  }

  .about__image img {
    aspect-ratio: 4 / 3;
  }
}

/* --------------------- */
/* Page / Single         */
/* --------------------- */
.page-entry__content {
  max-width: 46rem;
}

.single-entry__back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent-100);
  text-decoration: none;
}

.single-entry__back-link:hover {
  text-decoration: underline;
}

.single-entry__title {
  margin-bottom: 1.5rem;
}

.single-entry__image-wrap {
  margin-bottom: 2rem;
}

.single-entry__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.single-entry__content {
  max-width: 68rem;
}

.single-entry__content p {
  max-width: 68rem;
}

/* --------------------- */
/* 404 Page              */
/* --------------------- */
.error-page {
  padding: 4rem 1rem;
}

.error-page__inner {
  max-width: 800px;
  margin: 0 auto;
}

.error-page__title {
  margin-bottom: 1rem;
}


/* --------------------- */
/* Responsive            */
/* --------------------- */

@media screen and (min-width: 48.75rem) {
  .section,
  .archive-page,
  .page-entry,
  .single-entry {
    padding: 2rem 1.5rem;
  }

  /* nav styles */
  .site-nav {
    margin-left: auto;
  }
  .site-nav .menu {
    align-items: center;
  }
  .menu-item a:hover {
    text-decoration: underline;
  }

  /* logo styles */
  .custom-logo-link {
    display: block;
    line-height: 0;
  }
  .custom-logo {
    display: block;
    width: 4rem;
    height: auto;
  }
  .site-footer .custom-logo {
    width: 8rem;
  }

    /* archive list styles */
  .archive-list__item {
    flex-direction: row;
    align-items: stretch;
  }
  .archive-list__image-link {
    flex: 0 0 12rem;
  }
  .archive-list__image {
    width: 12rem;
    height: 100%;
    aspect-ratio: auto;
  }
  .archive-list__content {
    flex: 1;
  }

  /* card styles */
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (min-width: 68.75rem) {
  .card-grid--archive {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
