/* MaineLy main website, v5: his ad, made properly into a website.  Read concept.md first.
   Navy band with his logo and "Contact Tim" + his trucks; the nine pictures from his ad, ruled in red as in the ad;
   Property Management in his own website's words; the number to close.
   Colours come from his logo. Paper below, navy above and at the foot. No cards, shadows, gradients, pills.
   One motion family: things roll or wipe vertically. Base state is a complete still page; html.js adds the motion. */

@font-face { font-family: "Besley"; src: url("/assets/besley-var.woff2?v=9930a15503") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/franklin-var.woff2?v=a75f8b2cc3") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #10142a;                 /* the logo lettering */
  --navy: #031a39;                /* the band at the foot of his ad */
  --navy-2: #0a2547;
  --red: #c50505;                 /* the swoosh and the ad's dividing rules */
  --blue: #1a6ee8;                /* the wave */
  --paper: #f4f6f8;               /* snow, tinted toward the navy */
  --paper-2: #e8ecf1;
  --stone: #535d70;               /* secondary text, 6:1 on paper */
  --rule: rgba(16, 20, 42, .14);
  --pad: clamp(20px, 4.4vw, 64px);
  --gap: clamp(16px, 2vw, 32px);
  --max: 1440px;
  --top: 72px;
  --display: "Besley", Clarendon, Georgia, serif;
  --text: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 8px); scrollbar-color: var(--ink) var(--paper-2); scrollbar-width: thin; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.hero :focus-visible, .contact :focus-visible, .cell:hover :focus-visible, .dock__btn--call:focus-visible { outline-color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 60; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 10px; }

/* paper tooth: one fixed layer over everything, never interactive (off on phones, where it costs frames) */
@media (min-width: 901px) {
  body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: url("/assets/noise.webp?v=84c9c21bfb") 0 0 / 240px 240px; opacity: .28; mix-blend-mode: soft-light; }
}

/* text links: a hairline that turns red */
.link { text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: .28em; transition: text-decoration-color .2s, color .2s; }
.link:hover { color: var(--red); text-decoration-color: var(--red); }

/* the one button: a 2px block; hover rolls the red up from below */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 2px; background: var(--ink); color: #fff; font: 600 1rem/1 var(--text); font-variant-numeric: tabular-nums; letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); transform: translateY(101%); transition: transform .38s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:active { transform: translateY(1px); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: clamp(12px, 1.6vw, 22px); height: var(--top); padding: 0 var(--pad); background: rgba(244, 246, 248, .92); backdrop-filter: saturate(120%) blur(12px); -webkit-backdrop-filter: saturate(120%) blur(12px); border-bottom: 1px solid var(--rule); }
.top__logo { display: block; padding: 6px 0; }
.top__logo img { width: auto; height: 40px; }
/* while the navy band (with the big logo and the number) is on screen the bar stays out of the way;
   it slides down once the big logo has gone by. Without the script it simply sits at the top. */
.js .top { position: fixed; left: 0; right: 0; transform: translateY(-101%); transition: transform .45s var(--ease); }
.js .top.has-logo { transform: none; }
.top__now { position: relative; height: 1.5em; margin: 6px 0 0; overflow: hidden; font: 700 1.2rem/1.5 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.top__now span { position: absolute; left: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; transition: transform .5s var(--ease), opacity .3s; }
.top__now .is-below { transform: translateY(110%); opacity: 0; }
.top__now .is-above { transform: translateY(-110%); opacity: 0; }
.top__contact { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 20px); font: 500 .98rem/1 var(--text); }
.top__contact .link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* ---------- 1. the navy band: his logo, "Contact Tim", his trucks ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.hero::before {               /* his mountain-and-wave mark, very large and faint, behind everything */
  content: ""; position: absolute; right: -6vw; bottom: -2vw; width: min(62vw, 980px); aspect-ratio: 581 / 218;
  background: url("/assets/logo-mark-white.svg?v=fc2a9494e0") center / contain no-repeat; opacity: .035; pointer-events: none;
}
.hero__in { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vh, 72px) var(--pad) clamp(64px, 9vh, 112px); }
.hero__brand { grid-column: 1 / span 5; }
.hero__logo { margin: 0 0 clamp(22px, 3.4vh, 40px); }
.hero__logo img { width: min(100%, 520px); }
.hero__label { margin: 0 0 6px; font: 500 clamp(1rem, 1.2vw, 1.15rem)/1.3 var(--text); color: rgba(255, 255, 255, .74); }
.hero__phone { display: block; width: max-content; max-width: 100%; margin-left: -.03em; font: 800 clamp(2.2rem, 4.2vw, 4rem)/1 var(--display); letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.hero__phone:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: .06em; text-underline-offset: .12em; }
.hero__mail { display: inline-block; margin-top: 10px; padding: 7px 0; font: 500 clamp(1rem, 1.3vw, 1.2rem)/1.3 var(--text); overflow-wrap: anywhere; }
.hero .link:hover { color: #fff; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.hero__photo { grid-column: 6 / span 7; justify-self: end; width: 100%; max-width: 1100px; margin: 0; }
.hero__photo img { width: 100%; }
/* the curve and red line of his ad's white field, where the band meets the paper */
.hero__edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(26px, 4.2vw, 64px); }
.hero__edge-fill { fill: var(--paper); }
.hero__edge-line { fill: none; stroke: var(--red); stroke-width: 3px; vector-effect: non-scaling-stroke; }

/* arrival: the logo and the trucks wipe up once */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__logo img { animation: wipe-up 1s var(--ease) .05s both; }
  .js .hero__photo picture { display: block; animation: wipe-up 1.1s var(--ease) .2s both; }
  .js .hero__photo img { animation: settle 1.5s var(--ease) .2s both; }
}
@keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }

/* ---------- 2. the nine, ruled in red like his ad ---------- */
.board { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vh, 64px) var(--pad) clamp(48px, 8vw, 112px); }
.board__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.cell { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 3vw, 44px) clamp(20px, 2.6vw, 40px); }
.cell:nth-child(3n + 2), .cell:nth-child(3n + 3) { border-left: 1px solid rgba(197, 5, 5, .55); }
.cell:nth-child(n + 4) { border-top: 1px solid rgba(197, 5, 5, .55); }
.cell::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy); transform: translateY(101%); transition: transform .5s var(--ease); }
.cell__pict { display: block; height: clamp(64px, 6.4vw, 92px); width: auto; max-width: 100%; overflow: visible; }
.cell__pict .i { fill: var(--ink); transition: fill .3s; }
.cell__pict .r { fill: var(--red); }
.cell__pict .b { fill: var(--blue); }
.cell__pict .t { fill: #fff; }
.cell__name { margin: clamp(18px, 2vw, 28px) 0 0; font: 700 clamp(1.3rem, 1.75vw, 1.7rem)/1.12 var(--display); letter-spacing: -.012em; text-wrap: balance; transition: color .3s; }
.cell__name a { text-decoration: none; }
.cell__name a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.cell__links { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: auto 0 0; padding-top: 12px; font: 500 .98rem/1.3 var(--text); }
.cell__links a { display: inline-block; padding: 6px 0; color: var(--stone); font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: rgba(83, 93, 112, .45); text-decoration-thickness: 1px; text-underline-offset: .25em; transition: color .3s, text-decoration-color .3s; }
@media (hover: hover) {
  .cell:hover::before { transform: none; }
  .cell:hover { color: #fff; }
  .cell:hover .cell__pict .i { fill: #fff; }
  .cell:hover .cell__links a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
  .cell:hover .cell__links a:hover { text-decoration-color: var(--red); }
}

/* ---------- 3. a business's own section, in its own website's words ---------- */
.sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 112px) var(--pad) clamp(56px, 8vw, 128px); border-top: 1px solid var(--rule); scroll-margin-top: var(--top); }
.sec__head { grid-column: 1 / span 5; position: sticky; top: calc(var(--top) + 28px); }
.sec__name { margin: 0; font: 800 clamp(2.3rem, 4.4vw, 4.2rem)/.96 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.sec__lead { margin: clamp(18px, 2vw, 28px) 0 0; font: 500 clamp(1.25rem, 1.7vw, 1.6rem)/1.25 var(--display); letter-spacing: -.01em; }
.sec__text { max-width: 44ch; margin: 14px 0 0; color: var(--stone); font-size: 1.05rem; line-height: 1.55; }
.sec__area { margin-top: clamp(20px, 2.4vw, 32px); padding-top: 14px; border-top: 1px solid var(--rule); }
.sec__label { margin: 0 0 6px; font: 600 .95rem/1.3 var(--text); }
.sec__area p { max-width: 44ch; margin: 0; color: var(--stone); font-size: 1.02rem; }
.sec__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: clamp(22px, 2.6vw, 36px) 0 0; }
.sec__contact .link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.sec__body { grid-column: 7 / span 6; }
.sec__photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.sec__fig { margin: 0; overflow: hidden; background: var(--paper-2); }
.sec__fig--wide { grid-column: 1 / -1; }
.sec__fig img { width: 100%; }
/* mosaic: one tall picture on the left, the others stacked beside it, all ending on one line */
.sec__photos--mosaic { grid-auto-rows: auto; }
.sec__photos--mosaic .sec__fig--tall { grid-row: 1 / span 2; }
.sec__photos--mosaic .sec__fig--tall picture, .sec__photos--mosaic .sec__fig--tall img { height: 100%; }
.sec__photos--mosaic .sec__fig--tall img { object-fit: cover; }

/* a division inside its business (MaineLy Vacations) */
.sub { margin-top: clamp(56px, 7vw, 104px); padding-top: 18px; border-top: 1px solid var(--ink); scroll-margin-top: var(--top); }
.sub__name { margin: 0; font: 800 clamp(1.9rem, 3.2vw, 3rem)/1 var(--display); letter-spacing: -.025em; }
.sub__lead { max-width: 40ch; margin: 16px 0 0; font: 500 clamp(1.15rem, 1.5vw, 1.4rem)/1.3 var(--display); letter-spacing: -.01em; }
.sub__text { max-width: 52ch; margin: 12px 0 0; color: var(--stone); font-size: 1.02rem; line-height: 1.55; }
.sub__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: clamp(24px, 3vw, 36px); }
.sub__fig, .sub__thumb { margin: 0; overflow: hidden; background: var(--paper-2); }
.sub__fig { aspect-ratio: 4 / 3; }
.sub__fig--big { grid-column: 1 / span 2; grid-row: 1 / span 2; aspect-ratio: auto; }
.sub__fig picture, .sub__fig img, .sub__thumb picture, .sub__thumb img { width: 100%; height: 100%; }
.sub__fig img, .sub__thumb img { object-fit: cover; }
.sub__strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sub__thumb { aspect-ratio: 3 / 2; }
.sec__groups { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 3vw, 40px) var(--gap); margin-top: clamp(40px, 5vw, 72px); }
.grp { padding-top: 14px; border-top: 1px solid var(--ink); }
.grp__name { margin: 0 0 10px; font: 700 1.12rem/1.2 var(--display); letter-spacing: -.005em; text-wrap: balance; }
.grp ul { margin: 0; padding: 0; list-style: none; }
.grp li { margin: 0; padding: 7px 0; border-top: 1px solid var(--rule); color: var(--stone); font-size: .98rem; line-height: 1.4; }
.grp li:first-child { border-top: 0; padding-top: 0; }
/* an odd one out at the end takes the whole row (no empty cell), its list in two columns */
.grp:last-child:nth-child(odd) { grid-column: 1 / -1; }
.grp:last-child:nth-child(odd) ul { columns: 2; column-gap: var(--gap); }
.grp:last-child:nth-child(odd) li { break-inside: avoid; border-top: 0; padding: 0 0 10px; }

/* pictures arrive with one upward wipe, once
   (the clip sits on the picture inside, not on the watched figure: a fully clipped box never counts as "in view") */
.js .will-reveal { background: transparent; }
.js .will-reveal picture { display: block; clip-path: inset(100% 0 0 0); }
.js .will-reveal img { transform: scale(1.06); }
.js .will-reveal.is-seen picture { clip-path: inset(0 0 0 0); transition: clip-path .95s var(--ease) calc(var(--k, 0) * 90ms); }
.js .will-reveal.is-seen img { transform: none; transition: transform 1.3s var(--ease) calc(var(--k, 0) * 90ms); }

/* ---------- 4. the number ---------- */
.contact { position: relative; overflow: hidden; padding: clamp(48px, 7.6vw, 112px) var(--pad) 26px; background: var(--navy); color: #fff; }
.contact::before { content: ""; position: absolute; left: -4vw; top: -3vw; width: min(48vw, 760px); aspect-ratio: 581 / 218; background: url("/assets/logo-mark-white.svg?v=fc2a9494e0") center / contain no-repeat; opacity: .04; pointer-events: none; }
.contact > * { position: relative; }
.contact__label { margin: 0 0 clamp(4px, 1vw, 14px); font: 500 clamp(1rem, 1.5vw, 1.25rem)/1.3 var(--text); color: rgba(255, 255, 255, .74); }
.contact__phone { display: block; width: max-content; max-width: 100%; margin-left: -.04em; font: 800 clamp(2.6rem, 11.2vw, 13rem)/.92 var(--display); letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }   /* default figures: Besley's tabular zero does not take the weight */
.contact__phone:hover { color: #fff; text-decoration: underline; text-decoration-thickness: .045em; text-underline-offset: .09em; text-decoration-color: var(--red); }
.contact__mail { display: inline-block; margin-top: clamp(8px, 1.6vw, 22px); padding: 8px 0; font: 500 clamp(1.05rem, 1.9vw, 1.5rem)/1.3 var(--text); overflow-wrap: anywhere; }
.contact .link:hover { color: #fff; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.contact__base { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; column-gap: clamp(24px, 5vw, 80px); margin-top: clamp(44px, 7vw, 104px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .875rem; color: rgba(255, 255, 255, .72); }
.contact__base img { width: clamp(120px, 12vw, 168px); }
.contact__base p { margin: 0; white-space: nowrap; }
.contact__list { columns: 3; column-gap: clamp(18px, 3vw, 44px); max-width: 720px; margin: 0; padding: 0; list-style: none; font-size: .9375rem; line-height: 1.2; color: rgba(255, 255, 255, .86); }
.contact__list li { padding: 6px 0; break-inside: avoid; }

/* the numbers roll in once */
.d { display: inline-block; }
.js .will-roll { clip-path: inset(-10% 0 -8% 0); }
.js .will-roll .d { transform: translateY(105%); }
.js .will-roll.is-rolled .d { transform: none; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 32ms); }

/* ---------- the "not found" page ---------- */
.lost { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 14vh, 150px) var(--pad); }
.lost h1 { max-width: 14ch; margin: 0 0 .55em; font: 800 clamp(2.1rem, 5.2vw, 4.4rem)/.98 var(--display); letter-spacing: -.028em; }
.lost p { margin: 0; font-size: 1.15rem; }

/* ---------- laptops ---------- */
@media (max-width: 1180px) and (min-width: 901px) {
  .hero__brand { grid-column: 1 / span 6; }
  .hero__photo { grid-column: 7 / span 6; }
  .sec__groups { grid-template-columns: 1fr; }
}

/* ---------- phones ---------- */
.dock { display: none; }

@media (max-width: 900px) {
  :root { --top: 60px; }
  .top__logo img { height: 34px; }
  .top__now { margin-top: 4px; font-size: 1rem; }
  .top__contact:not(.top__contact--always) { display: none; }
  body:has(.dock) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

  .hero__in { display: block; padding-top: 30px; padding-bottom: 0; }
  .hero__logo img { width: min(78%, 420px); }
  .hero__phone { font-size: clamp(2.1rem, 10.4vw, 3.4rem); }
  .hero__photo { margin: 26px calc(var(--pad) * -1) 0; width: auto; max-width: none; }
  .hero__edge { position: relative; display: block; margin-top: -1px; background: var(--navy); }
  .hero::before { width: 120vw; right: -40vw; bottom: auto; top: 6vw; }

  .board { padding-top: 18px; }
  .board__grid { grid-template-columns: 1fr; }
  .cell { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 16px 0; border: 0 !important; border-top: 1px solid rgba(197, 5, 5, .45) !important; }
  .cell:first-child { border-top: 0 !important; }
  .cell__pict { grid-row: 1 / span 2; height: auto; width: 72px; max-height: 56px; }
  .cell__name { margin: 0; font-size: clamp(1.15rem, 5vw, 1.4rem); }
  .cell__links { margin: 0; padding-top: 2px; gap: 0 18px; }
  .cell__links a { padding: 9px 0; }

  .sec { display: block; }
  .sec__head { position: static; }
  .sec__body { margin-top: 32px; }
  .sec__photos { display: block; margin: 0 calc(var(--pad) * -1); }
  .sec__fig + .sec__fig { margin-top: 10px; }
  .sec__photos--mosaic .sec__fig--tall picture, .sec__photos--mosaic .sec__fig--tall img { height: auto; }
  .sec__groups { grid-template-columns: 1fr; }
  .sub__photos { grid-template-columns: 1fr 1fr; gap: 8px; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
  .sub__fig--big { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .sub__fig:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }   /* no empty cell at the end */
  .sub__strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 8px calc(var(--pad) * -1) 0; padding: 0 var(--pad); scrollbar-width: none; }
  .sub__thumb { flex: 0 0 42%; scroll-snap-align: start; }

  .contact__phone { font-size: clamp(2rem, 10.2vw, 6rem); }
  .contact__base { grid-template-columns: minmax(0, 1fr) auto; row-gap: 26px; }
  .contact__list { grid-column: 1 / -1; grid-row: 1; columns: 2; }

  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; height: calc(64px + env(safe-area-inset-bottom, 0px)); padding: 0 12px env(safe-area-inset-bottom, 0px) var(--pad); background: rgba(244, 246, 248, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--rule); }
  .dock__about { margin: 0; overflow: hidden; font: 700 .98rem/1.2 var(--display); letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
  .dock__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 2px; font: 600 .95rem/1 var(--text); text-decoration: none; }
  .dock__btn--call { background: var(--ink); color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .will-reveal picture, .js .will-roll { clip-path: none; }
  .js .will-reveal img, .js .will-roll .d { transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .top, .dock, body::after, .hero::before, .contact::before { display: none !important; }
  .js .will-reveal picture { clip-path: none; }
}
