/* **************************************** START of Andy Bell's Modern CSS Reset **************************************** */
/* ref: https://andy-bell.co.uk/a-modern-css-reset/ */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.25;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* **************************************** START custom CSS **************************************** */

/* ******************** GLOBAL ******************** */

body {
  font-family: "Times New Roman", Times, serif;
}

a {
	color: currentColor;
}

a:hover {
	text-decoration: none;
	background-color: #000;
	color: #fff;
}

p, small {
  font-family: "Helvetica", Arial, sans-serif;	
}

.container {
  margin-inline: auto;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 480px 1fr;
  height: 100vh;
}

.main-content {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

h1 a {
	text-decoration: none;
}

h1:nth-child(2) {
	font-style: italic; 
	margin-top: -.25em;
}

h2 a {
	text-decoration: none;
}

h2:nth-child(4) {
	font-size: 1.75em;
	font-style: italic; 
	margin-top: -.25em;
}

h4 {
	  font-size: 9em;
  }

.portrait {
	margin-left: -1em;
	margin-top: -1em;
}


@media (max-width: 1280px) {
  .container {
    display: block;
  }
  .main-content {
    max-width: 800px;
    padding: 1em;
    margin-inline: auto;
  }
  
  p {
	  margin: 1em 0 0 0;
	  margin-left: -.75em;
  }

}


/* ******************** NAVIGATION ******************** */

nav {
  margin-bottom: 1em;
  text-align: right;
}

nav * {
  display: inline;
}

li + li {
  margin-left: 1em;
}

@media (max-width: 510px) {
  nav li {
    display: inline;
  }

  li + li {
    margin-top: 1em;
    margin-left: .5em; /* reset */
  }

}


/* ******************** MASTHEAD ******************** */

h1 {
  font-size: 3.75em;
}

h1:nth-child(2) {
  font-size: 2.5em;
}

h2 {
  font-size: 1.75em;
  font-weight: 400;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

h4 {
	  font-size: 9em;
  }

@media (max-width: 510px) {
  h1 {
    font-size: 2.82em;
  }
  
  h1:nth-child(2) {
    font-size: 2em;
    font-style: italic;
    margin-top: -.25em;
}

  h1 a {
	  text-decoration: none;
  }

  h2 {
    font-size: 1.5em;
    margin-top: .5em;
  }
  
  h2:nth-child(4) {
    font-size: 1.25em;
    font-style: italic;
    margin-top: -.4em;
}

  h2 a {
	  text-decoration: none;
  }
}

  h4 {
	  font-size: 6.5em;
  }
  
 p {
	 margin-left: .1em;
 }

/* ******************** FORM ******************** */

form {
  margin-top: 1rem;
}

form .input-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 2em;
}

@media (max-width: 510px) {
  form .input-container {
    display: block;
  }

  form div + div {
    margin-top: 1.5em;
  }
}

form :is(#name, #email, #phone, #location, #time) {
  grid-column: span 2;
}

form #why {
  grid-column: span 2;
}

form label {
  text-transform: uppercase;
}

form label span {
  font-size: 0.75em;
}

form :is(input, textarea) {
  display: block;
  font-family: "Helvetica", Arial, sans-serif;	
  padding: 0.25em 0.5em;
  width: 100%;
  border: 1px solid #999;
}

form textarea {
  min-width: 100%;
  max-width: 100%;
}

form button {
  display: block;
  margin-left: auto;
  margin-block: 1em;
}

  #form p {
	  margin: 1em 0 0 0;
	  margin-left: -.75em;
	  font-size: .5em;
	  width: 95%;
  }

p {
	margin-top: -.25em;
}

/* ******************** PORTRAIT IMAGE ******************** */

.portrait {
  grid-column: 1 / 2;
  grid-row: 1 / -1;
  align-self: end;
}

.disclaimer {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  margin-left: -0.5em;
}

/* ******************** MODAL / POP-UP ******************** */

button:is(.porch-botton, .porch-inner-botton)  {
  all: unset;
  text-decoration: underline;
}

button.porch-botton:hover, :is(#dialog1, #dialog2) svg:hover {
  cursor: pointer;
  color: white;
  fill: white;
  background-color: black;
}

:is(#dialog1, #dialog2) {
  padding: 1rem;
}

:is(#dialog1, #dialog2) img {
  padding: 1rem;
  width: 100%;
  max-width: 500px;
  margin-bottom: -1.25em;
}


@media (max-width: 600px) {
  :is(#dialog1, #dialog2) {
    margin-inline: 1rem;
  }

  :is(#dialog1, #dialog2) img {
    padding: 1rem 0.5rem;
  }
}

:is(#dialog1, #dialog2) svg {
  position: absolute;
  font-size: 2rem;
  top: 5px;
  right: 5px;
  padding: 0.25em;
}