/*
 * KYOKURYO MEDIA Corporate Site Stylesheet
 *
 * This stylesheet defines the look and feel for the KYOKURYO MEDIA website.
 * It uses CSS custom properties to centralise colours and font definitions
 * so that changes to the brand palette propagate consistently throughout
 * the site. Responsive layouts are achieved with flexbox and CSS grid.
 */

/* CSS custom properties allow easy theme tweaks. */
:root {
  --primary-color: #234c98;      /* Brand blue used throughout for headings and accents */
  --secondary-color: #72c4d6;    /* Light cyan accent colour for buttons and highlights */
  --accent-color: #72c4d6;       /* Warm accent used sparingly to draw attention */
  --dark-bg: #0b1a33;            /* Dark footer background */
  --light-bg: #f5f8fb;           /* Light grey section background */
  --text-color: #333333;         /* Primary body text colour */
  --heading-font: 'Inter', 'Noto Sans JP', sans-serif;
  --body-font: 'Noto Sans JP', 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  background-color: #ffffff;
}

/* Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn.secondary {
  background-color: var(--secondary-color);
  color: #fff;
}

.btn.accent {
  background-color: var(--accent-color);
  color: #fff;
}

.btn:hover {
  filter: brightness(1.1);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

header .logo {
  display: flex;
  align-items: center;
}

header .logo img {
  height: 60px;
  width: auto;
  margin-right: 0.5rem;
}

header .logo span {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: var(--accent-color);
}

/* Hamburger for mobile */
.hamburger {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* Mobile navigation */
@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    width: 220px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
  }
  nav.open {
    display: flex;
  }
  .hamburger {
    display: block;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--dark-bg);
  color: #fff;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 999;
  font-size: 0.85rem;
}

.cookie-banner button {
  background-color: var(--accent-color);
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.cookie-banner button:hover {
  filter: brightness(1.1);
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 6rem 1rem;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 26, 51, 0.5);
  z-index: 0;
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  font-family: var(--heading-font);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero .btn {
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 0.8rem 2.5rem;
  border-radius: 4px;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

/* Sections */
section {
  padding: 3rem 1rem;
}

.section-title {
  text-align: center;
  font-family: var(--heading-font);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

/* Services cards */
.services {
  background-color: var(--light-bg);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-color);
}

/* About preview */
.about-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-preview .text {
  flex: 1 1 300px;
}

.about-preview .text h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.about-preview .text p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.about-preview .image {
  flex: 1 1 300px;
}

.about-preview .image img {
  width: 100%;
  border-radius: 8px;
}

/* Works preview */
.works-preview {
  background-color: var(--light-bg);
}

.works-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.works-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.works-card:hover {
  transform: translateY(-4px);
}

.works-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.works-card h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin: 1rem;
}

.works-card p {
  font-size: 0.9rem;
  margin: 0 1rem 1rem;
  color: var(--text-color);
}

/* News preview */
.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.news-card .content {
  flex: 1;
  padding: 1rem;
}

.news-card h4 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.news-card p {
  font-size: 0.85rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.news-card .date {
  font-size: 0.75rem;
  color: #777777;
  margin-bottom: 0.5rem;
}

.news-card a.readmore {
  font-size: 0.85rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
}

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

/* Call-to-action section */
.cta {
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 3rem 1rem;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.cta .btn {
  background-color: var(--secondary-color);
  color: #ffffff;
  font-weight: 700;
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 2rem 1rem;
}

footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

footer .footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

footer .footer-logo img {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
}

footer .footer-logo span {
  font-size: 1.2rem;
  font-weight: 700;
}

footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

footer .footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
}

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

footer .company-info {
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 320px;
}

footer .copyright {
  font-size: 0.75rem;
  margin-top: 1rem;
  text-align: center;
  width: 100%;
}

/* Form Styles */
form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Grid layout for contact form */
form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
form .form-grid .full-width {
  grid-column: 1 / -1;
}

form label {
  font-weight: 600;
  color: var(--primary-color);
}

form div {
  display: flex;
  flex-direction: row;
  justify-content:space-between;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
  width: 175px;
  padding: 0.1rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
}

form input[type="file"] { 
  width: 100%;
  padding: 0.1rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
}

form textarea {
  min-height: 150px;
  resize: vertical;
}

form button {
  align-self:center;
  width: 50%;
  padding: 0.8rem 2rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form button:hover {
  background-color: var(--accent-color);
}

/* Indicate invalid form fields */
form .invalid {
  border-color: #e64c3c;
  background-color: #fff5f5;
}

/* Timeline for About page */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 2rem;
  border-left: 3px solid var(--primary-color);
}

.timeline-entry {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.1rem;
  top: 0.2rem;
  width: 0.6rem;
  height: 0.6rem;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.timeline-entry h4 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.timeline-entry p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-color);
}

/* Recruit page cards */
.recruit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.recruit-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.recruit-card:hover {
  transform: translateY(-4px);
}

.recruit-card h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.recruit-card .meta {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.5rem;
}

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

.recruit-card a.apply-btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.recruit-card a.apply-btn:hover {
  background-color: var(--accent-color);
}

/* Contact information section */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.contact-info i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.contact-box {
  margin-top: 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 50px;
}

/* Responsive adjustments for forms and sections */
@media (max-width: 600px) {
  .timeline {
    padding-left: 1.2rem;
  }
  .timeline-entry::before {
    left: -0.8rem;
  }
  .contact-box {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;  
  }
}

