/* The Driscoll Law Firm: single stylesheet.
   Panels open with plain anchor links (#about, #practice, ...) using :target,
   so the site works with JavaScript turned off. */

:root {
  --bg: #1b1f22;
  --panel: rgba(27, 31, 34, 0.88);
  --fg: #fff;
  --fg-dim: rgba(255, 255, 255, 0.75);
  --line: rgba(255, 255, 255, 0.35);
  --hover: rgba(255, 255, 255, 0.075);
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { font-size: 16px; }
@media (max-width: 480px) { html { font-size: 15px; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 300 1rem/1.65 var(--font);
  letter-spacing: 0.02em;
}

a { color: inherit; text-decoration: underline dotted rgba(255, 255, 255, 0.5); text-underline-offset: 3px; }
a:hover { text-decoration-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

h1, h2 { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5rem; line-height: 1.3; margin: 0 0 1rem; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; display: inline-block; border-bottom: 1px solid var(--fg); padding-bottom: 0.5rem; margin-bottom: 2rem; }
p { margin: 0 0 1.5rem; }
strong { font-weight: 600; }

/* Background photo */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(19, 21, 25, 0.5), rgba(19, 21, 25, 0.5)),
    url("/images/bg.jpg") center / cover no-repeat;
  transform: scale(1.08);
  transition: filter 0.3s ease, transform 0.3s ease;
}
body:has(.panel:target) .bg { filter: blur(0.2rem); transform: scale(1.12); }

/* Page layout */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 2rem 2rem;
}
#header, main { margin-block: auto; }
main { width: 100%; max-width: 40rem; }
main:not(.simple):not(:has(.panel:target)) { display: none; } /* keep the empty panel area out of the layout */

/* Header */
#header { display: flex; flex-direction: column; align-items: center; text-align: center; animation: fade-in 0.8s ease both; }
#header > * + * { position: relative; margin-top: 3.5rem; }
#header > * + *::before { content: ""; position: absolute; top: -3.5rem; left: 50%; width: 1px; height: 3.5rem; background: var(--fg); }

.logo { width: 5.5rem; height: 5.5rem; border: 1px solid var(--fg); border-radius: 50%; display: grid; place-items: center; }
.logo svg { width: 2.6rem; fill: var(--fg); }

.content { border-block: 1px solid var(--fg); max-width: 100%; padding: 3rem 2rem; }
.content p { text-transform: uppercase; letter-spacing: 0.2rem; font-size: 0.8rem; line-height: 2; margin: 0; }

nav ul { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--fg); border-radius: 4px; }
nav li + li { border-left: 1px solid var(--fg); }
nav a {
  display: block;
  min-width: 7.5rem;
  height: 2.75rem;
  line-height: 2.75rem;
  padding: 0 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
}
nav a:hover { background: var(--hover); }

@media (max-width: 736px) {
  h1 { font-size: 1.75rem; letter-spacing: 0.35rem; }
  .content { padding: 2rem 1rem; }
  .content p br { display: none; }
}
@media (max-width: 480px) {
  .wrapper { padding: 3rem 1.25rem 1.5rem; }
  nav ul { flex-direction: column; min-width: 12rem; }
  nav li + li { border-left: 0; border-top: 1px solid var(--fg); }
}

/* Panels (About / Practice / Services / Contact) */
.panel { display: none; position: relative; width: 100%; padding: 3.5rem 2.5rem 1.5rem; background: var(--panel); border-radius: 4px; }
.panel:target { display: block; animation: fade-in 0.35s ease both; }
body:has(.panel:target) #header { display: none; }
@media (max-width: 480px) { .panel { padding: 3rem 1.25rem 0.5rem; } }

.close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2rem; line-height: 1; text-decoration: none;
  transition: background-color 0.2s ease;
}
.close:hover { background: var(--hover); }

/* attorney.jpg has black bars on both sides; object-fit crops to the centered photo */
.portrait { display: block; width: 12.5rem; height: 13.75rem; object-fit: cover; margin: 0 auto 2rem; border-radius: 4px; }

.list { margin: -0.5rem 0 1.5rem; padding-left: 1.25rem; }
.list li { padding: 0.15rem 0; }
.list.columns { columns: 2; column-gap: 2rem; }
.list.columns li { break-inside: avoid; }
@media (max-width: 480px) { .list.columns { columns: 1; } }

.areas { margin: 0 0 1.5rem; }
.areas dt { font-weight: 600; text-transform: uppercase; letter-spacing: 0.15rem; font-size: 0.85rem; margin-top: 1.25rem; }
.areas dt:first-child { margin-top: 0; }
.areas dd { margin: 0.25rem 0 0; color: var(--fg-dim); }

/* Contact form */
.fields { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.field { flex: 1 1 100%; margin-bottom: 1.25rem; }
.field.half { flex-basis: calc(50% - 0.75rem); min-width: 12rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2rem; }
label .optional { font-weight: 300; text-transform: none; letter-spacing: 0; color: var(--fg-dim); }
input, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  color: var(--fg);
  font: inherit;
  border: 1px solid var(--fg);
  border-radius: 4px;
}
input { height: 2.75rem; }
textarea { resize: vertical; min-height: 7rem; }
input:focus, textarea:focus { background: var(--hover); }

button {
  height: 2.75rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 4px;
  font: 600 0.8rem/2.75rem var(--font);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
button.primary { background: var(--fg); color: var(--bg); }
button:hover { opacity: 0.85; }

.note { font-size: 0.85rem; color: var(--fg-dim); margin-bottom: 1.25rem; }
.hidden { display: none; }

address { font-style: normal; margin: 2rem 0 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Footer */
#footer { text-align: center; font-size: 0.8rem; letter-spacing: 0.1rem; color: var(--fg-dim); animation: fade-in 0.8s ease both; }
#footer p { margin: 0 0 0.5rem; }
#footer .fine { font-size: 0.7rem; opacity: 0.8; }

/* Simple centered page (404, thank-you) */
.simple { text-align: center; max-width: 32rem; }
.simple h1 { font-size: 1.75rem; }
.simple .button { display: inline-block; margin-top: 0.5rem; padding: 0 1.75rem; height: 2.75rem; line-height: 2.75rem; border: 1px solid var(--fg); border-radius: 4px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.2rem; font-size: 0.8rem; }
.simple .button:hover { background: var(--hover); }

@keyframes fade-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
