/* Global ---------------- */

@font-face {
	font-family: 'Males';
	src: url('Males.woff2') format('woff2');
	font-display: swap;
}

:root {
	--theme: #FF5F92;
	--theme-grey: #bbb;
	--txt-color: #555;
	--heavy-weight: 600;
	--medium-weight: 450;
	--grid-gap: 1.5rem;
	--img-radius: 1.5rem;
	--p-font-size: 1.1rem;
	--bg-color: white;
	--bg-img: url("images/water.webp");
}

/* 1. Universal box-sizing */
*, *::before, *::after {
	margin: 0;
	padding: 0;
  box-sizing: border-box;
}

/* IMG ---------------- */

img {
	border: 0;
}

#treatments img, .grid img {
	filter: grayscale(100%) contrast(120%)
}

#panel-1 img, #treatments img, .curved-img {
	border-radius: var(--img-radius);
}

html {
  scroll-behavior: smooth;
	-webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/*  switch to normal body background when the watercolours are done */
html::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--bg-img);
	background-repeat: repeat-x;
	background-position: center top;
	background-size: 700px auto;
	filter: hue-rotate(160deg);
	z-index: -1; /* keep it behind body content */
}

body {
	font-size: 1rem;
	font-family: "Avenir Next", "Quicksand", sans-serif;
	font-optical-sizing: auto;
	color: var(--txt-color);
	background-color: white;
	overflow-x: hidden; /* Prevent horizontal scrolling. (swipe-box) */
}

body.use-quicksand {
	line-height: 1.6rem;
	letter-spacing: 0.015rem;
}

.shell, #story, #treatments, #questions, #map-section, #contact-section {
	margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

h1 {
	font-size: 6.5rem;
	color: black;
}

h2 {
	font-size: 1.2rem;
	font-weight: var(--heavy-weight);
  color: #aaa;
}

h3 {
	font-size: 2rem;
	color: var(--theme);
}

h1, h3 {
	font-family: "Males", serif;
	font-weight: 400;
}

.booking-box {
	padding: 0.4rem 0.8rem;
	position: fixed;
	top: 1rem;
  right: 1rem;
	border-radius: var(--img-radius);
	background-color: rgba(40, 40, 40, 0.6); /* semi-transparent */
	backdrop-filter: blur(0.5rem);
	-webkit-backdrop-filter: blur(0.5rem);
	filter: drop-shadow(0 0 0.5rem rgba(0,0,0,0.3)); /* x y radius colour */
	font-weight: var(--heavy-weight);
	color: var(--bg-color);
	z-index: 900;
}

a, a:visited, a:active {
	color: var(--theme);
	text-decoration: none;
	font-weight: var(--heavy-weight);
}

p {
	margin: 0.8rem 0;
	font-size: var(--p-font-size);
}

b {
	font-weight: var(--heavy-weight);
}

.booking-box a, .booking-box a:visited, .booking-box a:active {
	color: var(--bg-color);
}

/* Header ---------------- */

header {
	text-align: center;
}

/* default: show "Hi, I'm Misato" */
.full-title {
  display: inline-block;
}

header h1 {
  padding-top: 10.5rem;
  line-height: 5.5rem;
  letter-spacing: -0.2rem;
}

header h2 {
	padding-top: 1rem;
	letter-spacing: 0.05rem;
}

/* Accordion ---------------- */

.panel {
	padding: 0.5rem 1.5rem;
	max-height: 0;
	overflow: hidden;
	border: 2px dashed var(--theme-grey);
	color: var(--txt-color);
	border-radius: 1rem;
	opacity: 0;
	transition: margin 0.5s ease-out,
				      max-height 0.5s ease-in-out,
				      opacity 0.5s ease-in; /* Slow --> fast */
}

.panel.show {
	margin: 1rem 0 2rem;
	opacity: 1;
}

/* Story ---------------- */

#story {
	padding-top: 1.8rem;
	display: grid;
	grid-template-columns: auto 52%;
	justify-items: center;
}

#misato {
	width: 17.5rem;
}

.full-desc {
	display: block;
}

.short-desc {
  display: none;
}

#story .accordion {
  color: var(--theme);
  font-weight: var(--heavy-weight);
}

#story .accordion::before {
	content: ".. ";
  font-weight: normal;
  color: var(--txt-color);
}

#story #panel-1 {
  grid-column: 1 / -1;
}

#panel-1 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--grid-gap);
}

#panel-1 img {
	margin: 1rem 0;
	width: 100%;
}

ul {
	padding: 1rem 0 1rem 1rem;
}

li {
	margin-left: 1rem;
	font-size: var(--p-font-size);
}

/* Treatments ---------------- */

#treatments {
	display: grid;
	gap: var(--grid-gap);
	grid-template-columns: auto 44%;
}

#treatments h3 {
  grid-column: 1 / -1;
}

#treatments img {
	width: 100%;
}

/* Treatments Small Screen ---------------- */

.carousel {
  padding: 4.5rem 0;
  display: none;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: #333;
  background-image: url("images/brush.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
}

.track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.grid {
    flex: 0 0 100%;
    display: grid;
    height: auto;
    user-select: none;
    touch-action: pan-y;
}

.grid h3, .grid p {
    padding: 0 1rem;
}

.grid p {
    color: #ccc;
}

.grid img {
  padding-top: 0.5rem;
  width: 100%;
}

/* Questions ---------------- */

#questions {
  padding-top: 0.8rem;
}

#questions h3 {
  padding-left: 0.8rem;
  padding-bottom: 1.1rem;
}

#questions .accordion {
	margin: 0.3rem 0;
	padding: 0.6rem 1rem;
	font-weight: var(--heavy-weight);
	cursor: pointer;
	background-color: #f1f1f1;
	border-radius: var(--img-radius);
}

#questions .accordion:after {
	content: "+";
	float: right;
}

#questions .active:after {
  content: "=";
}

#questions .panel {
	padding: 0 1rem;
	border: none;
}

#questions .panel.show {
	margin: 0;
}

/* Google maps ---------------- */

#map-section {
	padding: 1rem 1rem 0;
}

.google-map {
	width: 100%;
	height: 20rem;
  border: none;
	border-radius: 1.5rem;
}

.address {
	margin-left: 1rem;
  font-size: 1rem;
}

/* Contact ---------------- */

#contact-section {
  padding-top: 2.5rem;
	display: grid;
	grid-template-areas: 'text-area form-area';
	grid-template-columns: auto 52%;
}

.text-area {
	grid-area: text-area;
}

.form-area {
  grid-area: form-area;
}

.social {
	padding: 0.5rem 0;
}

.social img {
	width: 1.4rem;
	opacity: 0.6;
}

#form-container {
	padding: 1.8rem;
	width: 100%;
	border: 2px dashed var(--theme-grey);
	border-radius: var(--img-radius);
}

label {
	display: block;
	font-weight: var(--heavy-weight);
}

input, textarea {
	margin-bottom: 1rem;
	width: 100%;
	font-size: 1rem;
	color: var(--txt-color);
	background-color: white;
	outline: 0;
	resize: none;
	border-width: 0 0 0.1em;
	border-style: solid;
  border-color: var(--theme-grey);
	border-radius: 0;
}

textarea {
	height: 1.5rem;
}

#button-container {
	text-align: right;
}

#email-send {
	padding: 0.4rem 0.8rem;
	font-size: 1rem;
	font-weight: var(--heavy-weight);
	color: var(--bg-color);
	background-color: rgba(40, 40, 40, 0.6);
  border: none;
	border-radius: var(--img-radius);
  cursor: pointer;
}

/* Footer ---------------- */

footer {
	height: 11rem;
	background-image: var(--bg-img);
	background-repeat: repeat-x;
	background-position: center top;
	background-size: 700px auto;
	transform: scaleY(-1);
	filter: hue-rotate(160deg);
}

.fade-slide {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-slide.show {
    opacity: 1;
    transform: translateY(0);
}

/* Media queries ---------------- */

@media screen and (min-width : 700px) {
  .booking-box {
    right: 50%;
    transform: translate(calc(-50% + 23rem), 0);
  }
}

@media screen and (min-width : 640px) {
  .shell, #story, #treatments, #questions, #map-section, #contact-section {
	  width: 45rem;
		max-width: 95%;
	}
}

@media screen and (max-width: 640px) {
  html::before {
		background-size: 450px auto;
	}
  .full-title, .full-desc, #treatments {
    display: none;
  }
  .short-desc {
    display: inline-block;
  }
  header h1 {
    padding-top: 7rem;
	  line-height: 3.6rem;
	  letter-spacing: -0.2rem;
  }
	header h2 {
		font-size: var(--p-font-size);
	}
  #story, #panel-1, .contact {
		grid-template-columns: 1fr;
	}
	#panel-1 {
		gap: 0.4rem;
	}
	#panel-1 img {
		margin-top: 0;	
	}	
  .carousel {
    display: block;
  }
  #map-section {
    padding-left: 0;
    padding-right: 0;
  }
  .google-map {
    border-radius: 0;
  }
	.address, .text-area {
    margin-left: 0;
		text-align: center;
	}
  #contact-section {
    grid-template-columns: 1fr;
  	grid-template-areas:
      'form-area'
      'text-area';
	}
  .text-area p {
    font-size: 1rem;
  }
  .social {
    padding-top: 3rem;
  }
}