/* Location pages (/kiteworks/locations/*): the Kiteworks landing page with a local headline and one local-rules section. */

/* The place sits on its own line so the headline reads WHO CONTROLS AI AGENTS / IN ORLANDO? at desktop widths. */
.kw-home--location .kw-hero h1 { font-size: clamp(32px, 3.1vw, 46px); max-width: 23ch; }
.kw-hero__place { display: block; }
/* "Kiteworks in <place>": the Kiteworks wordmark at the slate's cap height, then the place in the slate's red. */
.kw-hero__brand { gap: 10px; }
.kw-hero__brand-logo { display: block; flex: none; width: auto; height: 15px; margin-top: -1px; }

/* Local rules: three typed notes pinned to the CTRL investigation board under its picture light (local-board.js).
   Without JavaScript, under reduced motion and when motion is paused, every note is already pinned and the string is off. */
.kw-home .kw-local { --lamp: 1; --pass: .5; position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(104px, 11vw, 164px) clamp(48px, 5vw, 72px); }
.kw-local__wall { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #050404; pointer-events: none; }
.kw-local__wall img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%;
  transform: translateY(calc((var(--pass) - .5) * -36px)) scale(1.08);
  filter: brightness(calc(.3 + var(--lamp) * .22)) saturate(.85) contrast(1.05); }
.kw-local__wall::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(#050404 0%, #05040400 20%, #05040400 78%, #050404 100%),
    radial-gradient(ellipse 72% 66% at 50% 52%, #05040400 38%, #050404d9 100%); }
.kw-local__lamp { position: absolute; inset: 0; opacity: var(--lamp); mix-blend-mode: screen;
  background: radial-gradient(ellipse 34% 30% at 50% 4%, rgb(255 196 120 / .2), rgb(255 170 90 / .06) 50%, transparent 76%); }
@media (prefers-reduced-motion: no-preference) {
  .kw-local__lamp { animation: kw-local-lamp 7.4s steps(1, end) infinite; }
}
@keyframes kw-local-lamp { 0%, 100% { filter: none; } 61% { filter: brightness(.6); } 62% { filter: none; } 64% { filter: brightness(.75); } 65% { filter: none; } }
.motion-paused .kw-local__lamp { animation: none; }

.kw-local__head { max-width: 780px; margin: 0 auto; text-align: center; }
.kw-local__head .slate { justify-content: center; }
.kw-home .kw-local__head h2 { margin: 18px auto 0; max-width: 24ch; }
.kw-home .kw-local__head .lead { margin: 22px auto 0; max-width: 46ch; font-size: 19px; line-height: 1.6; color: var(--muted); }
.kw-local__head :is(h2, .lead, .slate) { text-shadow: 0 1px 2px rgb(5 4 4 / .8), 0 0 24px rgb(5 4 4 / .9); }

.kw-local__board { position: relative; max-width: 1180px; margin: clamp(60px, 6vw, 88px) auto 0; }
/* The string runs over the paper from pin head to pin head, the way it would on a real board. */
.kw-local__string { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kw-local__string path { fill: none; stroke: #b3170f; stroke-width: 2.5px; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 4px 3px rgb(0 0 0 / .75)); }
.kw-local__notes { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 3.6vw, 56px); align-items: stretch; }

/* Index cards on the board. Each is photographed paper as a nine-slice border image, so torn edges and corners hold their
   shape at any height. Cards share a height; the stagger comes from --y so the ruled lines can run down to the link. */
.kw-local__note { --pin: 1; --r: -2deg; --y: 0px; --lit: .84; --paper: url("/ctrl-locust-brand/images/kiteworks/paper/note-card.webp");
  position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 50px 42px 30px; color: #231a14;
  transform: translateY(calc(var(--y) + (1 - var(--pin)) * -48px)) rotate(calc(var(--r) - (1 - var(--pin)) * 7deg));
  opacity: calc(var(--pin) * 1.6); }
.kw-local__note::before { content: ""; position: absolute; inset: -4px -6px; z-index: -1; border: 44px solid transparent;
  border-image: var(--paper) 120 fill / 44px stretch;
  filter: brightness(var(--lit)) sepia(.14) drop-shadow(0 1px 0 #5c4a32)
    drop-shadow(0 calc(10px + (1 - var(--pin)) * 26px) calc(12px + (1 - var(--pin)) * 20px) rgb(0 0 0 / .5)) drop-shadow(0 26px 36px rgb(0 0 0 / .6)); }
.kw-local__note:nth-child(2) { --r: 1.4deg; --y: 30px; --lit: .95; --paper: url("/ctrl-locust-brand/images/kiteworks/paper/note-torn.webp"); }
.kw-local__note:nth-child(3) { --r: -1deg; --y: 10px; --paper: url("/ctrl-locust-brand/images/kiteworks/paper/note-folded.webp"); }

/* The picture light sits above the middle of the board, so the middle card catches the most light (--lit). */
/* The pin goes in last, pressed home once the card has settled. */
.kw-local__pin { --push: clamp(0, (var(--pin) - .82) * 5.6, 1); position: absolute; z-index: 4; top: -14px; left: 50%; width: 32px; height: 32px;
  background: url("/ctrl-locust-brand/images/kiteworks/paper/pin-red.webp") center / contain no-repeat;
  transform: translateX(-50%) scale(calc(1.7 - var(--push) * .7)); opacity: var(--push);
  filter: drop-shadow(2px 6px 4px rgb(0 0 0 / .6)); }

/* Rubber stamp: red ink in a double rule, pressed a little crooked. */
.kw-home .kw-local__stamp { align-self: flex-start; margin: 0 0 18px; transform: rotate(-4deg); transform-origin: 0 50%; }
.kw-local__stamp span { display: inline-block; padding: 6px 10px 5px; border: 3px double currentColor; border-radius: 4px;
  font: 400 14px/1.2 var(--font-paper); letter-spacing: .16em; text-transform: uppercase; color: #9e1610; opacity: .88; mix-blend-mode: multiply; }
.kw-local__note:nth-child(2) .kw-local__stamp { transform: rotate(3deg); }
.kw-local__note:nth-child(3) .kw-local__stamp { transform: rotate(-2deg); }

/* Typed header over the index card's red rule, then blue ruled lines that run to the foot of the card. */
.kw-home .kw-local__note h3 { margin: 0; padding-bottom: 10px; border-bottom: 2px solid rgb(178 44 34 / .5);
  font: 400 15px/1.45 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #231a14; }
.kw-home .kw-local__check { flex: 1 0 auto; min-height: 120px; margin: 0 0 14px; padding-top: 4px;
  font: 400 18px/30px var(--font-paper); color: #261c14;
  background: repeating-linear-gradient(to bottom, transparent 0 25px, rgb(74 108 150 / .26) 25px 26px, transparent 26px 30px) 0 4px / 100% 30px; }
.kw-local__link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 400 13px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: #9e1610; text-decoration: underline; text-underline-offset: 4px; }
.kw-local__link:hover, .kw-local__link:focus-visible { color: #6f0e0a; }
.kw-local__link:focus-visible { outline: 2px solid #9e1610; outline-offset: 3px; }

.kw-home .kw-local__fine { margin: clamp(48px, 5vw, 72px) auto 0; max-width: 62ch; text-align: center; font-size: 13px; line-height: 1.6; color: color-mix(in oklch, var(--muted) 72%, transparent); }

@media (prefers-reduced-motion: reduce) { .kw-local__note { --pin: 1 !important; } .kw-local__wall img { transform: scale(1.08); } }
.motion-paused .kw-local__note { --pin: 1 !important; }

@media (max-width: 899px) {
  .kw-local__notes { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; gap: 52px; }
  .kw-local__note { --y: 0px !important; }
  .kw-local__note:nth-child(2) { --r: 1deg; }
  .kw-local__note { --lit: .92 !important; }
  .kw-local__string { display: none; }
}
@media (max-width: 599px) {
  .kw-home--location .kw-hero h1 { font-size: clamp(28px, 8vw, 36px); max-width: none; }
  .kw-home .kw-local { padding-block: 88px 44px; }
  .kw-local__note { padding: 46px 30px 24px; }
  .kw-home .kw-local__check { min-height: 90px; font-size: 17px; }
}
