/*
 * Askot, Weiner & Cohen, LLP - static site styles.
 * Rebuilt from the "Agency Pro" (Genesis) theme, its green colour scheme,
 * and the site's Additional CSS. Desktop matches the old site; the
 * max-width:800px / 480px blocks at the bottom are a mobile redesign.
 */

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

html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #36c38c;
  color: #666;
  font-family: 'Tinos', 'Times New Roman', Times, serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.625;
}

/* Full-page photo (was the Backstretch plugin). A fixed pseudo-element works on iOS,
   where background-attachment: fixed does not. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url(../images/background.jpg) center / cover no-repeat;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: #36c38c; text-decoration: none; transition: color .1s ease-in-out; }
a:hover { color: #333; }

h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: 1.2; margin: 0 0 1.6rem; }
h2 { font-size: 3rem; }
h3 { font-size: 2.4rem; }
p { margin: 0 0 2.4rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: #222; color: #fff; padding: 1rem 1.6rem;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid #36c38c; outline-offset: 2px; }

/* ---------- Top bar & navigation ---------- */
.site-header { display: none; }   /* compact mobile bar only; hidden on desktop like the old theme */

.nav-primary { background: #383838; }

.menu {
  list-style: none; margin: 0; padding: 0;
  text-align: center;
  font-size: 1.8rem; line-height: 1.5;
}
.menu > li { display: inline-block; text-align: left; }

.menu a {
  display: block; position: relative;
  padding: 1.8rem 3rem 2rem;
  border-top: 2px solid transparent;
  color: #fff;
}
.menu a:hover,
.menu a:focus-visible,
.menu .current > a {
  background: #282828;
  border-color: #36c38c;
  color: #36c38c;
}

/* Dropdowns: hidden off-screen until hover / focus / click */
.sub-menu {
  list-style: none; margin: 0; padding: 0;
  position: absolute; left: -9999px; opacity: 0;
  width: 220px; z-index: 99;
  transition: opacity .4s ease-in-out;
}
.sub-menu li { display: block; }
.sub-menu a {
  width: 220px; padding: 1.6rem;
  background: #282828; border: 0;
}
.sub-menu a:hover,
.sub-menu a:focus-visible { background: #333; color: #36c38c; }
.sub-menu .current > a { color: #999; }

.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu,
.menu li.open > .sub-menu { left: auto; opacity: 1; }

/* ---------- Layout ---------- */
.wrap { max-width: 1140px; margin: 0 auto; }
.site-inner { max-width: 1140px; margin: 0 auto; padding: 5% 0; clear: both; }

.entry {
  background: rgba(255, 255, 255, .8);
  border-radius: 3px;
  margin-bottom: 4rem;
  padding: 4rem 4rem 2.4rem;
}
.entry::after, .entry-content::after { content: ""; display: table; clear: both; }

.entry-title {
  color: #333; text-align: center;
  font-size: 3.6rem; line-height: 1;
  margin: 0 0 1.6rem;
}

.entry-content p { margin: 0; }
.entry-content ul { margin: 0 0 0 4rem; padding: 0; }
.entry-content li { list-style-type: square; }

/* Two-column bio layout (the old theme's "two-sixths / four-sixths") */
.bio-side, .bio-main { float: left; }
.bio-side { width: 31.62%; clear: both; }
.bio-main { width: 65.81%; margin-left: 2.564%; }

.c { text-align: center; }
.spacer { height: 2.6rem; }               /* old empty &nbsp; paragraphs */

.portrait { display: inline; width: 300px; margin-bottom: -.4rem; }
.portrait-sm { display: block; width: 200px; margin: 0 auto 2.4rem; }
.badge { display: block; margin: 0 auto 2.4rem; }

.bio-name { text-align: center; text-decoration: underline; }
.side-heading {
  text-align: center; text-decoration: underline;
  font-size: 2rem;
}
.bio-sub { font-size: 2rem; text-decoration: underline; }
.vcard { text-align: center; margin-top: 1rem; font-size: 1.8rem; line-height: 1.2; }
.vcard a { color: #666; }
.vcard a:hover { color: #36c38c; }

/* ---------- Home hero ---------- */
.home-top {
  min-height: 57.8rem;                    /* keeps the footer where the old page put it */
  padding: 1rem 0 0;
  color: #fff; text-align: center;
  transition: opacity .1s linear;
}
.home-top h1 {
  color: #fff; font-size: 5rem; line-height: 1;
  text-transform: uppercase; margin: 0 0 1.6rem;
}
.home-top h1 small { font-size: 80%; }    /* gives the small-caps look */
.home-top h2 { color: #fff; margin: 0 0 1.6rem; }

/* ---------- Contact form ---------- */
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #fff; color: #999;
  border: 1px solid #ddd; border-radius: 3px;
  box-shadow: 1px 1px 3px #eee inset;
  font: inherit; font-size: 1.4rem; line-height: normal;
  padding: 1.6rem;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: #999; outline: none; }
.contact-form .hp {                       /* honeypot: invisible to people */
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}
.button,
.contact-form input[type="submit"] {
  display: inline-block; width: auto; cursor: pointer;
  background: #222; color: #fff;
  border: 0; border-radius: 3px; box-shadow: none;
  font: inherit; font-size: 1.4rem; line-height: normal; text-transform: uppercase;
  padding: 1.6rem 2.4rem;
  transition: all .1s ease-in-out;
}
.button:hover,
.contact-form input[type="submit"]:hover:not(:disabled) { background: #36c38c; color: #fff; }
.contact-form input[type="submit"]:disabled { opacity: .6; cursor: default; }
.form-status { margin-top: 1.6rem; color: #333; }
.form-status.error { color: #b3261e; }

/* ---------- Footer ---------- */
.footer-widgets {
  clear: both;
  padding: 3rem 0 1rem;
  background: rgba(255, 255, 255, .8);    /* from the site's Additional CSS */
  border-top: 1px solid #ececec;
  color: #000;
}
.footer-widgets .wrap { display: flex; justify-content: space-between; }
.footer-widgets .widget { width: 350px; margin-bottom: 2.4rem; }
.widget-title {
  color: #333; text-align: center; text-transform: uppercase;
  font-size: 1.6rem; margin: 0 0 1.6rem;
}
.footer-widgets p { text-align: center; }
.footer-widgets a { color: inherit; }
.page-home .footer-widgets { margin-top: 0; }

.site-footer {
  background: #f5f5f5; color: #999;
  font-size: 1rem; letter-spacing: .2rem; text-transform: uppercase;
  padding: 4rem 0; text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a { color: #999; }
.site-footer a:hover { color: #333; }

/* ---------- Tablet (old theme collapsed its wrap to 760px here) ---------- */
@media (max-width: 1023px) {
  .site-inner, .wrap { max-width: 76rem; }
  .footer-widgets .widget { width: 48%; }
}

/* ---------- Mobile redesign ---------- */
@media (max-width: 800px) {
  .site-top { position: sticky; top: 0; z-index: 1000; }

  .site-header {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 5.6rem; padding: .6rem 1.6rem;
    background: #333;
  }
  .brand { color: #fff; font-size: 2rem; line-height: 1.15; }
  .brand:hover { color: #36c38c; }

  /* Hamburger drawn in CSS */
  .nav-toggle {
    display: none; position: relative;
    width: 4.4rem; height: 4.4rem; padding: 0;
    background: transparent; border: 0; cursor: pointer;
  }
  .js .nav-toggle { display: block; }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; height: 2px;
    background: #fff; transition: transform .2s ease, top .2s ease, opacity .2s ease;
  }
  .nav-toggle span { top: 50%; margin-top: -1px; }
  .nav-toggle span::before { left: 0; right: 0; top: -.8rem; }
  .nav-toggle span::after  { left: 0; right: 0; top: .8rem; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

  .js .nav-primary { display: none; }
  .js .nav-primary.is-open {
    display: block;
    max-height: calc(100vh - 5.6rem); max-height: calc(100svh - 5.6rem);
    overflow-y: auto;
  }
  .nav-primary .menu { text-align: left; font-size: 1.8rem; }
  .nav-primary .menu > li { display: block; }
  .nav-primary .menu a {
    width: auto; padding: 1.4rem 1.6rem;
    border-top: 0; border-left: 3px solid transparent;
  }
  .nav-primary .menu a:hover,
  .nav-primary .menu a:focus-visible,
  .nav-primary .menu .current > a { border-left-color: #36c38c; }
  .nav-primary .sub-menu {
    position: static; left: auto; opacity: 1; width: auto;
  }
  .nav-primary .sub-menu a { width: auto; padding: 1.2rem 1.6rem 1.2rem 3.2rem; }

  .site-inner { padding: 5%; }

  .entry { background: rgba(255, 255, 255, .92); padding: 2.4rem; }
  .entry-title { font-size: 3rem; }
  .bio-side, .bio-main { float: none; width: 100%; margin: 0; }
  .bio-main { margin-top: 2.4rem; }
  .portrait { display: block; margin: 0 auto 1.2rem; }

  /* Hero: fluid height with a readable text card over the photo */
  .home-top {
    min-height: calc(100vh - 5.6rem); min-height: calc(100svh - 5.6rem);
    display: flex; align-items: center; justify-content: center;
    padding: 2.4rem 1.6rem;
  }
  .hero-card {
    max-width: 46rem; padding: 2.4rem 1.6rem;
    background: rgba(0, 0, 0, .55); border-radius: 3px;
  }
  .home-top h1 { font-size: 3.6rem; }
  .home-top h2 { font-size: 2.4rem; margin-bottom: 0; }

  .footer-widgets { padding: 4rem 5% 1.6rem; }
  .footer-widgets .wrap { display: block; }
  .footer-widgets .widget { width: 100%; }
  .site-footer { padding: 2.4rem 1.6rem; line-height: 1.8; }
}

@media (max-width: 480px) {
  .site-inner { padding: 0; }
  .entry {
    background: #fff; border-radius: 0;
    margin-bottom: 0; padding: 2rem 1.6rem;
  }
  .entry-title { font-size: 2.6rem; }
  .brand { font-size: 1.8rem; }
  .home-top h1 { font-size: 3rem; }
  .home-top h2 { font-size: 2.2rem; }
  .portrait { width: 100%; max-width: 30rem; }
  .spacer { height: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
