/* ============================================================================
   LRJ Communications — public site styles.
   The page layouts themselves are inline-styled in the PHP templates (ported
   1:1 from the approved design, so they stay pixel-accurate). This file holds
   only what inline styles can't express: resets, fonts, hover/focus states,
   the nav dropdowns, and entrance animations.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* The two typefaces, chosen on the Settings screen. The layout sets these
   variables per page; the values here are the design's own, so the site looks
   exactly as it always has until someone changes the setting — and still does
   if the <style> tag is ever missing. */
:root { --lrj-font-head: 'Cormorant Garamond', serif; --lrj-font-body: 'Hanken Grotesk', system-ui, sans-serif; }
body { margin: 0; font-family: var(--lrj-font-body); color: #3a3338; -webkit-font-smoothing: antialiased; background: #fff; }

/* Headings carry their face in an inline style, which no stylesheet can
   override without !important. Rather than rewrite a hundred inline styles
   across every template — and change what a visitor's page looks like byte for
   byte — this matches exactly the elements the design set in the heading face
   and points them at the variable instead. */
[style*="Cormorant Garamond"] { font-family: var(--lrj-font-head) !important; }
img { max-width: 100%; }
::selection { background: #340135; color: #FAF6EF; }
input, textarea, button, select { font-family: inherit; }
a { color: #340135; text-decoration: none; }
a:hover { color: #A8702F; }

@keyframes lrjRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lrjFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lrjDrift { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(0,-20px) rotate(3deg); } }
.lrj-rise { animation: lrjRise .9s both; }
.lrj-fade { animation: lrjFade .8s both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .5s; }

/* ---- Buttons: hover states ---------------------------------------------- */
.btn { cursor: pointer; display: inline-block; text-decoration: none; border: none; transition: background .25s, border-color .25s, transform .2s; }
.btn-gold { background: #A8702F; color: #FAF6EF; }
.btn-gold:hover { background: #4d1b4f; color: #FAF6EF; }
.btn-ghost { background: transparent; color: #340135; border: 1px solid #d8c9b3; }
.btn-ghost:hover { border-color: #340135; color: #340135; }
.btn-cream { background: #FAF6EF; color: #3E2723; }
.btn-cream:hover { background: #fff; }

/* ---- Cards: hover lift --------------------------------------------------- */
.hov-lift { transition: transform .3s, box-shadow .3s; }
.hov-lift:hover { transform: translateY(-4px); box-shadow: 0 18px 44px -26px rgba(52,1,53,.5); }

/* ---- Nav ----------------------------------------------------------------- */
.nav-link { font-size: 13px; letter-spacing: 0.13em; text-transform: uppercase; color: #4a4248; font-weight: 500; text-decoration: none; }
.nav-link:hover, .nav-link.active { color: #340135; }
.nav-drop { position: relative; }
.nav-drop__panel { position: absolute; top: 100%; left: -18px; padding-top: 16px; z-index: 60; display: none; }
.nav-drop:hover .nav-drop__panel { display: block; }
/* On a touch screen the browser fakes a hover on the first tap, which opened
   this panel and swallowed the tap at the same time. There, the panel opens
   from a class the script sets instead — see public/assets/site.js. */
@media (hover: none) {
  .nav-drop:hover .nav-drop__panel { display: none; }
  .nav-drop.is-open .nav-drop__panel { display: block; }
}
.nav-drop__inner { background: #fff; border-radius: 14px; box-shadow: 0 22px 50px -24px rgba(52,1,53,.5); padding: 8px; display: flex; flex-direction: column; }
.nav-drop__item { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #C77F3E; font-weight: 600; padding: 11px 16px; border-radius: 9px; transition: background .2s; text-decoration: none; white-space: nowrap; }
.nav-drop__item:hover { background: #F6EFE4; color: #C77F3E; }

/* ---- Menu / list hover --------------------------------------------------- */
.hov-menu { transition: background .25s; }
.hov-menu:hover { background: #FAF6EF; }
.hov-rail:hover { background: #fff; }

/* ---- Forms --------------------------------------------------------------- */
.lrj-input { width: 100%; font-size: 15px; color: #221C20; background: #fff; border: 1px solid #E0D7C9; border-radius: 12px; padding: 13px 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.lrj-input:focus { border-color: #340135; box-shadow: 0 0 0 3px rgba(199,127,62,.12); }

/* ---- Footer social ------------------------------------------------------- */
.soc { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #DACDBB; display: flex; align-items: center; justify-content: center; color: #340135; text-decoration: none; transition: all .2s; }
.soc:hover { background: #340135; color: #FAF6EF; border-color: #340135; }
.foot-link { font-size: 14.5px; color: #4a4248; text-decoration: none; cursor: pointer; }
.foot-link:hover { color: #340135; }

/* ---- Mobile navigation ----------------------------------------------------
   Hidden above the breakpoint; the desktop nav is hidden below it. Built on
   <details>/<summary> so it works with no JavaScript — see the note in
   app/views/public/partials/nav.php for why that matters here.             */
.lrj-nav-mobile { display: none; }
.lrj-burger {
  list-style: none; cursor: pointer; color: #340135; display: flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;   /* 44px: a real tap target */
  border-radius: 10px; transition: background .2s;
}
.lrj-burger::-webkit-details-marker { display: none; }   /* Safari's triangle */
.lrj-burger::marker { content: ''; }
.lrj-burger:hover { background: rgba(52,1,53,.06); }
.lrj-nav-mobile summary:focus-visible { outline: 2px solid #C77F3E; outline-offset: 2px; }
/* The three bars become an X when open, so the control says what it will do. */
.lrj-nav-mobile[open] .lrj-burger__top { transform: translateY(6px) rotate(45deg); }
.lrj-nav-mobile[open] .lrj-burger__bot { transform: translateY(-6px) rotate(-45deg); }
.lrj-nav-mobile[open] .lrj-burger__mid { opacity: 0; }
.lrj-burger__top, .lrj-burger__mid, .lrj-burger__bot {
  transform-origin: center; transition: transform .2s ease, opacity .2s ease;
}
/* A closed <details> normally hides its own content, but an absolutely
   positioned child escapes that — it is out of flow, so the browser's hiding
   does not reach it. Without this rule the panel renders permanently open on
   every mobile page. Verified in Chromium: details.open was false while the
   panel still computed to display:flex at 584px tall. */
.lrj-nav-mobile:not([open]) .lrj-nav-panel { display: none; }
.lrj-nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid #ECE3D5;
  box-shadow: 0 18px 40px -22px rgba(52,1,53,.35);
  padding: 10px 24px 22px; display: flex; flex-direction: column;
  /* Viewport-relative, not percentage: a percentage here would resolve against
     the header, not the screen. Keeps a long menu (Services expands to every
     published service) scrollable rather than running off the bottom. */
  max-height: 72vh; overflow-y: auto;
}
.lrj-nav-panel__link {
  padding: 14px 4px; font-size: 16px; color: #340135; text-decoration: none;
  font-weight: 500; border-bottom: 1px solid #F3EDE3;
}
.lrj-nav-panel__link.active { color: #A8702F; }
.lrj-nav-panel__child {
  padding: 11px 4px 11px 20px; font-size: 14.5px; color: #56504e;
  text-decoration: none; border-bottom: 1px solid #F7F2EA;
}
.lrj-nav-panel__cta { margin-top: 16px; text-align: center; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: 13px 22px; border-radius: 40px; }

/* ---- Responsive ---------------------------------------------------------- */
/* Nothing on a public page may be wider than the screen. A single element that
   is takes the whole document with it, and the reader then scrolls sideways on
   every page of the site. */
img, svg, video { max-width: 100%; }
@media (max-width: 560px) {
  .lrj-grid-steps { grid-template-columns: 1fr !important; }
}

/* The footer: four fixed columns (1.5fr 0.8fr 1.1fr 1.3fr) that never
   collapsed, so every page of the site — not just the homepage — scrolled
   sideways on a phone. Measured at 400px: the document came out 630px wide on
   all eight pages. */
@media (max-width: 900px) {
  .lrj-grid-foot { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}
@media (max-width: 560px) {
  .lrj-grid-foot { grid-template-columns: 1fr !important; }
}
/* A long word with nowhere to break is as wide as itself, whatever the column
   says — a service name or an email address is enough to do it. */
.foot-link, .lrj-grid-foot { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .lrj-nav-desktop { display: none !important; }
  .lrj-nav-mobile { display: block; }
  .lrj-grid-2, .lrj-grid-3 { grid-template-columns: 1fr !important; }
  .lrj-hero-grid { grid-template-columns: 1fr !important; }
  /* The six "how it works" steps. This one had no rule at all, so on a phone it
     stayed six columns wide and dragged the whole homepage sideways: the page
     came out 646px wide in a 400px window. Two abreast down to 560px, then one.
     Measured on the real page, not guessed — and it affected VISITORS, which is
     why it matters more than the rest of this. */
  .lrj-grid-steps { grid-template-columns: repeat(2, 1fr) !important; }
  h1 { font-size: 44px !important; }

  /* Sticky side panels must let go once the grid is a single column.
     Otherwise the panel pins to the top of the viewport and the rest of the
     page scrolls away underneath it — reported on every service page. These
     rules are written inline in the templates, so !important is what it takes
     to reach them; moving those styles into classes is tracked separately. */
  .lrj-grid-2 > [style*="position:sticky"],
  .lrj-grid-2 > [style*="position: sticky"],
  .lrj-hero-grid > [style*="position:sticky"],
  .lrj-hero-grid > [style*="position: sticky"] {
    position: static !important;
    top: auto !important;
  }
}

/* ---- The staff bar ----------------------------------------------------------
   Shown only to a signed-in editor; a visitor's page never contains it.

   Fixed to the TOP, above the site's own sticky navigation. Two things follow
   from that, and both need the bar's height:
     - the page is pushed down by it, or the bar sits on top of the nav;
     - the sticky header starts below it rather than at 0 (set inline in
       nav.php, because an inline style cannot be overridden from here).

   The height is not a constant: the bar wraps to two rows on a narrow screen
   and the maintenance notice is longer. So edit.js measures it and publishes
   --lrj-staffbar-h. The fallbacks below are what gets used in the moment before
   that runs — and if JavaScript never runs at all, because the bar is still
   rendered server-side either way. */
.lrj-staffbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 20px;
  background: #340135; color: #f3e8f3;
  font-family: var(--lrj-font-body); font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 6px 24px -12px rgba(52, 1, 53, .6);
}
body.lrj-has-staffbar { padding-top: var(--lrj-staffbar-h, 46px); }
/* An orange edge, so "visitors cannot see this site" is not something you have
   to read the sentence to notice. */
.lrj-staffbar.is-maint { background: #4a0426; box-shadow: inset 0 -3px 0 #E8804A, 0 6px 24px -12px rgba(52, 1, 53, .6); }
.lrj-staffbar b { color: #fff; }
.lrj-staffbar__msg { min-width: 0; }
.lrj-staffbar__acts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.lrj-staffbar__dot {
  width: 9px; height: 9px; border-radius: 50%; background: #E8804A; flex: none;
  box-shadow: 0 0 0 3px rgba(232, 128, 74, .25);
}
.lrj-staffbar__note { font-size: 12.5px; color: #c9b3ca; }
.lrj-staffbar__note.is-ok  { color: #A9D8B4; }
.lrj-staffbar__note.is-bad { color: #F2A8A0; }

.lrj-sb-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 8px 15px; border-radius: 30px;
  background: transparent; color: #f3e8f3; border: 1px solid rgba(255,255,255,.35);
}
.lrj-sb-btn:hover { background: rgba(255,255,255,.1); }
.lrj-sb-btn.is-primary { background: #C77F3E; border-color: #C77F3E; color: #fff; }
.lrj-sb-btn.is-primary:hover { background: #b06f33; }
.lrj-sb-btn[disabled] { opacity: .6; cursor: progress; }
.lrj-sb-link { color: #E8B27C; font-weight: 600; white-space: nowrap; }

/* ---- Editing mode -----------------------------------------------------------
   An outline on what can be changed, so it is obvious what is editable without
   having to hunt. Applied only while editing, and only to marked elements. */
.lrj-editing [data-edit] {
  outline: 2px dashed rgba(199, 127, 62, .55);
  outline-offset: 3px; border-radius: 3px; cursor: text;
  /* The homepage's closing headline sits inside an overlay the design makes
     click-through (pointer-events:none) so the picture behind it stays visible.
     A child can opt back in, and an editable thing has to be clickable or there
     is no way to put the cursor in it. */
  pointer-events: auto;
}
.lrj-editing [data-edit]:hover { outline-color: #C77F3E; background: rgba(199, 127, 62, .06); }
.lrj-editing [data-edit]:focus { outline: 2px solid #C77F3E; background: rgba(199, 127, 62, .08); }
.lrj-editing [data-edit-image] { outline: 2px dashed rgba(199, 127, 62, .55); outline-offset: 3px; }

.lrj-edit-img {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 30px; border: 0;
  background: rgba(52, 1, 53, .88); color: #fff;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .6);
}
.lrj-edit-img:hover { background: #340135; }

@media (max-width: 700px) {
  .lrj-staffbar { padding: 9px 16px; font-size: 12.5px; gap: 10px; }
  .lrj-staffbar__acts { margin-left: 0; width: 100%; }
  /* Two rows down here, so the fallback has to be taller. Once edit.js has
     measured the real thing this is overridden anyway. */
  body.lrj-has-staffbar { padding-top: var(--lrj-staffbar-h, 92px); }
}
