/*
 * Texas Patios customer account.
 *
 * Same company as the admin, different room. Staff live in the panel all day
 * and get the cool spec-sheet ground; a homeowner comes here twice, to find
 * out whether a person has looked at the request they sent about their own
 * backyard. So: same logo, same brand red and teal, same condensed label
 * voice -- warmer ground, larger type, more air.
 *
 * The palette is the site's own, not invented. #cf1717 is the public
 * stylesheet's most-used colour by a wide margin, then #0e7c7c and #212529.
 */

:root {
  --ink:        #212529;
  --paper:      #FFFFFF;
  /* Warm off-white, not the admin's cool limestone: cedar and flagstone
     photographs sit on this, and a customer is not reading a spec sheet. */
  --ground:     #F6F3EF;
  --water:      #0E7C7C;   /* the action colour */
  --water-deep: #0A5E5E;
  --brand:      #CF1717;   /* the logo, and errors */
  --brand-pale: #FCEBEB;

  --line:       #E2DCD4;
  --text:       #212529;
  --text-quiet: #4A4540;   /* 8.4:1 on --ground */

  --shadow: 0 1px 2px rgba(33,37,41,.05), 0 10px 30px rgba(33,37,41,.07);
  --radius: 4px;
}

@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial Narrow'), local('Helvetica Neue Condensed');
  size-adjust: 104%;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--water-deep); }

/* ---------- the label voice, shared with the admin ---------- */
.nav a, .btn, .pill, th, .eyebrow {
  font-family: "Barlow Condensed", "Barlow Condensed Fallback", Arial Narrow, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead .wordmark { display: block; line-height: 0; }
.masthead .wordmark img { height: 38px; width: auto; }
.masthead .nav { display: flex; gap: 22px; flex-wrap: wrap; margin-right: auto; }
.masthead .nav a {
  color: var(--text-quiet);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.masthead .nav a:hover { color: var(--ink); }
.masthead .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.masthead form { margin: 0; }
.masthead .link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-quiet); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.masthead .link:hover { color: var(--brand); }

/* A masthead with no nav (signed out) should not push the logo to the left
   edge of a 1900px screen with nothing beside it. */
.masthead:not(:has(.nav)) { justify-content: center; }

/* ---------- page body ---------- */
.wrap {
  width: min(880px, 100% - 40px);
  margin: 40px auto;
  flex: 1;
}

h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
h2 { font-size: 20px; margin: 40px 0 14px; }
.lede { color: var(--text-quiet); margin: 0 0 32px; font-size: 17px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------- quote requests ---------- */
.quotes { display: grid; gap: 14px; }
.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--water);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 20px;
  align-items: start;
}
.quote h3 { margin: 0; font-size: 19px; }
.quote .when { grid-column: 1; color: var(--text-quiet); font-size: 14px; }
.quote .pill { grid-column: 2; grid-row: 1 / span 2; }
.quote .msg {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-quiet);
  white-space: pre-wrap;
}

/* ---------- status pills, same meanings as the admin ---------- */
.pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 11px;
  border: 1px solid;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-new       { border-color: var(--water); color: var(--water-deep); background: #E9F3F1; }
.pill-contacted,
.pill-quoted    { border-color: #C3A94B; color: #7A6413; background: #FBF5E2; }
.pill-won       { border-color: #3E8E4F; color: #2C6B39; background: #EAF4EC; }
.pill-lost      { border-color: var(--line); color: var(--text-quiet); background: var(--ground); }

/* ---------- empty states are an invitation, not an apology ---------- */
.empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-quiet);
}
.empty p { margin: 0 0 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  font-size: 14px;
  border: 1px solid var(--water);
  border-radius: var(--radius);
  background: var(--water);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--water-deep); border-color: var(--water-deep); }

/* ---------- saved photos ---------- */
.favorites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.favorites a { display: block; line-height: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.favorites img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform .35s ease; }
.favorites a:hover img { transform: scale(1.04); }

/* ---------- sign in / register ---------- */
.auth { width: min(400px, 100%); margin: 60px auto; }
.auth h1 { font-size: 27px; margin-bottom: 4px; }
.auth .lede { margin-bottom: 24px; font-size: 16px; }
.auth label { display: block; margin-top: 16px; font-size: 14px; color: var(--text-quiet); }
.auth input {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.auth input:focus { outline: 2px solid var(--water); outline-offset: 1px; border-color: var(--water); }
.auth .btn { width: 100%; margin-top: 22px; }
.auth .alt { margin: 20px 0 0; font-size: 15px; }
.auth .alt + .alt { margin-top: 8px; color: var(--text-quiet); font-size: 14px; }
.err {
  margin: 0 0 4px;
  padding: 11px 14px;
  background: var(--brand-pale);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  color: #8E1010;
  font-size: 15px;
}

/* ---------- footer ---------- */
.footer {
  padding: 26px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-quiet);
  font-size: 14px;
}
.footer a { color: var(--text-quiet); }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .masthead { gap: 12px 18px; padding: 12px 16px; }
  .masthead .wordmark img { height: 32px; }
  .masthead .nav { gap: 16px; width: 100%; order: 3; margin-right: 0; }
  .masthead .nav a { font-size: 13px; }
  .masthead form { margin-left: auto; }
  .wrap { margin: 28px auto; width: calc(100% - 32px); }
  .quote { grid-template-columns: 1fr; }
  .quote .pill { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .favorites { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .favorites img { height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .favorites img { transition: none; }
  .favorites a:hover img { transform: none; }
}
