/* Studio Stour: contact page */

/* ---------- opener: the form on the first screen beside the River Stour at Nayland ---------- */
.copen { position: relative; padding: calc(var(--header-h) + 12px) 0 clamp(32px, 2.6vw, 40px); }
.copen__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3.2vw, 52px); align-items: stretch; }
.copen__panel { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
  padding: clamp(20px, 2vw, 28px) clamp(22px, 2.8vw, 42px) clamp(20px, 2vw, 26px);
  box-shadow: 0 40px 70px -50px rgba(19, 36, 31, .45); }
.copen__panel > .corner-marks { inset: 8px; }
.copen__title { font-size: clamp(2.4rem, 3.7vw, 3.4rem); margin: 0 0 .18em; }
.copen__lede { font-size: clamp(1.06rem, 1.2vw, 1.16rem); color: var(--ink-2); margin: 0 0 18px; }
.copen .form { gap: 13px; }
.copen .form__row { gap: 14px; }
.copen .field { gap: 5px; }
.copen .field textarea { min-height: 88px; height: 96px; }
.copen .form__foot { padding-top: 4px; }

.copen__sheet { position: relative; display: flex; flex-direction: column; min-height: 0; }
.copen__frame { position: relative; flex: 1 1 auto; min-height: 340px; max-height: var(--media-cap); margin: 0; cursor: crosshair; }
.copen__frame > img, .words__frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.copen__photo { object-position: 50% 60%; }
.copen__drawing { z-index: 1; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 42% 72%, transparent var(--bloom, 150%), #000 calc(var(--bloom, 150%) + 10%)), radial-gradient(circle at var(--x, 50%) var(--y, 50%), #000 var(--lr, 0px), transparent calc(var(--lr, 0px) + 1.5px));
  mask-image: radial-gradient(circle at 42% 72%, transparent var(--bloom, 150%), #000 calc(var(--bloom, 150%) + 10%)), radial-gradient(circle at var(--x, 50%) var(--y, 50%), #000 var(--lr, 0px), transparent calc(var(--lr, 0px) + 1.5px)); }
.copen__frame::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(19, 36, 31, .5), rgba(19, 36, 31, 0) 26%); }
.copen__cap { position: absolute; left: 22px; right: 22px; top: 18px; z-index: 3; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-weight: 650; font-size: .9rem; letter-spacing: .02em; color: var(--on-dark); pointer-events: none; }
.copen__ll { flex: none; width: 10.5em; text-align: right; white-space: nowrap; font-weight: 500; opacity: .86; font-variant-numeric: tabular-nums; }
.copen__tb { position: relative; z-index: 4; margin: -72px 18px 0 -26px; background: var(--white); color: var(--stour); grid-template-columns: 1fr 1fr;
  box-shadow: 0 24px 50px -30px rgba(19, 36, 31, .5); }
.copen__tb > div { border-left: 1px solid currentColor; border-top: 1px solid currentColor; padding: 8px 16px 6px; }
.copen__tb > div:first-child { border-top: 0; }
.copen__tb > div:nth-child(2) { border-left: 0; }
.copen__tb > .copen__tb-wide { grid-column: 1 / -1; border-left: 0; }
.copen__tb dd { font-family: var(--display); font-size: 1.16rem; line-height: 1.3; padding-bottom: 4px; }
.copen__tb dd a { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 -6px; text-decoration: none; background: linear-gradient(var(--ochre), var(--ochre)) 0 calc(100% - 9px) / 0 1px no-repeat; transition: background-size .4s var(--ease), color .3s; }
.copen__tb dd a:hover, .copen__tb dd a:focus-visible { background-size: 100% 1px; color: var(--ochre-ink); }

.js:not(.reduced):not(.no-anim) [data-bloom] { --bloom: 0%; }
.js:not(.reduced):not(.no-anim) [data-tb] > div { clip-path: inset(0 100% 0 0); }
.js:not(.reduced):not(.no-anim) [data-copen-form] .form__status,
.js:not(.reduced):not(.no-anim) [data-copen-form] .form__row,
.js:not(.reduced):not(.no-anim) [data-copen-form] .form > .field,
.js:not(.reduced):not(.no-anim) [data-copen-form] .form__foot { opacity: 0; transform: translateY(22px); }

@media (min-width: 981px) and (max-height: 820px) {
  .copen { padding-top: calc(var(--header-h) + 4px); padding-bottom: 28px; }
  .copen__panel { padding: 16px 32px 16px; }
  .copen__title { font-size: clamp(2.2rem, 3.2vw, 2.9rem); margin-bottom: .12em; }
  .copen__lede { margin-bottom: 10px; font-size: 1.04rem; }
  .copen .form, .copen .form__row { gap: 9px; }
  .copen .field { gap: 3px; }
  .copen .field label { font-size: .875rem; }
  .copen .field input, .copen .field select { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
  .copen .field textarea { min-height: 64px; height: 68px; padding-top: 9px; }
  .copen .form__foot { padding-top: 0; }
  .copen .btn { min-height: 46px; }
  .copen__tb { margin-top: -60px; }
  .copen__tb > div { padding: 5px 14px 3px; }
  .copen__tb dd { font-size: 1.06rem; padding-bottom: 2px; }
  .copen__tb dd a { min-height: 44px; margin: -10px 0 -9px; }
}
@media (max-width: 980px) {
  .copen__grid { grid-template-columns: 1fr; }
  .copen__frame { flex: none; height: min(62vh, 520px); min-height: 0; }
  .copen__tb { margin: -56px 12px 0 12px; }
}
@media (max-width: 640px) {
  /* phones: the river becomes a short band above the form, the title block follows the form */
  .copen { padding-top: calc(var(--header-h) + 6px); }
  .copen__grid { gap: 0; }
  .copen__sheet { display: contents; }
  .copen__frame { order: -1; height: 132px; min-height: 0; border-radius: var(--r) var(--r) 0 0; }
  .copen__frame .corner-marks { display: none; }
  .copen__frame::after { background: linear-gradient(180deg, rgba(19, 36, 31, .55), rgba(19, 36, 31, 0) 60%); }
  .copen__photo, .copen__drawing { object-position: 50% 78%; }
  .copen__cap { top: 12px; left: 14px; right: 14px; font-size: .875rem; }
  .copen__panel { padding: 18px 18px 20px; border-radius: 0 0 var(--r) var(--r); border-top: 0; }
  .copen__panel > .corner-marks { display: none; }
  .copen__title { font-size: clamp(2.1rem, 9vw, 2.5rem); }
  .copen__lede { margin-bottom: 14px; }
  .copen .form { gap: 10px; }
  .copen .form__row { gap: 10px; }
  .copen .field textarea { min-height: 84px; height: 88px; }
  .copen__tb { grid-template-columns: 1fr; margin: 22px 0 0; }
  .copen__tb > div { border-left: 0 !important; }
  .copen__tb > div:nth-child(2) { border-top: 1px solid currentColor; }
}

/* ---------- what happens next: a river line drawn through the four steps ---------- */
.next { padding: clamp(64px, 6vw, 92px) 0; overflow: clip; }
.next .section-head { margin-bottom: clamp(28px, 3vw, 44px); }
.next__track { position: relative; }
/* the line runs from the centre of the first marker (0%) to the centre of the last (75%), crossing every marker */
.next__line { position: absolute; left: 0; top: 0; width: 75%; height: 56px; overflow: visible; }
.next__line path { fill: none; }
.next__line-base { stroke: var(--rule-dark); stroke-width: 1.3; stroke-dasharray: 3 6; }
.next__line-draw { stroke: var(--ochre); stroke-width: 2.4; stroke-linecap: round; }
.next__rail { display: none; }
.next__steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 0; list-style: none; }
.next__step { position: relative; padding: 76px clamp(18px, 2.4vw, 36px) 0 0; }
.next__mark { position: absolute; left: -7px; top: 21px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ochre); background: var(--stour); transition: background .5s var(--ease), box-shadow .6s var(--ease); }
.next__step.is-on .next__mark { background: var(--ochre); box-shadow: 0 0 0 6px rgba(186, 138, 58, .18); }
.next__img { position: relative; aspect-ratio: 16 / 10; margin-bottom: 18px; }
.next__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(.9); transition: filter 1.2s var(--ease); }
.next__step.is-on .next__img img { filter: none; }
.next__img--plan img { object-position: 50% 42%; }
.next__img--board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: center; padding: 6px 4px; }
.next__img--board .frame { aspect-ratio: 3 / 4; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6); animation: board-float 6s ease-in-out infinite alternate; }
.next__img--board .frame:nth-child(1) { rotate: -3deg; }
.next__img--board .frame:nth-child(2) { rotate: 2deg; translate: 0 -6px; animation-delay: -2s; }
.next__img--board .frame:nth-child(3) { rotate: -1.5deg; animation-delay: -4s; }
@keyframes board-float { from { transform: translateY(4px); } to { transform: translateY(-5px); } }
.next__step p { font-size: 1rem; line-height: 1.6; }
.next__head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.next__step .next__num { font-family: var(--display); font-style: italic; font-size: 2.5rem; line-height: 1; color: var(--ochre) !important; margin: 0 0 6px; }
.next__title { font-size: clamp(1.18rem, 1.35vw, 1.36rem); line-height: 1.22; margin: 0 0 .5em; }
.next .text-link { padding: 10px 0; margin: -10px 0; color: var(--ochre-soft); }
.reduced .next__img--board .frame { animation: none; }
@media (max-width: 980px) {
  .next__steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .next__line { display: none; }
  .next__rail { display: block; position: absolute; left: 6px; top: 8px; bottom: 0; width: 1px; background: var(--rule-dark); }
  .next__rail i { position: absolute; inset: 0; background: var(--ochre); transform-origin: top; transform: scaleY(var(--rail, 1)); }
  .next__steps { padding-left: 36px; }
  .next__step { padding: 0 18px 0 0; }
  .next__mark, .next__step:first-child .next__mark { left: -36px; top: 4px; }
}
@media (max-width: 640px) {
  .next__steps { grid-template-columns: 1fr; row-gap: 34px; }
  .next__step { padding-right: 0; }
  .next__img { aspect-ratio: 16 / 9; max-height: 52vh; }
}

/* ---------- kind words: cork and thistles as a wash, a firepit garden born from its drawing ---------- */
.words { overflow: clip; background: var(--paper); }
.words__wash { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.words__wash img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; animation: band-breathe 9s ease-in-out infinite alternate; }
.words__wash::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .93), rgba(255, 255, 255, .84) 46%, rgba(255, 255, 255, .42) 72%, rgba(31, 56, 51, .18)); }
.words__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 80px); align-items: center; }
.words__copy { padding-right: 8px; }
.words__copy .h2 { margin-bottom: .7em; }
.words__deck { display: grid; }
.word { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
.word.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.word p { font-family: var(--display); font-size: clamp(1.32rem, 1.95vw, 1.9rem); line-height: 1.36; font-weight: 450; color: var(--stour); margin: 0 0 18px; }
.word footer { font-weight: 650; color: var(--ochre-ink); }
.words__dots { display: flex; gap: 6px; margin: 20px 0 26px; }
.words__dots button { width: 64px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; }
.words__dots i { display: block; width: 100%; height: 2px; background: rgba(31, 56, 51, .2); position: relative; overflow: hidden; }
.words__dots i::after { content: ''; position: absolute; inset: 0; background: var(--ochre-ink); transform-origin: left; transform: scaleX(var(--p, 0)); }
.words__dots button[aria-pressed="true"] i::after { transform: scaleX(var(--p, 1)); }
.words__frame { position: relative; margin: 0; aspect-ratio: 4 / 5; width: min(100%, calc(min(72vh, 640px) * .8)); justify-self: end; cursor: crosshair; }
.words__photo { object-position: 46% 50%; }
.words__frame .copen__drawing { object-position: 46% 50%;
  -webkit-mask-image: radial-gradient(circle at 46% 64%, transparent var(--bloom, 150%), #000 calc(var(--bloom, 150%) + 10%)), radial-gradient(circle at var(--x, 50%) var(--y, 50%), #000 var(--lr, 0px), transparent calc(var(--lr, 0px) + 1.5px));
  mask-image: radial-gradient(circle at 46% 64%, transparent var(--bloom, 150%), #000 calc(var(--bloom, 150%) + 10%)), radial-gradient(circle at var(--x, 50%) var(--y, 50%), #000 var(--lr, 0px), transparent calc(var(--lr, 0px) + 1.5px)); }
.reduced .words__wash img { animation: none; }
@media (max-width: 900px) {
  .words__wash::after { background: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(255, 255, 255, .9) 60%, rgba(255, 255, 255, .6)); }
  .words__grid { grid-template-columns: 1fr; }
  .words__frame { justify-self: stretch; width: 100%; aspect-ratio: 4 / 3; max-height: 60vh; }
}
@media (max-width: 520px) { .words__dots button { width: 52px; } .words__btns .btn { width: 100%; justify-content: space-between; } }
