@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;800&display=swap");

/* normalize css */
html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  /* fix font-size enlargement on iOS on screen rotate */
  -webkit-text-size-adjust: 100%;
}

body {
  background: rgb(255, 255, 255);
  color: rgb(33, 33, 33);
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  /* browsers based font fix */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.video-wrap {
  position: relative;
  width: 100%;
  margin: auto;
  z-index: 100;
}

video {
  width: 100%;
  display: block;
  margin-bottom: 8rem;
}

main {
  padding-bottom: 4rem;
}

/*----------------------------- links -----------------------------*/
a {
  text-decoration: none;
  color: inherit;
}

/* my notes--- hover=pc  active=tap(smartphones)  focus=onClick(pc), tap(iOS) */

/* --------------- accessibility styling ----------------- */
/* skip to main content */
.screen-reader-text {
  font-size: calc(1rem + 0.5vw);
  position: absolute;
  transform: translate(-50%, -120%);
  transition: transform 0.4s ease-in;
  padding: 0.5rem;
  background: rgb(0, 0, 0);
  z-index: 1000;
}

.screen-reader-text:focus-visible {
  color: rgb(255, 0, 255);
  transform: translate(-50%, 40%);
}

/*---------------------------- header -----------------------------*/
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  position: absolute;
  top: 0;
  z-index: 200;
  color: rgb(255, 255, 255);
  text-shadow: 0 0 5px rgb(0, 0, 0);
}

header p {
  margin: 0;
}

.translation {
  letter-spacing: 0.1rem;
}

.logo {
  position: relative;
  left: 1rem;
}

.logo:hover,
header nav a:hover {
  color: inherit;
}

.ltd {
  font-size: 1.8rem;
  letter-spacing: normal;
  margin: 0;
}

.company-name {
  font-family: serif;
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: 0.5rem;
  line-height: 1.3;
}

ul {
  padding-left: 0;
}

/* both header and footer li */
li {
  display: inline;
  letter-spacing: 0.2rem;
  padding: 1rem;
}

/*---------------------------- footer -----------------------------*/
footer {
  width: 100%;
  height: 17rem;
  background: rgb(245, 245, 245);
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: space-evenly;
  box-shadow: 0 0 0.5px rgb(77, 77, 77);
}

footer li {
  margin: 0 1rem;
}

a.call {
  color: rgb(255, 0, 0);
  font-weight: 600;
}

.copyright {
  position: relative;
  border-top: 0.5px solid rgb(217, 212, 212);
  font-size: 0.9rem;
}

.developer {
  margin: 0;
}
/*--------------------------- buttons -----------------------------*/
.top {
  color: rgb(57, 57, 57);
  font-weight: 600;
  border: 1.5px solid rgb(57, 57, 57);
  border-radius: 3px;
  padding: 0.5rem;
  cursor: pointer;
}
/* buttons on Home(grid) are on grid-style.css */

/* --------- Hero images parallax styling -------- */
.parallax {
  position: relative;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

.parallax-img {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.parallax-text {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 500;
  color: rgb(255, 255, 255);
  font-size: calc(2.5rem + 1vw);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 0 10px rgb(88, 88, 88);
}

.parallax-text:not(#home .parallax-text) {
  animation: title 1.5s ease-in;
}

@keyframes title {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.subtitle {
  font-size: calc(1.2rem + 1vw);
  font-weight: 400;
}

/*-------------------------- Home page ----------------------------*/
#home .parallax-text {
  font-size: calc(4rem + 1vw);
  line-height: 1.5;
  font-weight: 800;
  text-shadow: none;
}

@media (max-width: 600px) {
  #home .parallax-text {
    font-size: 3rem;
  }
}

/* text animation styling */
.text1,
.text2 {
  display: block;
  position: relative;
  color: transparent;
  -webkit-text-stroke: 0.5px rgb(255, 255, 255);
  /* these 3 are the fix for making width taking only content in spite of positon absolute */
  width: fit-content;
  white-space: nowrap;
  margin: auto;
}

.text1::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  color: rgb(255, 255, 255);
  text-shadow: 0px 0px 15px rgb(0, 0, 0);
  width: 100%;
  height: 100%;
  animation: typeWriter1 1.7s linear;
  overflow: hidden;
}

.text2::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  color: rgb(255, 255, 255);
  text-shadow: 0px 0px 15px rgb(0, 0, 0);
  width: 100%;
  height: 100%;
  animation: typeWriter2 3.4s linear;
  overflow: hidden;
}

@keyframes typeWriter1 {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

@keyframes typeWriter2 {
  0% {
    width: 0;
  }
  50% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
/* end of text animation */

#home .parallax-img {
  object-position: top;
  filter: brightness(0.9);
}

h2 {
  font-weight: 400;
  width: 100%;
}

article {
  padding: 8rem 0;
}

article p {
  max-width: 50rem;
  text-align: left;
  line-height: 2;
  margin: 1rem auto;
  padding: 0 2rem;
}

#president {
  background: linear-gradient(rgba(100, 0, 0, 0.3), rgba(100, 0, 0, 0.1)),
    url("../images/fuji.jpg") center 30%;
}

.ceo {
  text-align: center;
}
/* grid styling (section area) is on grid-style.css */

/* ---------------------- Company page --------------------------- */
table {
  max-width: 70rem;
}

.table {
  display: flex;
  flex-direction: column;
  align-items: center;
}

td {
  text-align: left;
  line-height: 1.8;
  vertical-align: top;
  min-width: 10rem;
  padding: 1rem;
}

/* --------- scroll animation ---------- */
#history tr {
  visibility: hidden;
  height: 8rem;
}

.fadeinUp {
  animation: fadeinUp 2s;
}

@keyframes fadeinUp {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}
/* end of scroll animatiion */

#foreign {
  background: linear-gradient(rgba(3, 13, 86, 0.5), rgba(2, 9, 63, 0.5)),
    url("../images/tropics.jpg") center;
}

/* desktop history styling */
@media (min-width: 650px) {
  #history h2 {
    position: relative;
  }

  #history tbody {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
  }

  #history tr:nth-child(odd) {
    align-self: flex-end;
    width: 50%;
  }

  #history tr:nth-child(even) {
    align-self: flex-start;
    width: 50%;
    display: flex;
    flex-direction: row-reverse;
  }

  #history tr:nth-child(even) td:first-child {
    text-align: right;
  }

  #history td {
    min-width: 4rem;
  }

  /* vertical line and svg decoration */
  #history h2:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 5rem;
    width: 1px;
    height: 34rem;
    margin: auto;
    background: rgb(33, 33, 33);
  }

  #history h2:after {
    content: url("../images/pipe.svg");
    position: absolute;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translateX(-50%);
    top: 38rem;
  }
}

/* ---------------------- Hiring page ---------------------------- */
#environment {
  background: linear-gradient(rgba(0, 13, 0, 0.4), rgba(0, 13, 0, 0.4)),
    url("../images/lake.jpg") center;
}

/* ---------------------- Contact page ---------------------------- */
#contact .table {
  padding-bottom: 4rem;
}

.map {
  padding-top: 0;
}

/* Google Map embed */
.map iframe {
  width: 100%;
  height: 25rem;
}

/* ================================== media queries ================================== */
/* --------------------- small pc & tablet --------------------- */
@media (max-width: 1000px) {
  .translation {
    letter-spacing: 0.05rem;
  }

  .company-name {
    font-size: 1.8rem;
    letter-spacing: 0.2rem;
  }

  .ltd {
    font-size: calc(0.5rem + 2vw);
    font-size: 1.3rem;
  }

  .translation {
    font-size: 0.8rem;
  }

  .parallax-img {
    height: 50rem;
  }
}

@media (max-width: 800px) {
  li {
    font-size: 0.9rem;
  }

  figcaption {
    font-size: 0.9rem;
  }
}

@media (max-width: 650px) {
  header {
    flex-direction: column;
  }

  header div {
    align-self: center;
    border-bottom: 0.5px solid white;
  }

  header nav {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .logo {
    left: 0;
  }

  h2 {
    font-size: 1.1rem;
  }

  .company-name {
    font-size: calc(0.8rem + 4vw);
  }

  .ltd {
    font-size: calc(0.8rem + 2vw);
  }

  article,
  section {
    padding: 4rem 0;
  }

  td {
    min-width: 8rem;
  }

  footer li {
    margin: 0;
  }
}

/* --------------------------- mobile ---------------------------- */
@media (max-width: 500px) {
  main {
    font-size: 0.9rem;
  }

  figcaption {
    font-size: 0.9rem;
  }

  .map iframe {
    height: 300px;
  }

  footer {
    height: 25rem;
  }

  footer ul {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
  }

  footer p {
    font-size: 0.8rem;
  }
}
/* ---------------------------- others --------------------------- */
/* behavior for browsers that support background-attachment: fixed; */
#president,
#foreign,
#environment {
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-background-size: cover;
  color: rgb(255, 255, 255);
}

/* behavior for iOS that doesn't support background-attachment: fixed; */
@supports (-webkit-touch-callout: inherit) {
  #president,
  #foreign,
  #environment {
    background-attachment: scroll;
  }
}
