/* Birkly & Other Things — additions to css/style.css (loaded after it)
   · header: dark and white versions of the logo and icon
   · footer: a "Search & AI" column (For AI agents, llms.txt, sitemap) and a "Cookie settings" link
   · the statistics question (built by js/components.js)
   · cases: sharp photos, the hover (a following arrow), the service badges, the "Visit site" pill and "Keep reading" at the end of a case
   · phones: header spacing, intro, offer cards, cases, the Birkly steps and the contact spacing (at the end) */

/* header logo and icon. The menu bar is dark, so its icon is white; over dark sections (.nav.is-dark, set by
   js/site.js) the bar turns light and the logo sits on the dark page, so the two swap. Files: Site elements → Logo */
.logo img.logo__full--white, .menu__home img.menu__icon--ink { display: none; }
.nav.is-dark .logo img.logo__full--ink, .nav.is-dark .menu__home img.menu__icon--white { display: none; }
.nav.is-dark .logo img.logo__full--white, .nav.is-dark .menu__home img.menu__icon--ink { display: block; }

/* five columns: intro, explore, contact, search & AI, clock */
.footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__col--lead { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}

.footer__legal { flex-wrap: wrap; gap: 8px 20px; }
.footer__cookies {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: rgba(238, 235, 229, .6); transition: color .3s;
}
.footer__cookies:hover { color: var(--coral); }

/* the statistics question: a small card in the corner, in the site's own look */
.consent {
  position: fixed; z-index: 70; right: 16px; bottom: 16px; left: 16px; margin-left: auto;
  max-width: 25rem; padding: 20px 22px;
  background: var(--night-2); color: var(--paper);
  border: 1px solid var(--line-light); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  font-size: 14px; line-height: 1.5;
  animation: consent-in .6s var(--ease) both;
}
.consent.is-leaving { opacity: 0; translate: 0 12px; transition: opacity .3s, translate .3s; }
.consent__text { margin: 0 0 16px; color: rgba(238, 235, 229, .82); }
.consent__text a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.consent__text a:hover { color: var(--coral); }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.consent__yes { padding-block: 10px; }
.consent__no {
  appearance: none; border: 0; background: none; padding: 6px 0; cursor: pointer;
  font: 600 14px/1 var(--f-display); color: rgba(238, 235, 229, .7);
}
.consent__no:hover { color: var(--paper); }
@keyframes consent-in { from { opacity: 0; translate: 0 16px; } }
@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
  .consent.is-leaving { transition: none; }
}

/* ── Cases ──────────────────────────────────────────
   The photos are plain, sharp images. On hover the photo slowly zooms in and a round arrow
   takes the place of the cursor and follows it (js/cases.js, js/case.js); over the title it waits in the middle. */
.cx-card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover;
  transition: scale 1.4s var(--ease), filter .6s;
}
.cx-card__go {
  position: absolute; z-index: 1; left: var(--x, 50%); top: var(--y, 50%); translate: -50% -50%;
  display: grid; place-items: center; width: clamp(64px, 6vw, 88px); aspect-ratio: 1; border-radius: 50%;
  background: var(--paper); color: var(--ink); font: 700 clamp(20px, 1.8vw, 26px)/1 var(--f-display);
  box-shadow: 0 10px 30px rgba(28, 23, 19, .18);
  scale: 0; rotate: -45deg; pointer-events: none;
  transition: scale .5s var(--ease), rotate .5s var(--ease);
}
.cx-card__meta { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.cx-card__kind, .cx-card__tags { grid-column: 1; grid-row: auto; }
.cx-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cx-card__tags span {   /* service badges, like the ones on a case page */
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  font: 600 12px/1 var(--f-display); letter-spacing: 0; color: var(--ink-soft); white-space: nowrap;
  transition: border-color .3s, color .3s;
}
.cx-card:hover .cx-card__tags span { border-color: rgba(43, 36, 30, .3); color: var(--ink); }
@media (hover: hover) {
  .cx-card__media { cursor: none; }
  .cx-card:hover .cx-card__media img { scale: 1.06; filter: brightness(.94); }
  .cx-card:hover .cx-card__go { scale: 1; rotate: 0deg; }
}
.cx-card:focus-visible .cx-card__go { scale: 1; rotate: 0deg; }
@media (prefers-reduced-motion: reduce) {
  .cx-card__media img, .cx-card__go { transition: none; }
}

/* case page: photos inside the story are plain images too */
.cd-detail img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }

/* "Visit site": a dark pill with a coral arrow */
.cd-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px;
  border-radius: 999px; background: var(--ink); color: var(--paper);
  font: 600 13px/1 var(--f-display); transition: background-color .3s, gap .4s var(--ease);
}
.cd-pill i {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--coral); color: #fff; font: 700 12px/1 var(--f-display); font-style: normal;
  transition: rotate .5s var(--ease);
}
.cd-pill:hover { background: #000; gap: 14px; }
.cd-pill:hover i { rotate: 45deg; }
.cd-pill--lg { padding: 8px 8px 8px 20px; font-size: 15px; gap: 14px; }
.cd-pill--lg i { width: 30px; height: 30px; font-size: 14px; }
.cd-pill--lg:hover { gap: 18px; }

/* end of a case: the other cases, to keep reading */
.cd-more { padding: clamp(40px, 7vh, 72px) 0 clamp(80px, 14vh, 150px); border-top: 1px solid var(--line); }
.cd-more__title { font: 800 clamp(2.4rem, 6vw, 6.4rem)/.92 var(--f-display); letter-spacing: -.06em; margin-bottom: clamp(32px, 6vh, 64px); }
.cd-more__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 56px); }
.cd-more__list .cx-card__media { aspect-ratio: 4 / 3; }

/* services page: a panel opened from a link (the homepage cards go to service.html#s-…) stays clear of the menu bar */
.sx-panel { scroll-margin-top: 90px; }

/* the "For agents" link Birkly adds to the end of the footer: the footer already links there, so keep it for
   crawlers and screen readers but out of sight */
.footer > a[href$="/for-agents"] {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* homepage headline: the same size in every language (Japanese included), led by the English size */
html[lang] .hero__title { font-size: clamp(2.5rem, 6.1vw, 6.6rem); }
html[lang="ja"] .hero__title { line-height: 1.06; }
/* the line break before the cycling case name is only used on phones */
.hero__br { display: none; }

/* ═════════════════════════ Phones and small tablets ═════════════════════════ */
@media (max-width: 900px) {
  /* header: while the homepage photo frame is on screen, logo and menu line up with the text inside the frame */
  body:has(.intro) .nav:not(.is-solid) .nav__inner { padding-inline: var(--frame); }
  .nav__inner { transition: padding .6s var(--ease); }

  /* cases: every case reads the same way, name and details first, then the photo */
  .case-hero__about .case__tags { display: block; }
  .work { gap: 64px; padding-top: 56px; }
  .work__item { gap: 16px; }
  .work__meta { order: -1; row-gap: 6px; }
  .work__meta h3 { font-size: 1.6rem; }
  .work__meta p { font-size: 14px; }
  .work__item--a .work__media, .work__item--b .work__media, .work__item--c .work__media { aspect-ratio: 4 / 3; }

  /* Birkly: the intro scrolls away normally, then the steps sit next to the tree with the screenshot below,
     so nothing covers anything */
  .birkly__pin { position: relative; height: auto; }
  .flow__head { position: relative; padding-top: 96px; }
  .flow__inner { padding-top: 88px; padding-bottom: 24px; }
  .flow__grid {
    grid-template-columns: minmax(0, 1fr) 92px; grid-template-rows: auto auto;
    grid-template-areas: "text tree" "screen screen"; align-content: center; gap: 24px 16px;
  }
  .flow__text { grid-area: text; align-self: center; }
  .flow__tree { display: block; grid-area: tree; height: 200px; align-self: center; }
  .flow__screen { grid-area: screen; order: 0; }
  .flow__canvas { --canvas-base: 1; }

  /* contact: less empty space between the Birkly section and the question */
  .birkly { padding-bottom: 56px; }
  .contact { padding-bottom: 36px; }
  .contact .horizon { height: 32px; }
  .contact__kicker { padding-top: 24px; }
  .contact__row { margin-top: 28px; padding-top: 22px; gap: 18px; }
}

@media (max-width: 720px) {
  /* intro: a bigger headline, the cycling case name always on its own second row, and the button as the clear next step */
  html[lang] .hero__title { font-size: clamp(2.5rem, 11.2vw, 3.6rem); }
  .hero__title { line-height: .98; }
  html[lang="ja"] .hero__title { line-height: 1.06; }
  .hero__br { display: inline; }
  .hero__cta {
    display: flex; justify-content: center; width: 100%; margin-top: 28px; text-align: center;
    padding: 1.15em 1.4em; font-size: 17px;
    box-shadow: 0 18px 36px -18px rgba(196, 71, 58, .75);
  }

  /* offer: the intro text with a smaller stamp beside it, and the two prices as cards */
  .offer { padding-top: 12px; padding-bottom: 72px; }
  .offer__intro { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
  .offer__intro .lead { font-size: 1.12rem; }
  .stamp { width: 88px; }
  .stamp__six { font-size: 1.8rem; }
  .horizon--slim { height: 36px; }
  .prices { gap: 14px; }
  .price, .price--care {
    padding: 22px 20px 24px; border: 1px solid var(--line); border-radius: var(--radius);
    background: rgba(255, 255, 255, .38);
  }
  .price--care { background: var(--ink); border-color: transparent; color: var(--paper); }
  .price--care .price__example { color: var(--paper); }
  .price--care .price__from, .price--care .price__unit { color: rgba(238, 235, 229, .55); }
  .price--care .price__list { color: rgba(238, 235, 229, .7); }
  .price--care .price__amount { color: var(--coral); }
  .price__head { margin-bottom: 18px; }
  .price__amount { font-size: clamp(3rem, 16vw, 4.4rem); }
  .price__amount--long { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .price__example { margin: 12px 0 16px; }
  .price__list { font-size: 14px; gap: 8px; }
  .currency { margin-top: 16px; }
  .note { gap: 14px; margin-top: 28px; }
  .note__mark { font-size: 40px; }
  .offer__cta { margin-top: 28px; }
  .offer__cta .btn { width: 100%; justify-content: center; padding-block: 1.1em; }
}
