/*
 * application.css: the look of the whole site (black and white, one bright accent).
 * Category: assets (stylesheet).
 */

/* Colors live in one place so they are easy to change. */
:root {
  --black: #111111;
  --white: #ffffff;
  --grey: #eeeeee;
  --accent: #ff5a1f; /* the one bright color, used for buttons */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  /* Clean system fonts: no downloads needed. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden; /* stops the full-width hero causing a sideways scroll */
}

/* Page content: centered with generous white space. */
main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

/* Buttons use the accent color. */
.button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Menu bar ---------- */

.site-header {
  border-bottom: 1px solid var(--black);
}

.menu {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

.menu-links {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-links a {
  text-decoration: none;
  padding-bottom: 0.2rem;
}

/* Highlight the current page with an underline. */
.menu-links a.active {
  border-bottom: 2px solid var(--black);
  font-weight: 600;
}

/* The checkbox and its "Menu" label are only used on phones. */
.menu-toggle,
.menu-button {
  display: none;
}

/* ---------- Phones: collapse the links behind the "Menu" button ---------- */

@media (max-width: 40rem) {
  .menu-button {
    display: block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
  }

  /* Links are hidden until the checkbox is ticked. */
  .menu-links {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    padding-top: 1rem;
  }

  .menu-toggle:checked ~ .menu-links {
    display: flex;
  }

  h1 {
    font-size: 2rem;
  }
}

/* ---------- Landing page ---------- */

/* Thank-you message under the menu bar. */
.notice {
  margin: 0;
  padding: 1rem 1.5rem;
  background: var(--black);
  color: var(--white);
  text-align: center;
}

/* Hero: the photo stretches edge to edge, with a dark layer on top for readable text. */
.hero {
  margin: -4rem calc(50% - 50vw) 4rem; /* cancel main's padding, go full width */
  padding: 8rem 1.5rem;
  background-color: var(--black);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.55); /* the dark overlay */
  color: var(--white);
  text-align: center;
}

.hero-text {
  max-width: 40rem;
  margin: 0 auto;
}

.hero p {
  margin: 0;
  font-size: 1.25rem;
}

.services ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services li strong {
  display: block;
}

/* Quote form. */
.quote {
  margin-top: 4rem;
}

.quote summary {
  display: inline-block; /* looks like a button */
  list-style: none;
}

.quote form {
  max-width: 30rem;
  margin-top: 1.5rem;
}

.quote label {
  display: block;
  margin: 1rem 0 0.25rem;
  font-weight: 600;
}

.quote input[type="text"],
.quote input[type="tel"],
.quote input[type="email"],
.quote select,
.quote textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--black);
  border-radius: 4px;
  font: inherit;
}

.quote input[type="submit"] {
  margin-top: 1.5rem;
}

.errors {
  padding: 0.75rem 1rem 0.75rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* The spam-trap field is moved off screen (not display:none, which bots can spot). */
.honeypot {
  position: absolute;
  left: -9999px;
}

/* About page: headshot and bio side by side; stacked on phones. */
.about {
  display: flex;
  flex-wrap: wrap; /* wraps under the photo when the screen is narrow */
  gap: 2rem;
  align-items: flex-start;
}

.about img {
  width: 100%;
  max-width: 20rem;
  height: auto;
}

.about > div {
  flex: 1 1 18rem; /* grows to fill the row, drops below the photo on phones */
}

/* Portfolio page: each job has text, then a photo grid (1 column on phones). */
.job {
  margin-bottom: 3rem;
}

.job-meta {
  color: var(--accent);
  font-weight: 600;
}

.job-photos {
  display: grid;
  grid-template-columns: 1fr; /* one column on phones */
  gap: 1rem;
}

.job-photos img {
  width: 100%;
  height: auto;
}

@media (min-width: 40rem) {
  .job-photos {
    grid-template-columns: repeat(3, 1fr); /* three across on wider screens */
  }
}
