/*
  Design D, "Hands, Then the Mark" (Design 1 on the bar). The rules are moved from the sample,
  designs/sampler/round-4/samples/01-hands-then-mark/index.html, as it is; what's new for the six
  pages (the logo in the bar, the inner pages' band, the class rows' booking column, the marked
  box, the footer) is marked NEW and uses only the sample's tokens and devices.

  The version bar (designs/README.md, "The version bar"), in this design's words:
  BAR 1: nothing here is meant to fill the first screen. The sample's opening is a 150/260 px
         strip and a band as tall as its words, so it takes no 100svh block; with the bar on, the
         page starts 56 px lower and the opening is otherwise unchanged.
  BAR 2: nothing is sticky or fixed. If something ever is, it sits at top: var(--alma-bar-height, 0px).
  BAR 3: z-indexes stay small (the top bar is 3); the bar is above everything at 1,000,000.
  BAR 4: no transform, filter or contain on html or body, and nothing styles #alma-versions.
         Anchor jumps already land below the bar (the frame's scroll-padding-top on html).
*/

@font-face { font-family: "Young Serif"; src: url("../fonts/youngserif/YoungSerif-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/karla/Karla-wght.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  --slate: #172833;
  --slate2: #203b4d;
  --deep: #b8126c;
  --magenta: #ee1d85;
  --yellow: #f7eb22;
  --plum: #491633;
  --rule: #dfe3e6;
  --white: #ffffff;
  --side: 24px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color: var(--slate); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--slate); font-family: "Karla", sans-serif; font-size: 17px; line-height: 1.5; }
img { display: block; max-width: 100%; }
svg { fill: none; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
.bar a:focus-visible, .bar button:focus-visible, .center a:focus-visible { outline-color: var(--yellow); }
h1, h2, h3 { font-family: "Young Serif", serif; font-weight: 400; margin: 0; }
p { margin: 0; }
.wrap { max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; padding: 0 var(--side); }

/* Top bar */
.bar { background: var(--slate); position: relative; z-index: 3; }
.bar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.home { display: flex; align-items: center; text-decoration: none; min-height: 44px; margin-right: auto; }
.name { font-family: "Young Serif", serif; font-size: 16px; line-height: 1.12; color: var(--white); }
.name span { display: block; }
.menu { display: none; list-style: none; margin: 0; padding: 0; }
.menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-size: 17px; color: var(--white); }
.menu a:hover, .menu a:focus-visible { text-decoration: underline; text-decoration-color: var(--magenta); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.phone { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 16px; color: var(--yellow); text-decoration: none; white-space: nowrap; }
.phone:hover, .phone:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { flex: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--white); cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle:focus-visible { outline: 2px solid var(--yellow); }
.bar.open .menu { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--slate); padding: 4px var(--side) 16px; border-bottom: 1px solid var(--slate2); }
.bar.open .menu a { padding: 0; font-size: 19px; }

/* NEW: the logo beside the name (Bill, DK-664), its white square showing, centred on the name. */
.home { gap: 10px; }
.mark { flex: none; width: 40px; height: 40px; }

/* NEW: the menu is folded behind the toggle only when the script has run (rule 7). With script
   off the toggle is hidden and the menu shows as a plain row of links under the name. */
html:not(.js) .menu-toggle { display: none; }
html:not(.js) .bar .wrap { flex-wrap: wrap; }
html:not(.js) .menu { display: flex; flex-wrap: wrap; order: 3; flex-basis: 100%; margin: 0 -12px; padding-bottom: 8px; }

/* The photo */
.lead { position: relative; height: 150px; overflow: hidden; background: var(--slate); }
.lead img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.lead-classes img, .lead-class img { object-position: 50% 50%; }

/* The curve: one gentle arc, used everywhere */
.curved { position: relative; }
.curved > .edge { position: absolute; left: 0; width: 100%; bottom: 100%; height: 36px; display: block; }
.band { background: var(--white); color: var(--slate); margin-top: -34px; z-index: 2; }
.band .edge path { fill: var(--white); }
.band .wrap { position: relative; padding-top: 14px; padding-bottom: 28px; text-align: center; }
/* The credit is 16 px, the one size change from the sample (round 6's floor; packet-d). */
.credit { font-size: 16px; line-height: 1.3; color: var(--slate2); margin: 0 0 10px; text-align: right; }
.logo { width: 200px; height: auto; margin: 0 auto; }
.band h1 { margin-top: 16px; font-size: 30px; line-height: 1.08; letter-spacing: -0.005em; }
.band h1 span { display: block; }
.sub { margin-top: 12px; font-size: 17px; color: var(--slate); }
.into { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 700; font-size: 18px; color: var(--deep); text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--magenta); }
.into:hover, .into:focus-visible { text-decoration-color: var(--deep); }
.quiet { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.45; color: var(--slate); }
.quiet strong { color: var(--slate); font-weight: 700; }
.quiet a { color: var(--deep); font-weight: 700; text-decoration: none; display: inline-block; padding: 11px 0; margin: -11px 0; }
.quiet a:hover, .quiet a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* NEW: an inner page's band: the same white curve and credit, no big logo, the words left. */
.band.page .wrap { text-align: left; padding-bottom: 8px; }
.band.page h1 { margin-top: 4px; }
.band.page .words { max-width: 46em; }
.jumps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 28px; }
.facts { margin-top: 14px; font-size: 17px; color: var(--slate2); }
.who-for { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag, .row .tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--yellow); color: var(--slate); font-size: 14px; font-weight: 700; }

/* Sections */
section { padding: 72px 0 0; }
.head h2 { font-size: 32px; line-height: 1.12; }
.head .under { display: block; width: 112px; height: 12px; margin-top: 10px; }
.head .under path { fill: none; stroke: var(--magenta); stroke-width: 5; stroke-linecap: round; }
.head p { margin-top: 16px; color: var(--slate2); max-width: 36em; }

/* What you can make: one even row, photos one width, sitting on one line */
.makes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; column-gap: 20px; row-gap: 40px; }
.make { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 14px; }
.make .pic { align-self: end; }
.make img { width: 100%; height: auto; }
.make .what { font-family: "Young Serif", serif; font-size: 21px; line-height: 1.15; }
.make .cls { margin-top: 6px; font-weight: 700; font-size: 16px; }
.make .who { font-size: 16px; color: var(--slate2); }
.make .line { margin-top: 8px; font-size: 16px; line-height: 1.45; }
/* NEW: each title links on; it reads as the sample's until hovered or focused. */
.make .what a { text-decoration: none; }
/* NEW (fixes, C12): a 44 px-tall hit area that doesn't move the title (padding, equal negative margin). */
.make .what a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.make .what a:hover, .make .what a:focus-visible { text-decoration: underline; text-decoration-color: var(--magenta); text-underline-offset: 5px; text-decoration-thickness: 2px; }
/* NEW: a row of pictures alone (the class page): one item per picture, bottoms on one line. */
.pics-row { align-items: end; }
.pics-row .make { display: block; grid-row: auto; }
.caption { margin-top: 16px; font-size: 16px; color: var(--slate2); }

/* Coming up: clean rows */
.rows { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; row-gap: 2px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.row .date { grid-row: span 2; }
.row .meta { grid-column: 2; }
.row .date { font-family: "Young Serif", serif; font-size: 20px; line-height: 1.1; color: var(--slate); }
.row .date small { display: block; font-family: "Karla", sans-serif; font-size: 15px; color: var(--slate2); margin-top: 2px; }
.row .cls { font-weight: 700; font-size: 18px; line-height: 1.3; }
.row .meta { color: var(--slate2); font-size: 16px; }
.row .tag { margin-left: 6px; vertical-align: 2px; }
.all { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; font-weight: 700; font-size: 18px; color: var(--deep); text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--magenta); }
.all:hover, .all:focus-visible { text-decoration-color: var(--deep); }
/* NEW: what the rows carry beyond the sample's: the parents' line above them, a class's ages
   under its name, a session's state, and the class page's booking column. */
.parents { margin-top: 24px; max-width: 40em; }
.row .cls a { color: var(--deep); text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--magenta); }
.row .cls a:hover, .row .cls a:focus-visible { text-decoration-color: var(--deep); }
.row .cls a { display: inline-block; padding: 11px 0; margin: -11px 0; } /* NEW (fixes, C12): 44 px tall, the row unmoved */
.row .ages { display: block; font-weight: 400; font-size: 16px; color: var(--slate2); }
.row .state { display: block; margin-top: 4px; }
.book .call-line { color: var(--slate); }
.book .call-line a { color: var(--deep); font-weight: 700; text-decoration: none; display: inline-block; padding: 11px 0; margin: -11px 0; }
.book .call-line a:hover, .book .call-line a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.book .pay-off, .book .state { margin-top: 4px; }
.none { margin-top: 24px; color: var(--slate2); }

/* The center: the second curved band */
.center { margin-top: 112px; padding: 0; background: var(--plum); color: var(--white); }
.center .edge path { fill: var(--plum); }
.center .wrap { padding-top: 24px; padding-bottom: 72px; }
.center h2 { font-size: 32px; line-height: 1.12; }
.things { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 32px; }
.thing h3 { font-size: 22px; line-height: 1.2; }
.thing p { margin-top: 8px; font-size: 17px; max-width: 30em; }
.thing a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 700; color: var(--yellow); text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); }
/* NEW: a band with no heading starts its things at the top; a "say" is a line of the class page's
   What to know, in the things' body text (Karla) under the band's heading (fixes, D-322). */
.center .wrap > .things:first-child { margin-top: 0; }
.thing p.say { margin-top: 0; }

/* NEW: the support door, a thing on white. */
.door .thing h3 { color: var(--slate); }
.door .thing p { color: var(--slate); max-width: 36em; }
.door .thing a { color: var(--deep); text-decoration-color: var(--magenta); }
.door .thing a:hover, .door .thing a:focus-visible { text-decoration-color: var(--deep); }
.door .thing a { min-width: 44px; justify-content: center; } /* NEW (fixes, C12): the support door's "Give" */

/* Visit */
.visit { padding-top: 72px; }
.visit dl { margin: 32px 0 0; display: grid; gap: 20px; }
.visit dt { font-weight: 700; font-size: 15px; color: var(--slate2); }
.visit dd { margin: 2px 0 0; font-size: 18px; }
.visit dd .tc { color: var(--slate2); font-size: 15px; }
.visit dd a { font-weight: 700; color: var(--deep); text-decoration: none; display: inline-block; padding: 10px 0; margin: -10px 0; }
.visit dd a:hover, .visit dd a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.close { padding: 88px 0 64px; color: var(--slate2); font-size: 16px; }

/* NEW: the plainly marked box for a picture to come: a rule-coloured dashed border and the deck's
   words in slate2, the size of the picture it stands for. Never a generated picture. */
.to-come { display: grid; place-items: center; padding: 16px; border: 2px dashed var(--rule); color: var(--slate2); font-size: 16px; text-align: center; }
.pics-box { margin-top: 40px; aspect-ratio: 4 / 3; max-width: 360px; }
.next-line { margin-top: 40px; color: var(--slate2); }
/* NEW (fixes): the sign-up as a link with the preview off. */
.next-line a { color: var(--deep); font-weight: 700; text-decoration: none; display: inline-block; padding: 11px 0; margin: -11px 0; }
.next-line a:hover, .next-line a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* NEW: the footer, quiet: slate2 on white above a rule. */
.foot { margin-top: 104px; color: var(--slate2); font-size: 16px; }
.foot .wrap { border-top: 1px solid var(--rule); padding-top: 32px; padding-bottom: 48px; }
.foot-cols { display: grid; gap: 16px; }
.foot-col p + p { margin-top: 4px; }
.foot-name { font-family: "Young Serif", serif; font-size: 18px; color: var(--slate); }
.foot a { color: var(--slate2); text-underline-offset: 4px; display: inline-block; padding: 10px 0; margin: -10px 0; }
.foot a:hover, .foot a:focus-visible { color: var(--deep); }
/* NEW (fixes, C12): a short link ("Give") still makes a 44 px target. Its text stays left, in
   line with the column (review R2). */
.foot a { min-width: 44px; }
.foot-note { margin-top: 16px; }
.foot-note + .foot-note { margin-top: 4px; }
.close + .foot, .wrap:has(> .close) + .foot { margin-top: 0; }

@media (max-width: 379px) {
  :root { --side: 16px; }
  .bar .wrap { gap: 8px; }
  .name { font-size: 14px; }
  .phone { font-size: 14px; }
  .home { gap: 8px; }
  .mark { width: 34px; height: 34px; }
}
/* NEW: the sample's own narrow step (14 px name and phone, 8 px gaps) carried up to 429 px, so the
   name keeps its two lines beside the logo at 390 (with the logo, 16 px needs 372 of 342 px). */
@media (min-width: 380px) and (max-width: 429px) {
  .bar .wrap { gap: 8px; }
  .name { font-size: 14px; }
  .phone { font-size: 14px; }
  .home { gap: 8px; }
}

@media (min-width: 720px) {
  :root { --side: 48px; }
  .makes { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; }
  .things { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .things.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit dl { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 28px; max-width: 880px; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; }
}

@media (min-width: 1000px) {
  :root { --side: 80px; }
  body { font-size: 18px; }
  .bar .wrap { min-height: 72px; gap: 20px; }
  .name { font-size: 21px; }
  .name span { display: inline; }
  .phone { font-size: 18px; }
  .lead { height: 260px; }
  .lead img { object-position: 50% 50%; }
  .curved > .edge { height: 80px; }
  .band { margin-top: -40px; }
  .band .wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 56px; align-items: center; text-align: left; padding-top: 4px; padding-bottom: 40px; }
  .credit { position: absolute; right: var(--side); top: -18px; margin: 0; }
  .logo { width: 300px; margin: 0; }
  .band h1 { margin-top: 0; font-size: 52px; }
  .sub { font-size: 18px; margin-top: 12px; }
  .quiet { margin-top: 16px; padding-top: 16px; font-size: 17px; max-width: 40em; }
  section { padding-top: 104px; }
  .head h2, .center h2 { font-size: 40px; }
  .make .what { font-size: 23px; }
  .row { grid-template-columns: 200px minmax(0, 1fr) 400px; align-items: baseline; padding: 20px 0; }
  .row .date { grid-row: auto; }
  .row .meta { grid-column: 3; }
  .row .date { font-size: 22px; }
  .row .date small { display: inline; margin: 0 0 0 6px; }
  .rows { max-width: 1040px; }
  .center { margin-top: 152px; }
  .center .wrap { padding-top: 16px; padding-bottom: 96px; }
  .visit { padding-top: 104px; }
  /* NEW */
  .band.page .wrap { display: block; padding-top: 28px; padding-bottom: 8px; }
  .facts { font-size: 18px; }
}

/* NEW: the full menu shows from 1,140 px (the sample's 1,000 px, raised so Give fits on one line
   beside the logo, the name on one line; packet-d, "Top bar"); below it, the toggle. */
@media (min-width: 1140px) {
  .menu, html:not(.js) .menu { display: flex; order: 0; flex-basis: auto; margin: 0; padding: 0; }
  .menu-toggle { display: none; }
  html:not(.js) .bar .wrap { flex-wrap: nowrap; }
  .menu a { min-width: 44px; justify-content: center; } /* NEW (fixes, C12) */
}

/* NEW (part 2): About, Gallery and Shop, in the same language. These sit last so each page's
   strip framing holds at every width. */
.lead-about img { object-position: 50% 44%; }   /* n01: through the middle band, both pairs of hands */
.lead-gallery img { object-position: 50% 48%; } /* n03: the frame and the hands holding it */
.lead-shop img { object-position: 50% 52%; }    /* n06: the box of twine and the blank tag */
.pull { margin-top: 18px; font-family: "Young Serif", serif; font-size: 22px; line-height: 1.3; color: var(--slate); max-width: 30em; }
.box-43 { margin-top: 32px; width: 100%; aspect-ratio: 4 / 3; }
.thing h2.h3 { font-size: 22px; line-height: 1.2; }
.door .thing h2.h3 { color: var(--slate); }
.tc { white-space: nowrap; }
.door .pay-off, .center .pay-off { margin-top: 12px; }
.door .pay-off { color: var(--slate2); }
.check { margin-top: 8px; color: var(--slate2); }
.door .thing p.check { color: var(--slate2); }
.next-line.off { margin-top: 4px; }
.now-box { margin-top: 32px; min-height: 200px; max-width: 720px; }
.shop-pic { margin-top: 32px; }
.shop-pic img { width: 100%; max-width: 1100px; height: auto; }
.thing.wide p { max-width: 40em; }
.names { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(12, auto); grid-auto-flow: column; column-gap: 20px; row-gap: 8px; font-size: 17px; }
@media (min-width: 720px) {
  .names { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); column-gap: 32px; }
  .things .thing.wide { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .pull { font-size: 26px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: center; }
  .two-col .box-43, .two-col .shop-pic { margin-top: 0; }
  /* NEW (fixes, D-322): the 260 px strips framed lower, by position only (no crop, no edit). */
  .lead-about img { object-position: 50% 65%; }   /* n01: the hands in the clay */
  .lead-gallery img { object-position: 50% 64%; } /* n03: the frame's lower edge and both hands */
}