@import url(https://fonts.bunny.net/css?family=noto-sans:100,100i,300,300i,600|noto-serif:100,100i,300,300i,600,600i&display=swap);

:root {
  --white: #fff;
  --ink: #2A2935;
  --blackOlive: #3D4339;
  --battleshipGray: #55616E;
  --slateGray: #68717A;
  --dimGray:  #918E88;
  --paleSky: #F2F7FC;
  --platinum: #c7c7c7;
  --shadow: #868365;
  --morningBlue: #919C9D;
  --raisanBlack: #24221E;
  --sunshine: #FFFAC5;
}

html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; font-size: 100%; font-family: 'Noto Sans', sans-serif; color: var(--ink); background: url('../img/ricepaper2.png') repeat center center; background-attachment: fixed; }

h1, h2, h3, header ul, header figcaption { font-family: 'Noto Serif', sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: 3px; }
h1 { color: var(--blackOlive); font-size: 2em; line-height: 1.2em; }
h2 { font-size: 1.75em; line-height: 1.3em; }
h3 { font-size: 1.3125em; line-height: 1.4em; }
h2, h3 { color: var(--battleshipGray); }

p, address, input { font-size: 1.125em; line-height: 1.75em; letter-spacing: 1px; }
address { font-style: normal; }
footer p, footer address { font-size: 1em; }

figure { margin: 0; padding: 0; }
figure img { display: block; width: 100%; height: auto; }

figure.drawing { mix-blend-mode: multiply; opacity: 0.4; animation: none; }

header { position: absolute; top: 0; left: 0; width: 100%; }

header, footer, .content, .gallery { padding: 0 15vw; box-sizing: border-box; }
.content, footer { padding-top: 6em; padding-bottom: 6em; }
header { padding-top: 2em; background: linear-gradient(180deg,rgba(0, 0, 0, 1) 16%, rgba(0, 0, 0, 0) 100%); }

nav a { display: inline-block; padding: 0.5em 1em; text-transform: uppercase; color: var(--ink); text-decoration: none; letter-spacing: 1px; }
nav a:first-of-type { padding-left: 0; }
nav a:last-of-type { padding-right: 0; }
nav a.is-active, nav a:hover { text-decoration: underline; }

header nav a { color: var(--white); }
header figure { width: 125px; }
footer a { color: var(--ink); }

header.fixed { position: fixed; z-index: 3; padding-top: 0; background: url('../img/ricepaper2.png') repeat center center; border-bottom: 1px solid var(--slateGray); box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2); }
header.fixed figure { display: none; }
header.fixed figure.hidden {display: block; animation-duration: 0.2s; animation-delay: 0s; }
header.fixed nav a { color: var(--ink); }

.flex { display: flex; gap: 2.5em; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.centerBase { align-items: center; }
.typeBase { align-items: last baseline; }

.twoThirds { flex-basis: 60%; }

.hidden { display: none; }
dialog { width: 75%; max-width: 500px; padding: 2em 1.5em 0.8em; z-index: 5; border-radius: 4px; border: none; box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2); background: rgba(265, 265, 265, 0.6); backdrop-filter: blur(0.8em); }
dialog::backdrop { display: block; width: 100vw; height: 100dvh; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(0.8em); }
dialog button { position: absolute; top: 0.6em; right: 0.6em; border: none; outline: none; height: 1.5em; width: 1.5em; background: url('../img/close.svg') center center no-repeat; }

.blue { background: var(--paleSky); mix-blend-mode: multiply; }

/* .blue h2, .blue p { mix-blend-mode: normal; } */

.flex h1 { flex-basis: 30%; }
.flex h1 + p { flex-basis: 65%; }

input { padding: 1em 2em; background: var(--white); border: 1px solid var(--slateGray); margin: 0; box-sizing: border-box; display: block; width: 70%; border-radius: 4px; }
input[type="submit"] { border: none; background: var(--slateGray); color: var(--sunshine); width: 30%; }

@keyframes splash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  30% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes appear {
  0% { margin-top: 2em; opacity: 0; }
  70% { margin-top: 0.5em; }
  100% { margin-top: 0; opacity: 1; }
}

@keyframes headerAppear {
  0% { opacity: 0; top: -1em; }
  60% { opacity: 0.2;}
  100% { opacity: 1; top: 0; }
}

@keyframes slideLeft {
  0% { left: -10vw; opacity: 0; }
  70% { opacity: 1; }
  100% { left: 0; }
}

@keyframes slideRight {
  0% { right: -10vw; opacity: 0; }
  70% { opacity: 1; }
  100% { right: 0; }
}

@keyframes upDown {
  0% { left: 0; }
  100% { left: 10em }
}

@keyframes textFadeIn {
  0% { opacity: 0.2; top: -0.8em; }
  100% { opacity: 1; top: 0; }
}

h1, h2, p { position: relative; animation: textFadeIn 1.4s ease-in forwards; }

header figure { opacity: 0; position: relative; animation: headerAppear 0.6s 1s forwards; }
header nav a { opacity: 0; position: relative; animation: headerAppear 0.6s 1.2s forwards; }
header nav a:nth-of-type(2) { animation-delay: 1.3s ;}
header nav a:nth-of-type(3) { animation-delay: 1.4s ;}
header nav a:nth-of-type(4) { animation-delay: 1.5s ;}
header nav a:last-of-type { animation-delay: 1.6s ;}

.hero { width: 100dvw; height: 90dvh; overflow: hidden; }
.hero figure { position: absolute; top: 0; left: 0; z-index: -2; width: 100%; height: 90dvh; overflow: hidden; }
.hero img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); }
.hero figure.active { z-index: -1; }
.hero figure.active img { animation: splash 4s ease-out forwards; }

.hero p { font-family: 'Noto Serif', sans-serif; font-size: 1em; font-weight: 600; color: var(--white); position: absolute; z-index: 1; right: 10vw; bottom: 8.7em; padding: 0.75em 6.5em 0.75em 1.5em; border-top: 2px solid var(--platinum); transform: rotate(90deg); animation: none; }
.hero p::before { content: " "; display: block; width: 1px; height: 2em; border-left: 2px solid var(--white); position: absolute; top: -1.05em; right: -2px; transform: rotate(-90deg); animation: upDown 2s 0.4s ease-in-out infinite; }

.splash { position: relative; height: 350px; overflow: hidden; }
.splash img { position: absolute; top: 0; left: 0; }

.parallax img { transform: translateY(0) scale(1.2); }

.appear { animation: appear 0.6s ease-in forwards; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5em, 1fr)); grid-auto-rows: 12.5em; grid-auto-flow: dense; gap: 2.5em; }
.gallery figure { container: figure / inline-size; overflow: hidden; cursor: pointer; }
.gallery img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: scale 1s ease-in-out; }
.gallery figure:hover img { scale: 1.125; }

#mission { margin-top: 21.25em; }
#mission figure.drawing { margin-top: -19em; }

#ethos h2 { text-align: center; border-bottom: 1px solid var(--dimGray); padding-bottom: 0.25em; }
#ethos h3 { flex-basis: 30%; flex-shrink: 0; position: relative; }
#ethos p { flex-basis: 63%; position: relative; }

#ethos h3.slide { animation: slideLeft 0.5s ease-in forwards; }
#ethos p.slide { animation: slideRight 0.5s ease-in forwards; }

#subscribe { padding-top: 1em; padding-bottom: 2.5em; position: relative; }
#subscribe figure.drawing { position: absolute; left: 15vw; top: -8%; width: 25%; max-width: 315px; transition: top 0.4s ease-in; }
#subscribe figure.appear { top: -25%; }
#subscribe>div { width: 62%; margin-left: 38%; }
#subscribe label { display: none; }
#subscribe form { display: flex; gap: 0; }
#subscribe input { border-radius: 4px 0 0 4px; }
#subscribe input[type="submit"] { border-radius: 0 4px 4px 0; }

@media (width > 600px) {
  .gallery figure:nth-child(1) { grid-area: span 2 / span 2; }

  .gallery figure:nth-child(4n + 1) { grid-row: span 2; }

  .gallery figure:nth-child(4n + 2) { grid-column: span 2; }
}
