/* Styling after www.premierphoneplus.com: blues + blue-green on white. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #0067d6;
  --blue-mid: #2364da;
  --navy: #243474;
  --ink: #313131;
  --muted: #828282;
  --subhead: #4f4f4f;
  --nav-link: rgba(0, 0, 0, 0.6);
  --tint: #e5f4f6;
  --line: #dfe3e8;
  --bg: #fff;
  --danger: #cf2e2e;
  --body: "Roboto", arial, sans-serif;
  --heading: "Montserrat", helvetica, arial, sans-serif;
  --width: 1080px;
  --header-width: 1600px;
  --header-h: 60px;
  --radius: 8px;
  --gap: 1.25rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
}

h1, h2 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 1.75rem; margin: 0 0 calc(var(--gap) * 1.5); }
h2 { font-size: 1.375rem; margin: 0 0 var(--gap); }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Content column: the original's 80%-capped-at-1080px container. */
.wrap {
  width: 80%;
  max-width: var(--width);
  margin: 0 auto;
}

/* Standalone forms (log in, and friends): a centred, narrow column. */
.auth {
  max-width: 26rem;
  margin: 0 auto;
}

.auth input:not([type="submit"]),
.auth select {
  max-width: none;
}

/* Center the submit button and give it a little room above. */
.auth form button[type="submit"],
.auth form input[type="submit"] {
  display: block;
  margin: 0.75rem auto 0;
}

.auth p:last-of-type {
  text-align: center;
}

/* Header bar spans nearly the whole width, unlike the content column. */
.header-inner {
  width: 96%;
  max-width: var(--header-width);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Header: sticky, brand left, links right. */
body > header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
  font-family: var(--heading);
}

body > header .brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

body > header .brand img {
  height: 38px;
  width: auto;
}

body > header .brand:hover { text-decoration: none; }

/* Nav links follow the original menu: 14px Roboto 600, 60% black. The
   original's inline `li { font-family: Roboto }` overrides the Montserrat
   set on the header, so the links are Roboto while the brand is Montserrat. */
body > header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--nav-link);
}

body > header .who {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--nav-link);
}

body > header nav a {
  color: var(--nav-link);
}

body > header nav a {
  transition: opacity 0.4s ease-in-out;
}

body > header nav a:hover,
body > header nav a:focus {
  opacity: 0.7;
  text-decoration: none;
}

body > header nav form { margin: 0; }

body > header nav button {
  font: inherit;
  /* Re-stated because the generic button rule below sets a weight. */
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  color: var(--nav-link);
  cursor: pointer;
  transition: opacity 0.4s ease-in-out;
}

body > header nav button:hover,
body > header nav button:focus { opacity: 0.7; }

/* Messages */
body > ul {
  max-width: var(--width);
  margin: var(--gap) auto;
  padding: var(--gap) var(--gap) var(--gap) 2.5rem;
  list-style: none;
  border-radius: var(--radius);
  background: var(--tint);
  border-left: 4px solid var(--blue);
}

body > ul li.error { color: var(--danger); }

main { max-width: var(--width); margin: 0 auto; padding: var(--gap); }

/* Home: a section per domain, a responsive card per auto attendant. */
.domain { margin-bottom: calc(var(--gap) * 2); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  padding: var(--gap);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* The upload is the card's only call to action, so centre the button.
   The label and field stay left-aligned. */
.card form input[type="submit"],
.card form button[type="submit"] {
  display: block;
  margin: 0 auto;
}

/* Auto attendant: extension as the marker, name as the label. */
.card h3 {
  font-family: var(--heading);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.card .position {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--subhead);
  margin: 0.125rem 0 var(--gap);
}

.muted { color: var(--muted); }

main audio { display: block; width: 100%; max-width: 320px; margin: 0.5rem 0; }

/* Forms */
form p { margin: 0 0 0.75rem; }
label { display: block; font-weight: 500; margin-bottom: 0.25rem; }

input:not([type="submit"]),
select,
textarea {
  font: inherit;
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
}

.helptext, p.help { display: block; font-size: 0.8125rem; color: var(--muted); }

button, input[type="submit"] {
  font: inherit;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

button:hover, input[type="submit"]:hover { background: var(--blue-mid); }

.errorlist {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  color: var(--danger);
  font-size: 0.8125rem;
}

body > footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

@media (max-width: 767px) {
  /* The nav drops below the brand, so centre it in the space it has. */
  .header-inner {
    width: 96%;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  body > header .brand { margin-right: 0; }
  body > header .who { display: none; }
  body > header nav { width: 100%; }
  body > header nav ul {
    justify-content: center;
    gap: 0.75rem;
  }
  body > header .brand img { height: 30px; }
  h1 { font-size: 1.375rem; }
}
