/* contact.html: message in a bottle. Builds on assets/css/harbour-office.css
   A night sea with a floating bottle, an aged parchment letter and a wax seal to send it. */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
.captain-wheel{display:block;}
.captain-wheel img{width:100%;height:100%;animation:captainWheel 24s linear infinite;}
.captain-wheel:hover img{animation-duration:4s;}
@keyframes captainWheel{to{transform:rotate(360deg)}}

.bottle-scene{position:relative;max-width:700px;margin:0 auto;}

/* ---------- The sea and the bottle ---------- */
.bottle-sea{
  position:relative;isolation:isolate;overflow:hidden;height:230px;border-radius:26px 26px 0 0;
  background:radial-gradient(ellipse 70% 80% at 50% 100%,#14507a 0%,transparent 70%),linear-gradient(180deg,#02070f 0%,#06142a 55%,#0a2a4c 100%);
  box-shadow:inset 0 0 0 8px #071a33,inset 0 0 0 9px rgba(201,170,106,.55),0 24px 60px rgba(7,17,28,.25);
}
.bottle-sea__star{position:absolute;left:var(--x);top:var(--y);width:3px;height:3px;border-radius:50%;background:#fff;opacity:.8;animation:btTwinkle 4s ease-in-out infinite;}
.bottle-sea__star:nth-child(2){animation-delay:-1.3s}.bottle-sea__star:nth-child(3){animation-delay:-2.1s}.bottle-sea__star:nth-child(4){animation-delay:-3s}
@keyframes btTwinkle{0%,100%{opacity:.25}50%{opacity:.95}}
.bottle-sea__moon{position:absolute;right:14%;top:18%;width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fffbe8,#f2d99b 60%,#c9aa6a);box-shadow:0 0 40px rgba(242,217,155,.55);}
.bottle-float{position:absolute;left:50%;bottom:34px;width:min(330px,72%);transform:translateX(-50%);animation:btBob 6s ease-in-out infinite;}
.bottle{display:block;width:100%;height:auto;overflow:visible;transform:rotate(-9deg);filter:drop-shadow(0 8px 14px rgba(0,0,0,.35));}
@keyframes btBob{0%,100%{transform:translate(-50%,0) rotate(-1.5deg)}50%{transform:translate(-50%,-9px) rotate(1.5deg)}}
.bottle-wave{position:absolute;left:0;width:200%;height:70px;}
.bottle-wave--back{bottom:14px;fill:rgba(18,103,223,.45);animation:btWave 14s linear infinite;}
.bottle-wave--front{bottom:-6px;fill:#0a2a4c;animation:btWave 9s linear infinite reverse;}
@keyframes btWave{to{transform:translateX(-50%)}}

/* ---------- The parchment letter ---------- */
.parchment-wrap{position:relative;z-index:2;margin-top:-10px;filter:drop-shadow(0 22px 26px rgba(60,38,10,.28));}
.parchment{
  position:relative;padding:44px clamp(22px,6vw,56px) 64px;color:#3d2a12;
  font-family:"Harbour Serif",Georgia,"Times New Roman",serif;font-style:italic;
  background:
    radial-gradient(ellipse 60% 40% at 8% 6%,rgba(155,110,40,.22),transparent 70%),
    radial-gradient(ellipse 50% 40% at 94% 92%,rgba(155,110,40,.26),transparent 70%),
    radial-gradient(circle at 70% 30%,rgba(255,255,255,.35),transparent 45%),
    linear-gradient(180deg,#f6e9c8,#ecd9a8);
  box-shadow:inset 0 0 70px rgba(150,100,30,.28),inset 0 0 0 1px rgba(150,100,30,.25);
  -webkit-mask:conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) 50%/20px 100%;
  mask:conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) 50%/20px 100%;
  transform-origin:50% 0;
}
.parchment[hidden]{display:none;}
.parchment__pot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;}
.parchment__salute{margin:0 0 22px;font-size:clamp(26px,4vw,34px);line-height:1.1;color:#2a1a08;}
.parchment-field{display:grid;grid-template-columns:96px 1fr;align-items:baseline;gap:6px 14px;margin-bottom:6px;}
.parchment-field label{font:900 11px/1 Inter,system-ui,"Segoe UI",Arial,sans-serif;font-style:normal;letter-spacing:.22em;text-transform:uppercase;color:#8a6a2e;}
.parchment-field input,.parchment-field select,.parchment-field textarea{
  width:100%;padding:8px 2px;border:0;border-bottom:1px solid rgba(120,80,30,.45);border-radius:0;background:transparent;
  color:#2a1a08;font:italic 400 21px/1.4 "Harbour Serif",Georgia,serif;
}
.parchment-field input::placeholder,.parchment-field textarea::placeholder{color:rgba(90,60,20,.4);}
.parchment-field select{appearance:none;-webkit-appearance:none;cursor:pointer;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a6a2e' stroke-width='1.6'/%3E%3C/svg%3E") right 4px center no-repeat;}
.parchment-field input:focus-visible,.parchment-field select:focus-visible,.parchment-field textarea:focus-visible{outline:none;border-bottom-color:#a3271f;box-shadow:0 1px 0 #a3271f;}
.parchment-field--letter{grid-template-columns:1fr;margin-top:18px;}
.parchment-field--letter textarea{
  min-height:224px;padding:0 2px;border:0;resize:vertical;line-height:32px;
  background:repeating-linear-gradient(transparent 0 31px,rgba(120,80,30,.32) 31px 32px) 0 0/100% 32px local;
}
.parchment-field--letter textarea:focus-visible{box-shadow:none;}
.parchment__foot{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px;}
.parchment__note{margin:0;max-width:310px;font:400 12.5px/1.55 Inter,system-ui,"Segoe UI",Arial,sans-serif;font-style:normal;color:rgba(61,42,18,.72);}
.parchment__note a,.parchment--fallback a:not(.parchment__link){color:#8a2a1c;}
.parchment__status{min-height:1.5em;margin:12px 0 0;font:600 14px/1.5 Inter,system-ui,"Segoe UI",Arial,sans-serif;font-style:normal;color:#3d2a12;}
.parchment__status[data-kind="ok"]{color:#3f6a16;}
.parchment__status[data-kind="error"]{color:#a3271f;}

/* ---------- The wax seal (send button) ---------- */
.wax-seal{
  flex:none;display:grid;justify-items:center;gap:6px;padding:0;border:0;background:none;cursor:pointer;color:#6e120d;
  font:900 10px/1 Inter,system-ui,"Segoe UI",Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase;
}
.wax-seal__stamp{
  display:grid;place-items:center;width:84px;height:84px;border-radius:52% 48% 55% 45%/48% 54% 46% 52%;
  background:radial-gradient(circle at 34% 28%,#d8493d 0%,#a3271f 45%,#6e120d 100%);
  box-shadow:inset 0 -4px 8px rgba(0,0,0,.35),inset 0 3px 6px rgba(255,170,150,.35),0 8px 16px rgba(80,15,10,.4);
  transition:transform .3s cubic-bezier(.2,.9,.3,1.2),box-shadow .3s ease;
}
.wax-seal__stamp svg{width:34px;height:42px;fill:none;stroke:rgba(255,200,185,.65);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 0 rgba(0,0,0,.45));}
.wax-seal__stamp svg circle{fill:none;}
.wax-seal:hover:not(:disabled) .wax-seal__stamp{transform:rotate(-8deg) scale(1.06);}
.wax-seal:active:not(:disabled) .wax-seal__stamp{transform:scale(.9);box-shadow:inset 0 -2px 4px rgba(0,0,0,.4),0 3px 6px rgba(80,15,10,.4);}
.wax-seal:focus-visible{outline:2px solid #3d2a12;outline-offset:6px;border-radius:12px;}
.wax-seal:disabled{opacity:.6;cursor:progress;}

/* ---------- Fallback while the form is switched off ---------- */
.parchment--fallback{padding-bottom:70px;font-size:19px;line-height:1.55;}
.parchment--fallback p{margin:0 0 14px;}
.parchment--fallback .parchment__salute{margin-bottom:16px;}
.parchment__link{display:inline-block;padding:13px 24px;border-radius:999px;background:#a3271f;color:#fff3e6;text-decoration:none;font:900 12px/1 Inter,system-ui,"Segoe UI",Arial,sans-serif;font-style:normal;letter-spacing:.2em;text-transform:uppercase;box-shadow:0 8px 16px rgba(80,15,10,.3);}
.parchment__link:hover{background:#8a1f18;}
.parchment__link:focus-visible{outline:2px solid #3d2a12;outline-offset:4px;}

/* ---------- Sending: the letter rolls up, slips into the bottle, which drifts away ---------- */
.bottle-scene.is-sent .parchment{animation:btRoll 1.9s cubic-bezier(.6,0,.4,1) forwards;}
.bottle-scene.is-sent .bottle-float{animation:btBob 6s ease-in-out infinite,btAway 3.4s ease-in 1.6s forwards;}
@keyframes btRoll{
  0%{transform:none;opacity:1}
  45%{transform:scale(.55,.07);opacity:1}
  100%{transform:translateY(-300px) scale(.12,.04);opacity:0}
}
@keyframes btAway{to{left:130%;opacity:0}}
.sent-note{padding:46px 24px 54px;text-align:center;color:#3d2a12;font-family:"Harbour Serif",Georgia,serif;}
.sent-note[hidden]{display:none;}
.sent-note__title{margin:0 0 10px;font-style:italic;font-size:clamp(28px,4.4vw,38px);line-height:1.1;color:#2a1a08;}
.sent-note p:not(.sent-note__title){max-width:440px;margin:0 auto 20px;font:400 15px/1.6 Inter,system-ui,"Segoe UI",Arial,sans-serif;color:rgba(11,27,45,.7);}
.sent-note__again{padding:11px 22px;border:1px solid #b8964f;border-radius:999px;background:transparent;color:#7d5f27;cursor:pointer;font:900 11px/1 Inter,system-ui,"Segoe UI",Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase;}
.sent-note__again:hover{background:rgba(184,150,79,.14);}
.sent-note__again:focus-visible{outline:2px solid #b8964f;outline-offset:4px;}
.bottle-scene.is-gone .bottle-float{opacity:0;}

.contact-elsewhere{margin:30px 0 0;text-align:center;font-size:14px;color:rgba(11,27,45,.65);}
.contact-elsewhere a{color:#7d5f27;font-weight:700;}
.contact-back{margin:18px 0 0;text-align:center;font-size:12px;font-weight:900;letter-spacing:.2em;text-transform:uppercase;}
.contact-back a{color:#9a783b;text-decoration:none;}
.contact-back a:focus-visible,.contact-elsewhere a:focus-visible{outline:2px solid var(--oc-gold);outline-offset:4px;}

@media (max-width:560px){
  .bottle-sea{height:190px;}
  .parchment{padding-top:34px;padding-bottom:58px;}
  .parchment-field{grid-template-columns:1fr;gap:0;}
  .parchment__foot{flex-direction:column-reverse;align-items:flex-end;}
  .parchment__note{max-width:none;}
}
@media (prefers-reduced-motion:reduce){
  .captain-wheel img,.bottle-float,.bottle-wave,.bottle-sea__star{animation:none!important;}
  .bottle-scene.is-sent .parchment,.bottle-scene.is-sent .bottle-float{animation:none!important;}
  .wax-seal__stamp{transition:none;}
}

.site-footer{padding:24px 20px 28px;text-align:center;}
