/* TERAKAWA / index refinement (20261114)
   Loaded last on the index pages only. Works together with js/index-refine.js.
   1. Back to top: shown while scrolling up (or at the page end), so it no longer sits on the text being read
   2. Small labels: 11px minimum and a darker tone
   3. Before You Commission: three columns on desktop (international editions)
   4. Rights / A useful brief: disclosure panels, text stays in the HTML (international editions)
   5. About: service list in two columns on desktop (international editions)
   Without JavaScript every panel stays open and the control stays as before. */

/* ---- 1. back to top -------------------------------------------------- */
html.rf-js .back-to-top.show:not(.rf-up):not(:focus-visible){
  opacity:0!important;pointer-events:none!important;transform:translateY(10px)!important
}

/* ---- 2. small labels -------------------------------------------------- */
html[lang] .tx .works-grid .work-meta,
html[lang] .tx .works-grid .works-num,
html[lang] .tx .works-filter-top a,
html[lang] .tx .why-tag,
html[lang] .tx .why-img-badge-small,
html[lang] .tx .problem-num,
html[lang] .tx .price-no,
html[lang] .tx .price-card.featured .price-no,
html[lang] .tx .price-featured-badge,
html[lang] .tx .price-value small,
html[lang] .tx .flow-step-name-en,
html[lang] .tx .flow-step-time,
html[lang] .tx .philosophy-attr,
html[lang] .hero-clients-label,
html[lang] .ha-k{font-size:11px!important}
html[lang] .tx .works-grid .work-meta,
html[lang] .tx .works-grid .works-num,
html[lang] .tx .works-filter-top a,
html[lang] .tx .flow-step-name-en{color:#5f5e57!important}

/* ---- 3. Before You Commission: three columns (desktop, international) -- */
@media (min-width:1024px) and (orientation:landscape){
  .tx.tx-intl .problem-grid{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:clamp(32px,3.4vw,56px);
    border-top:1px solid var(--tx-rule,#e4e2dc)
  }
  .tx.tx-intl .problem-card{
    display:flex;flex-direction:column;padding:30px 0 0;border:0;row-gap:0
  }
  .tx.tx-intl .problem-card:last-child{padding-bottom:0}
  .tx.tx-intl .problem-num{margin:0 0 18px}
  html[lang] .tx.tx-intl .problem-title{font-size:22px;line-height:1.32;margin:0 0 20px}
  .tx.tx-intl .problem-desc{margin:0 0 22px;font-size:16px!important;line-height:1.7!important}
  .tx.tx-intl .problem-link{margin-top:auto;align-self:flex-start}
}

/* ---- 4. disclosure panels (Rights / A useful brief) -------------------- */
.rf-acc .rf-head{margin:0}
.rf-acc .rf-btn{
  all:unset;box-sizing:border-box;display:flex;align-items:flex-start;justify-content:space-between;
  gap:20px;width:100%;cursor:pointer;font:inherit;color:inherit;letter-spacing:inherit;line-height:inherit;
  text-align:start;-webkit-tap-highlight-color:transparent
}
.rf-acc .rf-btn:focus-visible{outline:2px solid var(--accent);outline-offset:6px}
.rf-acc .rf-ic{
  position:relative;flex:0 0 auto;width:30px;height:30px;margin-top:.02em;border:1px solid var(--line);border-radius:50%;
  color:var(--accent);transition:background .3s,border-color .3s
}
.rf-acc .rf-ic::before,.rf-acc .rf-ic::after{
  content:'';position:absolute;left:50%;top:50%;background:currentColor
}
.rf-acc .rf-ic::before{width:11px;height:1px;margin:-.5px 0 0 -5.5px}
.rf-acc .rf-ic::after{width:1px;height:11px;margin:-5.5px 0 0 -.5px;transition:transform .38s cubic-bezier(.22,.61,.36,1),opacity .3s}
.rf-acc .rf-btn:hover .rf-ic{border-color:var(--accent-soft)}
.rf-acc.rf-open .rf-ic{background:var(--paper);border-color:var(--accent-soft)}
.rf-acc.rf-open .rf-ic::after{transform:scaleY(0);opacity:0}
.rf-acc .rf-panel{display:grid;grid-template-rows:1fr;transition:grid-template-rows .46s cubic-bezier(.22,.61,.36,1)}
.rf-acc .rf-panel-in{overflow:hidden;min-height:0;opacity:1;visibility:visible;transition:opacity .5s .08s,visibility 0s}
.rf-acc:not(.rf-open) .rf-panel{grid-template-rows:0fr}
.rf-acc:not(.rf-open) .rf-panel-in{opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .46s}

html[lang] .tx.tx-intl .rights-col.rf-acc .rights-h{margin:0}
.tx.tx-intl .rights-col.rf-acc .rf-panel-in>:first-child{margin-top:14px}
.tx.tx-intl .rights-col.rf-acc{padding-bottom:20px}
.tx.tx-intl .rights-grid:has(.rf-acc){align-items:start;row-gap:0}
.tx.tx-intl .rights-grid:has(.rf-acc) .rights-col:last-child{border-bottom:1px solid var(--tx-rule,#e4e2dc)}
@media (min-width:1024px) and (orientation:landscape){
  .tx.tx-intl .rights-grid:has(.rf-acc) .rights-col:first-child{border-bottom:1px solid var(--tx-rule,#e4e2dc)}
}

html[lang] .tx.tx-intl .flow-brief.rf-acc .flow-brief-h{margin:0 0 10px}
.tx.tx-intl .flow-brief.rf-acc>p{margin-bottom:0}
.tx.tx-intl .flow-brief.rf-acc .rf-panel-in>ul{margin-top:18px}
@media (min-width:1024px) and (orientation:landscape){
  .tx.tx-intl .flow-brief.rf-acc{row-gap:0}
  .tx.tx-intl .flow-brief.rf-acc .rf-head{grid-column:1 / 5;grid-row:1}
  .tx.tx-intl .flow-brief.rf-acc>p{grid-column:1 / 5;grid-row:2}
  .tx.tx-intl .flow-brief.rf-acc .rf-panel{grid-column:6 / 13;grid-row:1 / 4}
  .tx.tx-intl .flow-brief.rf-acc .rf-panel-in>ul{margin-top:0;display:grid;grid-template-columns:1fr 1fr;gap:0 40px}
}

/* ---- 5. About: service list in two columns (desktop, international) ---- */
@media (min-width:1024px) and (orientation:landscape){
  .tx.tx-intl ul.about-services{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;
    border-bottom:1px solid var(--tx-rule,#e4e2dc)
  }
  .tx.tx-intl ul.about-services li:last-child{border-bottom:0}
}

@media (prefers-reduced-motion:reduce){
  .rf-acc .rf-panel,.rf-acc .rf-panel-in,.rf-acc .rf-ic,.rf-acc .rf-ic::after{transition:none!important}
}

/* ---- 6. Awwwards ribbon on phones (evaluation period) ------------------
   Fixed over the text column until now. On phones it sits beside the hero
   headline, inside the page margin, and scrolls away with the page.
   js/index-refine.js sets --rf-ribbon-top; without it the fallback applies. */
@media (max-width:768px){
  html.rf-js #awwwards{
    position:absolute!important;top:var(--rf-ribbon-top,330px)!important;right:0!important;
    transform:scale(.45)!important;transform-origin:right top!important
  }
}
