/* muralboy — phone.css
   Phone: everything stacked, one column, no hamburger.
   Default stylesheet; demoted by the inline JS on wide screens. */
:root {
  --bg: #f7f1dc;
  --ink: #2b2b2b;
  --accent: #1a3a6b;
  --bar: #1a3a6b;
  --bar-ink: #f7f1dc;
  --rule: #d8d0b0;
}

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--side, #cfc7a8);
  color: var(--ink);
  font-family: inherit;
  line-height: 1.6;
}

/* the page: a fixed-width sheet, centered in the window.
   On ultrawide the --side background shows left AND right of it.
   On phone the frame is full-width (no side padding visible).
   3D: layered drop shadows (tight contact + wide soft), hairline edges,
   light top bevel. */
.frame {
  position: relative;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1.5rem; /* no bottom padding — the footer sits flush on the frame's bottom edge */
  background: var(--bg);
  border: 1px solid #b8ae8c;
  border-radius: 6px;
  box-shadow:
    0 1px 2px rgba(43, 43, 43, 0.35),
    0 10px 24px -6px rgba(43, 43, 43, 0.45),
    0 30px 60px -12px rgba(43, 43, 43, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

/* ── grain bar (nav + footer) ─────────────────────────────
   Spans 100% of the frame's inner width, square corners, no bleed.
   Still a raised slab (own shadow + inset bevel) so it reads as
   part of the page design. Scrolls with the page — not sticky. */
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  margin-bottom: 1.25rem; /* room for the slab's drop shadow */
  /* no explicit width — the block stretches between the two negative
     margins below, so it reaches the frame's inner edge on BOTH sides
     (a width:100% + negative-margin combo left a 1.5rem gap on the right) */
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  background-color: var(--bar);
  color: var(--bar-ink);
  /* SVG feTurbulence grain, python.org-style overlay */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  padding: 0;
  box-shadow:
    0 2px 4px rgba(43, 43, 43, 0.4),
    0 8px 18px -4px rgba(43, 43, 43, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* phone: tighter buttons so all four fit on one line (~360px) */
.bar a {
  display: inline-block;
  padding: 0.5rem 0.5rem;
  color: var(--bar-ink);
  text-decoration: none;
  /* 3D raised button: lighter top, darker bottom edge + drop shadow. */
  background: linear-gradient(#2a568f, #16305a);
  border: 1px solid #0f2444;
  border-bottom: 3px solid #0f2444;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 3px 0 #0f2444, 0 4px 8px rgba(0, 0, 0, 0.35);
  margin: 0.45rem 0.15rem;
  transition: box-shadow 0.06s ease, transform 0.06s ease, background 0.06s ease;
}

.bar a:hover {
  color: #fff;
  background: linear-gradient(#33629f, #1a3a6b);
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2444, 0 2px 4px rgba(0, 0, 0, 0.35);
}

.bar a.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(#1a3a6b, #12294f);
  border-bottom-width: 1px;
  padding-bottom: calc(0.5rem - 2px);
  box-shadow: 0 1px 0 #0f2444, inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateY(2px);
}

/* ── hero ───────────────────────────────────────────────── */
/* min-height ≈ 1.8× the natural content height (~11.3rem) → ~20rem */
.hero {
  max-width: 100%;
  margin: 0 auto;
  min-height: 20rem;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  /* photo backdrop, full cover, heavier cream veil so text stays legible */
  background:
    linear-gradient(rgba(247, 241, 220, 0.55), rgba(247, 241, 220, 0.72)),
    url("images/mural-01.png") center 30% / cover no-repeat;
}

#herologo {
  width: 3em;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.tag {
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

/* ── pages ──────────────────────────────────────────────── */
.page {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}

.page p { margin: 0 0 1rem; }

/* gallery grid: 1 column on phone */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* a cell: a raised frame that crops its image to the frame size.
   Reset the button defaults so the <button> behaves like a frame. */
.cell {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0.5rem; /* mat border, like a picture frame */
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--bg);
  border: 1px solid #b8ae8c;
  border-radius: 5px;
  box-shadow:
    0 1px 2px rgba(43, 43, 43, 0.3),
    0 8px 18px -6px rgba(43, 43, 43, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: box-shadow 0.08s ease, transform 0.08s ease;
}

.cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop to the frame */
  border: 1px solid var(--rule);
}

.cell:hover {
  transform: translateY(2px);
  box-shadow:
    0 1px 2px rgba(43, 43, 43, 0.3),
    0 4px 10px -4px rgba(43, 43, 43, 0.45);
}

.cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── links ──────────────────────────────────────────────── */
a { color: var(--accent); }
a:hover { color: #12294f; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mail {
  display: inline-block;
  margin-top: 0.5rem;
}

/* ── footer (reuses the bar's grain + deep blue) ─────────
   Sits flush on the frame's bottom edge (frame has no bottom
   padding). Extended down with min-height so it reads as a
   solid base for the page, not a thin strip.
   Overrides .bar's row flex: stack the spans vertically,
   centered, so name/tag/penguin/copyright read top-to-bottom. */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  padding: 1.25rem 1.5rem;
  margin-top: 4.5rem;
  border-radius: 0 0 5px 5px; /* tuck under the frame's 6px bottom corners + 1px border */
}

/* ── hero CTA links ─────────────────────────────────────── */
.cta { margin-top: 1.5rem; }
.cta a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  margin: 0.25rem;
  background: linear-gradient(#2a568f, #16305a);
  color: #f7f1dc;
  text-decoration: none;
  border: 1px solid #0f2444;
  border-bottom: 3px solid #0f2444;
  border-radius: 4px;
  box-shadow: 0 3px 0 #0f2444, 0 4px 8px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.06s ease, transform 0.06s ease, background 0.06s ease;
}
.cta a:hover {
  color: #fff;
  background: linear-gradient(#33629f, #1a3a6b);
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2444, 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* ── how i work: steps ──────────────────────────────────── */
.step { margin-bottom: 1.5rem; }
.step:last-child { margin-bottom: 0; }
.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.step p { margin: 0; }

/* ── services list ──────────────────────────────────────── */
.svc {
  margin: 0;
  padding-left: 1.25rem;
}
.svc li { margin-bottom: 0.5rem; }

.foot span {
  display: block;
  margin: 0.25rem 0;
  font-size: 0.9rem;
}
.foot-name { font-weight: 600; }
.foot-tag { opacity: 0.85; }
.foot-copy { opacity: 0.65; margin-top: 0.75rem; }
.foot-tux {
  width: 3.5rem;
  height: auto;
  margin: 0.75rem 0 0.25rem;
}

/* ── quote form (display only — not wired up) ──────────── */
.quote {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.quote > label,
.quote fieldset legend {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.quote input[type="email"],
.quote input[type="text"],
.quote textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  background: #fffdf5;
  color: var(--ink);
  font: inherit;
  border: 1px solid #b8ae8c;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.quote input:focus-visible,
.quote textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.quote textarea {
  resize: vertical;
  min-height: 120px;
}

.quote fieldset {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.quote fieldset legend { padding: 0 0.35rem; }

.quote fieldset label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-weight: 400;
  color: var(--ink);
}

.quote .submit {
  align-self: flex-start;
  appearance: none;
  padding: 0.55rem 1.4rem;
  background: linear-gradient(#2a568f, #16305a);
  color: #f7f1dc;
  font: inherit;
  font-weight: 600;
  border: 1px solid #0f2444;
  border-bottom: 3px solid #0f2444;
  border-radius: 4px;
  box-shadow: 0 3px 0 #0f2444, 0 4px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: box-shadow 0.06s ease, transform 0.06s ease, background 0.06s ease;
}
.quote .submit:hover {
  background: linear-gradient(#33629f, #1a3a6b);
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2444, 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* ── lightbox (full-screen image view) ────────────────────
   Lives OUTSIDE the frame so it can cover the whole viewport. */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 24, 0.94);
  display: grid;
  place-items: center;
  padding: 3.5rem 3.5rem 3.5rem 1rem; /* room for the close button top-right */
  box-sizing: border-box;
}
#lightbox[hidden] { display: none; }

#lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 4px solid #e9e2c8;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

#lb-close,
#lb-next {
  position: absolute;
  appearance: none;
  background: linear-gradient(#2a568f, #16305a);
  color: #f7f1dc;
  border: 1px solid #0f2444;
  border-bottom: 3px solid #0f2444;
  border-radius: 5px;
  box-shadow: 0 3px 0 #0f2444, 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  line-height: 1;
  font-size: 1.4rem;
  padding: 0.6rem 1rem;
  transition: box-shadow 0.06s ease, transform 0.06s ease;
}
#lb-close { top: 1rem; right: 1rem; font-size: 1.8rem; padding: 0.35rem 0.9rem; }
#lb-next { right: 1rem; bottom: 1rem; }
#lb-close:hover,
#lb-next:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2444, 0 2px 5px rgba(0, 0, 0, 0.4);
}
