/* =========================================================================
   RE/MAX כחול לבן נתניה — brand.css
   The form language, derived from the mark. Loads after theme.css and home.css
   so it can override the base without either of them knowing it exists.

   Why this layer exists at all: the network's rules keep the logo on a neutral
   field with nothing over or behind it, so it lives boxed in the corner of the
   header and the brand never enters the page. Every other surface was
   orthogonal — rectangles and pills — which is what any builder produces by
   default, and the client read it, correctly, as a template. Adding more logo is
   not the fix. Deriving a form language from it is.

   Three moves, all taken from the mark itself:

     · THE SLASH   the "/" between RE and MAX, promoted from a glyph to the
                   angle every edge on this site is cut on.
     · THE BANDS   the balloon read as what it is — blue over white over red —
                   flattened into a rule that repeats at every scale.
     · THE ENVELOPE the balloon's dome, used as a portrait crop where a cut
                   corner would read as damage. See THE SQUAD below.

   Nothing here draws a balloon, and nothing here is an image. Every edge, band
   and curve is CSS: sharper at any size, weighs nothing, and changes in one line
   rather than in a regeneration. See BRAND-NOTES.md before replacing any of it
   with artwork.
   ========================================================================= */

:root {
  /* How far an edge climbs across the full width. vw, so the angle reads the
     same on a phone and on a 27" screen rather than going flat on one of them.
     The floor is 18px, not 26px: on a 390px screen a 26px rise is a 6.7% grade
     against 4.3% on desktop, which is a visibly steeper angle for the same
     idea — and it pushed the hero far enough past 100svh to matter. */
  --rise:     clamp(18px, 3.2vw, 68px);
  --rise-sm:  clamp(13px, 1.5vw, 30px);
  /* the horizontal bite a vertical slash takes out of a column */
  --cut:      clamp(28px, 4.6vw, 104px);
  --lean:     -12deg;

  --band-h:   5px;
  /* One middle value for every context. Pure white vanishes on paper and pure
     grey muddies on ink; this reads as white on the dark bands and as a soft
     neutral on the light ones, so the rule is literally the same object
     everywhere it appears. */
  --band-mid: #EDF1F6;
  --band:   linear-gradient(to left, var(--blue) 0 33.34%, var(--band-mid) 33.34% 66.67%, var(--red) 66.67% 100%);
  --band-v: linear-gradient(to bottom, var(--blue) 0 33.34%, var(--band-mid) 33.34% 66.67%, var(--red) 66.67% 100%);
}

/* A parallelogram leaning on the slash. Used instead of skewX() wherever the
   element already carries a transform — [data-rv] animates transform, and a
   skew declared here would out-specify it and kill the reveal. */
.rmx-lean,
.hero-rule,
.sec-head::before {
  clip-path: polygon(var(--band-h) 0, 100% 0, calc(100% - var(--band-h)) 100%, 0 100%);
}

/* ══════════════════════════════════════════════════ THE SECTION RULE
   Four sections share .sec-head — the squad, the properties, the testimonials
   and the blog. One rule above each of them is what turns a motif into a
   system: by the third repeat the reader has stopped noticing it and started
   expecting it. */
.sec-head { position: relative; padding-block-start: clamp(1.75rem, 3vw, 2.5rem); }
.sec-head::before {
  content: ''; position: absolute;
  inset-block-start: 0; inset-inline-start: 0;
  width: 96px; height: var(--band-h);
  background: var(--band);
}

/* ══════════════════════════════════════════════════ 02 · HERO
   The page's first edge is the thesis statement. Cutting the bottom of the hero
   on the slash means the very first transition on the site is the brand's own
   angle, before a single word of copy has to argue for it. */
.hero {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--rise)), 0 100%);
  /* the cut eats into the bottom-right, where the search card ends — give the
     whole column the height back so nothing is trimmed on any viewport */
  padding-block-end: var(--rise);
}

/* A colder, higher grade. The old still was shot from the ground; the plate this
   slot is built for is shot from the air, and altitude reads blue. */
.hero-bg::after {
  background:
    linear-gradient(to top, rgba(0,17,34,.96) 0%, rgba(0,19,38,.9) 22%, rgba(0,26,52,.58) 48%, rgba(0,34,68,.2) 74%, rgba(0,40,80,.08) 100%),
    linear-gradient(to bottom, rgba(0,17,34,.62), transparent 24%),
    linear-gradient(rgba(0,44,92,.28), rgba(0,26,52,.28));
}
.hero-still { filter: saturate(.88) contrast(1.06) brightness(.94); }

/* The hairline becomes the balloon. It is the smallest element on the page and
   it sits dead on the centre axis, directly under the promise — which makes it
   the one place a three-colour rule can carry the whole idea without shouting. */
.hero-rule {
  display: flex; background: none;
  height: 6px; width: min(70%, 268px);
}
.hero-rule i { flex: 1; }
.hero-rule i:nth-child(1) { background: var(--blue); }
.hero-rule i:nth-child(2) { background: #fff; }
.hero-rule i:nth-child(3) { background: var(--red); }

/* the figures separated by literal small slashes rather than by whitespace */
.hero-stats > div:not(:last-child)::after {
  content: ''; align-self: center; flex: 0 0 auto;
  width: 2px; height: 1.5em;
  margin-inline-start: clamp(.35rem, 1.2vw, 1.25rem);
  background: rgba(255,255,255,.32);
  transform: skewX(var(--lean));
}

/* ══════════════════════════════════════════════════ 03 · SEARCH
   The submit stays a full-strength red block — it is the one control on the page
   that must not be subtle — but its outer edge is cut on the slash, so the
   most-clicked element on the site carries the mark too. */
.seek-go {
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  padding-inline-end: calc(1.4rem + 14px);
}

/* ── the card sits ON the seam, half on the hero and half on paper ────────
   The obvious way to build this is to move the card out of the hero and hang it
   over the edge. It does not survive contact: the hero is `overflow: hidden` AND
   cut on the slash, so anything overhanging is trimmed — and with the card
   outside, keeping the whole of it inside the fold means knowing its height,
   which changes with the breakpoint and is not a number CSS can ask for.

   So the card does not move. The LINE does. Paper climbs to the card's own
   midpoint — 50% of the card, whatever the card currently measures — and gets
   cut on the same angle as the hero above it. Two parallel cuts, only one of
   them visible: the hero's real bottom edge is now paper against paper, and the
   edge you see is this one, crossing behind the card.

   Beside the card, not through it: .seek is a 92%-opaque white surface, so the
   seam passes behind it and surfaces in the margins on either side. What reads
   through the card is the faintest change of ground under a blur, which is the
   whole effect. */
.seek-wrap::before {
  content: ''; position: absolute; z-index: -1;
  inset-block-start: 50%;
  /* down past the hero's own cut, where the hero clips it away */
  inset-block-end: calc(-1 * (var(--rise) + 7rem));
  /* exactly viewport-wide, or the angle would not match the hero's */
  inset-inline: calc(-50vw + 50%);
  background: var(--paper);
  clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%);
}

/* ══════════════════════════════════════════════════ 05 · דבורה
   The straight column split was the single most template-like edge on the page:
   two rectangles, fifty-fifty, the default any builder produces. On the slash it
   becomes a composition — and her portrait already carries the palette the rule
   below it names. */
@media (min-width: 1000px) {
  .dvora-face { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%); }
  .dvora-side { padding-inline-end: clamp(1rem, 2vw, 2rem); }
}
@media (max-width: 999px) {
  .dvora-face { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--rise)), 0 100%); }
}
/* the cuff sits on the reading edge, clear of the diagonal on the other side */
.dvora-cuff i { height: var(--band-h); width: clamp(64px, 7.5vw, 124px); }

.dvora-stats > div { position: relative; }
.dvora-stats > div::before {
  content: ''; position: absolute;
  inset-block-start: 0; inset-inline-start: 0;
  width: 3px; height: 3px; background: var(--red);
}

/* ══════════════════════════════════════════════════ 06 · THE SQUAD
   The one section that does not take the slash.

   A cut corner is a graphic act, and on a photograph of a person it reads as
   damage rather than as design — twenty faces in a row, each with a slice taken
   off, and the eye goes to the missing corner instead of the face. Everywhere
   else on this site the cut lands on a building, a band or a button, which can
   take it.

   So the squad gets the other half of the mark instead: the balloon's envelope.
   An arched crop is that silhouette and nothing else, it is the one portrait
   frame that flatters a head-and-shoulders shot, and read along a moving strip
   twenty of them become a row of envelopes. The three bands are already under
   every name — envelope above, bands below, the whole logo per card, and not a
   balloon drawn anywhere.

   The ratio is the envelope's, not a generic semicircle: 50% of the width
   against 34% of the height, so the dome is broad and slightly squat the way the
   real one is. A true half-round reads as a church window. */
.squad-shot,
.mate-shot,
.mate-hero-shot {
  border-radius: 50% 50% 0 0 / 34% 34% 0 0;
  clip-path: none;
}

/* Lit from inside on hover. The resting scrim is the same navy as everywhere
   else; on hover it warms into RE/MAX blue, which is what an envelope does when
   the burner fires. Nothing moves and nothing is added — the light just changes. */
.squad-shot::after {
  background: linear-gradient(to top, rgba(0,17,34,.55), transparent 55%);
  transition: background .6s var(--e-out);
}
.squad-card a:hover .squad-shot::after {
  background: linear-gradient(to top, rgba(0,83,161,.62), rgba(0,83,161,.12) 42%, transparent 66%);
}

/* the name underline was a red bar; now it is the mark */
.squad-meta b::after { height: 3px; background: var(--band); }

/* ══════════════════════════════════════════════════ 07 · PROPERTIES
   The dense pole of the design, so the slash arrives here as detail rather than
   as structure: one cut edge per card, and a red sweep on hover that is the
   glyph itself moving across the photograph. */
.prop { border-radius: 0; }
.prop-shot {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--rise-sm)), 0 100%);
}
/* the wipe. z-index 2 puts it over the photograph and its scrim but under the
   status pill, which must stay legible while it passes */
.prop-shot::before {
  content: ''; position: absolute; z-index: 2; pointer-events: none;
  inset-block: -12%; width: 42%; inset-inline-start: -55%;
  background: linear-gradient(to left, rgba(224,28,47,0), rgba(224,28,47,.5) 45%, rgba(255,255,255,.28) 62%, rgba(224,28,47,0));
  transform: skewX(var(--lean));
  transition: inset-inline-start .95s var(--e-out);
}
.prop:hover .prop-shot::before { inset-inline-start: 118%; }

/* the status tag: a square-cut chip with the three bands running down its
   reading edge, instead of a generic pill */
.prop-sticker {
  border-radius: 2px; overflow: hidden;
  padding-inline-start: 1rem;
}
.prop-sticker::after {
  content: ''; position: absolute;
  inset-block: 0; inset-inline-start: 0; width: 4px;
  background: var(--band-v); --band-mid: #fff;
}
/* the blue hairline that draws across the top of a card on hover becomes the
   full mark — same interaction, now saying something */
.prop::before { height: var(--band-h); background: var(--band); }

/* ══════════════════════════════════════════════════ 09 · TESTIMONIALS
   The second structural cut. Hero, testimonials and the standing CTA all enter
   on the same angle, which is what gives the scroll a beat instead of seven
   equal horizontal bands. */
.quotes { clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%); }
.quotes > .wrap { padding-block-start: var(--rise); }
.quote { border-radius: 0; }
.quote-rule { height: var(--band-h); background: var(--band); --band-mid: #fff; }

/* ══════════════════════════════════════════════════ 10a · CLUBS
   Already carried a three-band rule under the lede before this layer existed —
   it was the one place the idea had surfaced on its own. Now it is the house
   style, so it only needs bringing onto the shared measurements. */
.clubs-lede::after {
  width: 96px; height: var(--band-h); border-radius: 0;
  background: var(--band); box-shadow: none;
}
.clubs-row li { border-radius: 0; }

/* ══════════════════════════════════════════════════ 10b · BLOG */
.journal-shot {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--rise-sm)), 0 100%);
}

/* ══════════════════════════════════════════════════ 11 · CTA + FOOTER
   The third and last cut, and the site's only full-width statement of the three
   colours — directly under the darkest band on the page, where blue and red at
   full strength have somewhere to land. Both are site-wide: the standing CTA and
   the footer render on every template, so the language has to hold there too. */
.cta { clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%); }
.cta-in { padding-block-start: var(--rise); }

.ftr { position: relative; }
.ftr::before {
  content: ''; position: absolute; z-index: 2;
  inset-block-start: 0; inset-inline: 0; height: var(--band-h);
  background: var(--band); --band-mid: #fff;
}

/* ══════════════════════════════════════════════════ SHARED CONTROLS */

/* every "read on" link on the site now underlines itself with the mark */
.lnk { position: relative; border-block-end-color: transparent; }
.lnk::after {
  content: ''; position: absolute;
  inset-block-end: 0; inset-inline: 0; height: 3px;
  background: var(--band);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .6s var(--e-out);
}
.lnk:hover::after { transform: scaleX(1); }
.lnk:hover { color: var(--ink); }
.on-dark .lnk:hover { color: #fff; }

/* the header's reading-progress bar, same object at page scale */
.hdr-progress { background: var(--band); --band-mid: #fff; }

/* buttons keep their pill everywhere except where they are the primary action */
.cta-actions .btn-red {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  padding-inline-end: calc(1.4rem + 16px);
}

/* ══════════════════════════════════════════════════ THE RISING SPARKS
   Jonny's "נקודות זזות", translated into the brand: tiny bars leaning on the
   slash angle, drifting slowly upward through the two airy light sections —
   subconsciously, balloons rising. A handful per section, one of them red
   (the red stays rationed even at 5%), all at threshold opacity. Two pseudo
   layers at different speeds so the formation never reads as a formation.
   The dense pole (catalog, cards) stays clean. The gore-fan texture that
   briefly lived here was tried and deleted (4.8.2026) — motion earned the
   spot, material didn't. */
.squad, .journal, .sparks { position: relative; isolation: isolate; overflow: hidden; }
.squad::before, .squad::after,
.journal::before, .journal::after,
.sparks::before, .sparks::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset-block-start: 100%; left: 4vw;
  width: 6px; height: 15px;
  background: rgba(0, 83, 161, .07);
  box-shadow:
    16vw -140px 0 rgba(0, 83, 161, .06),
    38vw -320px 0 rgba(224, 28, 47, .05),
    61vw  -80px 0 rgba(0, 83, 161, .05),
    83vw -240px 0 rgba(0, 83, 161, .065);
  animation: rmx-rise 34s linear infinite;
}
.squad::after, .journal::after, .sparks::after {
  left: 9vw; width: 5px; height: 11px;
  box-shadow:
    22vw -420px 0 rgba(0, 83, 161, .05),
    47vw -180px 0 rgba(0, 83, 161, .06),
    72vw -360px 0 rgba(224, 28, 47, .045);
  animation-duration: 26s;
  animation-delay: -12s;
}
@keyframes rmx-rise {
  from { transform: translateY(0) skewX(var(--lean)); opacity: 0; }
  6%   { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateY(calc(-110vh - 460px)) skewX(var(--lean)); opacity: 0; }
}

/* ══════════════════════════════════════════════════ THE GORES, ALIVE
   The balloon's vertical panels as a fan of hairline navy spokes, swaying
   ±1.5° around the crown point above the section — a hanging balloon seen
   from below, breathing. Jonny deleted the static fan from the squad and the
   journal (texture didn't earn the spot) and called it back HERE, moving, on
   the clubs band alone (4.8.2026) — where the pale blue wash gives it a
   room of its own between two dark neighbours. ::before carries the wash,
   so the fan rides ::after. */
.clubs::after {
  content: ''; position: absolute; inset: -14% -8%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(
    from 168deg at 50% -22%,
    rgba(0, 83, 161, .05) 0deg 1.1deg,
    transparent 1.1deg 4.8deg
  );
  transform-origin: 50% -22%;
  animation: rmx-fan-sway 24s var(--e-inout) infinite alternate;
}
@keyframes rmx-fan-sway {
  from { transform: rotate(-1.5deg); }
  to   { transform: rotate(1.5deg); }
}

/* ══════════════════════════════════════════════════ THE RULE, DRAWN
   The band above every section head no longer arrives — it happens: scaleX
   from the reading edge the moment the head enters the viewport (app.js
   observes .sec-head into .in, same machinery as the reveals). The smallest
   plot twist on the page: the reader feels something moved, and is not sure
   what. */
.sec-head::before {
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .9s var(--e-out) .12s;
}
.sec-head.in::before { transform: scaleX(1); }

/* ══════════════════════════════════════════════════ SELECTION
   The smallest brand statement on the site: select anything, get the blue.
   Even copying the office's address happens inside the brand. */
::selection { background: var(--blue); color: #fff; }

/* ══════════════════════════════════════════════════ REDUCED MOTION
   theme.css already flattens transitions globally. The wipe is positional rather
   than a transform, so it needs parking explicitly. */
@media (prefers-reduced-motion: reduce) {
  .prop-shot::before { display: none; }
  .lnk::after { transform: scaleX(1); }
  /* frozen sparks are meaningless specks — remove rather than park */
  .squad::before, .squad::after,
  .journal::before, .journal::after,
  .sparks::before, .sparks::after { display: none; }
  .sec-head::before { transform: scaleX(1); transition: none; }
  /* the fan parks but stays: motionless texture is still texture */
  .clubs::after { animation: none; }
}
