/* Buttons, links, icons, forms, dialogs, the hanging piece and the viewer. */
.ico { width: 22px; height: 22px; flex: none; }
.ico-lg { width: 38px; height: 38px; color: var(--water); stroke-width: 1.2; }

.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow .ico { width: 20px; height: 20px; color: var(--accent); }
.eyebrow a { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 24px 15px 26px; border-radius: var(--leaf);
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .98rem; letter-spacing: .01em; line-height: 1.1;
  transition: border-radius .45s var(--ease), transform .3s var(--ease), box-shadow .3s;
}
.btn .ico { transition: transform .35s var(--ease); }
.btn:hover { border-radius: 20px 3px 20px 3px; box-shadow: 0 14px 34px -14px var(--accent); }
.btn:hover .ico { transform: translateX(4px) rotate(-6deg); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }

.text-link { text-decoration: underline wavy var(--blue) 1.4px; text-underline-offset: 6px; transition: color .2s, text-underline-offset .2s; }
.text-link:hover { color: var(--accent); text-underline-offset: 8px; }

.tool { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--leaf); color: var(--ink); background: rgba(var(--scrim), .5); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); transition: color .2s, box-shadow .2s, border-radius .4s var(--ease); }
.tool:hover { color: var(--accent); box-shadow: inset 0 0 0 1px currentColor; border-radius: 20px 3px 20px 3px; }

/* reveal on scroll (plain CSS so it works without the motion libraries) */
.js [data-motion="full"] [data-reveal], .js[data-motion="full"] [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js[data-motion="full"] [data-reveal].is-in { opacity: 1; transform: none; }

/* verse */
.verse { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.5; color: var(--ink); }
.verse span { display: block; }
.verse + .verse { margin-top: 1.3em; }
.verse-large { font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.28; }
.sign { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--accent); margin-top: 1.2em; }
.sign::before { content: ""; display: inline-block; width: 38px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 12px; }

/* cameo portraits: the ring from the logo */
.cameo { display: block; width: 104px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--wall), 0 0 0 2.5px var(--water); }
.cameo img { width: 100%; height: 100%; object-fit: cover; }
.cameo-lg { width: clamp(150px, 20vw, 240px); }

/* forms */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-size: .86rem; letter-spacing: .04em; color: var(--ink-2); }
.field .opt { color: var(--ink-3); font-style: italic; margin-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; background: rgba(var(--scrim), .5); border: 0; border-bottom: 1.5px solid var(--line); border-radius: 3px 14px 0 0;
  transition: border-color .2s, background .2s;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7bff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 9c2.300 2.200 4.600 4.300 7 6.300 2.400-2 4.700-4.100 7-6.300'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field select option { background: var(--wall-2); color: var(--ink); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--accent); background-color: rgba(var(--scrim), .8); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #ff7a6b; }
.field-msg { font-size: .84rem; color: #ff9b8f; }
[data-theme="day"] .field-msg { color: #b3261e; }
.form-status { min-height: 1.4em; font-size: .92rem; margin-top: 10px; }
.form-status.err { color: #ff9b8f; }
[data-theme="day"] .form-status.err { color: #b3261e; }
.form-status.ok { color: var(--accent); }
.form-thanks h2, .form-thanks h3 { font-size: 2rem; margin-bottom: 10px; }
.form-thanks p + p { margin-top: 16px; }
.form-thanks:focus { outline: none; }

/* dialogs */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--wall-2); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(4, 5, 12, .72); backdrop-filter: blur(6px); }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 3; }

.sheet { width: 100vw; height: 100dvh; background: var(--wall); padding: calc(var(--head) + 20px) var(--gutter) 30px; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-nav { display: grid; gap: 4px; font-family: var(--serif); font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1.15; }
.sheet-nav a { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sheet-nav a[aria-current] { color: var(--accent); font-style: italic; }
.sheet-foot { margin-top: auto; padding-top: 24px; }

/* placed by app.js right under its button, so it stays with the header in either layout and at any width */
.prefs { width: min(420px, calc(100vw - 28px)); position: fixed; margin: 0; top: calc(var(--head) + 6px); left: auto; right: 14px; padding: 30px 28px 26px; border-radius: 4px 26px 4px 26px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.prefs h2 { font-size: 1.6rem; margin: 0 40px 20px 0; }
.prefs fieldset { margin-top: 16px; }
.prefs legend { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; padding: 0; }
.prefs fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prefs legend { grid-column: 1 / -1; float: left; width: 100%; }
.prefs label { position: relative; cursor: pointer; }
.prefs input { position: absolute; opacity: 0; inset: 0; }
.prefs label span { display: block; padding: 12px 14px; border-radius: var(--leaf); box-shadow: inset 0 0 0 1px var(--line); font-size: .95rem; transition: background .2s, color .2s, border-radius .4s var(--ease); }
.prefs input:checked + span { background: var(--accent); color: var(--on-accent); box-shadow: none; border-radius: 20px 3px 20px 3px; font-weight: 600; }
.prefs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.enquire { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border-radius: 4px 30px 4px 30px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.enquire-body { padding: clamp(26px, 5vw, 44px); }
.enquire h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 30px 22px 0; font-style: italic; }

/* a hanging piece */
.hang { position: relative; display: block; color: var(--ink); }
.hang picture { display: block; overflow: hidden; border-radius: 2px; box-shadow: 0 22px 50px -26px rgba(0, 0, 0, .75); transition: box-shadow .5s var(--ease), transform .6s var(--ease); background: linear-gradient(135deg, var(--c1), var(--c2)); }
.hang img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: transform 1.2s var(--ease); }
.hang:hover picture, .hang:focus-visible picture { box-shadow: 0 26px 80px -22px var(--c2), 0 0 0 1px rgba(255, 255, 255, .08); transform: translateY(-5px); }
.hang:hover img { transform: scale(1.035); }
.placard { display: block; margin-top: 12px; padding-left: 12px; border-left: 1.5px solid var(--line); transition: border-color .3s; }
.hang:hover .placard, .hang:focus-visible .placard { border-left-color: var(--accent); }
.placard-title { display: block; font-family: var(--serif); font-size: 1.08rem; line-height: 1.25; }
.placard-medium { display: block; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.hang-solo .placard { display: none; }

/* the viewer */
.viewer { width: 100vw; height: 100dvh; background: var(--wall); overflow: hidden; }
.viewer[open] { display: grid; grid-template-rows: 1fr auto; }
.viewer-glow, .piece-glow { position: absolute; inset: -20%; z-index: 0; pointer-events: none; opacity: .5; filter: blur(90px);
  background: radial-gradient(40% 46% at 32% 40%, var(--c2, transparent), transparent 70%), radial-gradient(46% 50% at 70% 60%, var(--c1, transparent), transparent 72%); transition: background .8s; }
[data-theme="day"] .viewer-glow, [data-theme="day"] .piece-glow { opacity: .28; }
.viewer-stage { position: relative; z-index: 1; display: grid; place-items: center; min-height: 0; padding: clamp(60px, 7vh, 80px) clamp(14px, 6vw, 90px) 14px; overflow: hidden; touch-action: none; }
.viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: var(--shadow); cursor: zoom-in; transition: opacity .35s, transform .5s var(--ease); will-change: transform; user-select: none; -webkit-user-drag: none; }
.viewer-stage img.is-loading { opacity: 0; transform: scale(.985); }
.is-zoomed img { cursor: grab; transition: none; }
.is-zoomed.is-dragging img { cursor: grabbing; }
.viewer-bar { position: relative; z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 14px var(--gutter) 22px; background: linear-gradient(0deg, rgba(var(--scrim), .92), rgba(var(--scrim), 0)); transition: opacity .3s; }
.viewer.is-zoomed-in .viewer-bar { opacity: 0; pointer-events: none; }
.viewer-room { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.viewer-placard { max-width: 62ch; }
.viewer-placard h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); margin: 4px 0 6px; }
.viewer-words { color: var(--ink-2); font-size: .98rem; white-space: pre-line; max-height: 5.2em; overflow: auto; }
.viewer-medium { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.viewer-words:empty, .viewer-medium:empty { display: none; }
.viewer-actions { display: grid; gap: 12px; justify-items: end; flex: none; font-size: .9rem; }
.viewer-prev, .viewer-next, .viewer-zoom, .viewer-close { position: absolute; z-index: 3; }
.viewer-close { top: 14px; right: 14px; }
.viewer-zoom { top: 14px; right: 68px; }
.viewer-prev { left: 14px; top: 46%; }
.viewer-next { right: 14px; top: 46%; }
@media (max-width: 760px) {
  .viewer-bar { flex-direction: column; align-items: stretch; gap: 14px; }
  .viewer-actions { justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .viewer-prev, .viewer-next { top: 36%; }
  .viewer-stage { padding-inline: 8px; }
  .viewer-prev { left: 6px; } .viewer-next { right: 6px; }
}
