/* eZephyr v2 — /contact/ visual prototype (Milestone 3D).
 * "Drop us a line": Mumbai's red pillar box on a painted kerb; the brief as an
 * inland letter with an airmail edge and a Gateway stamp; Marine Drive's
 * Queen's Necklace switching on at dusk (the original site's contact scene);
 * and a postcard to close. Uses tokens.css and components.css. Scoped to .ct.
 */

.page-contact { background: var(--ez-sky-light); }
.ct { display: flow-root; background: var(--ez-paper); color: var(--ez-ink); }
.ct .s-stone-grey { stroke: var(--ez-stone-grey); }
.ct .s-road { stroke: var(--ez-road); }

/* ================= 1. Hero ================= */
.ct-hero { position: relative; overflow: hidden; background: var(--ez-sea); color: #fff; }
.ct-hero__inner {
  display: grid;
  width: min(100% - 2 * var(--ez-gutter), var(--ez-max));
  margin-inline: auto;
  padding-top: clamp(20px, 3.5vw, 44px);
}
.ct-hero .breadcrumbs li,
.ct-hero .breadcrumbs li::before,
.ct-hero .breadcrumbs a { color: #fff; }
.ct-hero .breadcrumbs a { text-decoration-color: var(--ez-yellow); }
.ct-hero :focus-visible { outline-color: var(--ez-yellow); }
.ct .ct-eyebrow { background: var(--ez-yellow); color: var(--ez-ink); }
.ct-hero__title { margin-top: clamp(20px, 3vw, 36px); font-family: var(--ez-font-display); font-weight: 400; }
.ct-hero__line {
  display: block;
  font-size: clamp(2.7rem, 6.6vw, 6.25rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.ct-hero__word { display: inline-block; }
/* On blue, the highlighter is a full yellow block with ink type. */
.ct-mark { display: inline-block; padding: 0.06em 0.1em 0; line-height: 0.9; background: var(--ez-yellow); color: var(--ez-ink); }
.ct-hero__lead { max-width: 33rem; margin-top: clamp(16px, 2vw, 26px); }
.ct-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(22px, 2.8vw, 32px); }
.ct-btn-yellow { background: var(--ez-yellow); color: var(--ez-ink); box-shadow: 0 4px 0 var(--ez-ink); }
.ct-btn-yellow:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ez-ink); }
.ct-btn-yellow:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--ez-ink); }
.ct-quick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-color: var(--ez-yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.ct-quick svg { width: 24px; height: 24px; flex: none; }

.ct-postbox { position: relative; width: min(100%, 330px); margin: clamp(28px, 6vw, 48px) auto 0; }
.ct-postbox svg { display: block; width: 100%; height: auto; overflow: visible; }
.ct-sign-text { font: 400 19px var(--ez-font-display); letter-spacing: 1.5px; fill: var(--ez-paper); }
.ct-plate-text { font: 400 22px var(--ez-font-display); letter-spacing: 2px; fill: var(--ez-ink); }
@media (min-width: 960px) {
  .ct-hero__inner { grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: end; }
  .ct-hero__copy { padding-bottom: clamp(88px, 8vw, 116px); }
  .ct-postbox { width: 100%; max-width: 400px; margin: 0 0 0 auto; }
}

/* ================= 2. The brief (an inland letter) + 3. other ways ================= */
.ct-body { display: grid; gap: clamp(32px, 5vw, 56px); margin-block: clamp(56px, 8vw, 104px); }
@media (min-width: 1024px) {
  .ct-body { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; }
  .ct-ways { position: sticky; top: calc(var(--header-h) + 24px); }
}

.ct-letter {
  position: relative;
  padding: clamp(28px, 4vw, 48px) clamp(18px, 4vw, 48px) clamp(24px, 4vw, 44px);
  border: 3px solid var(--ez-ink);
  border-radius: var(--ez-radius);
  background: #fff;
  box-shadow: 8px 8px 0 var(--ez-ink);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
/* Airmail edge */
.ct-letter::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--ez-red) 0 14px, #fff 14px 24px, var(--ez-sea) 24px 38px, #fff 38px 48px);
}
.ct-letter__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ct-letter__kicker { font: 400 0.9375rem/1.2 var(--ez-font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ez-sea); }
.ct-letter__title {
  margin-top: 6px;
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.98;
  text-transform: uppercase;
}
.ct-letter__stamp { flex: none; width: clamp(58px, 7vw, 76px); height: auto; aspect-ratio: 90 / 110; transform: rotate(4deg); }

.ct-notice {
  margin-top: 22px;
  padding: 12px 16px;
  border-left: 6px solid var(--ez-ink);
  background: var(--ez-yellow);
  font-size: 1rem;
  line-height: 1.45;
}
.ct-required-note { margin-top: 18px; font-size: 0.9375rem; }
.ct-req, .ct-optional {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px 1px;
  border-radius: 2px;
  background: var(--ez-ink);
  color: var(--ez-yellow);
  font: 700 0.6875rem/1.4 var(--ez-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}
.ct-optional { background: var(--ez-sky-light); color: var(--ez-ink); }

.ct-form { display: grid; gap: 22px; margin-top: 22px; }
.ct-form__row { display: grid; gap: 22px; }
@media (min-width: 720px) { .ct-form__row { grid-template-columns: 1fr 1fr; } }
.ct-field { min-width: 0; }
.ct-field > label, .ct-services legend { display: block; margin-bottom: 8px; font-weight: 700; font-size: 1.0625rem; }
.ct-hint { margin: -2px 0 8px; font-size: 0.9375rem; line-height: 1.4; color: var(--ez-ink-soft); }
.ct-form input[type="text"],
.ct-form input[type="email"],
.ct-form input[type="tel"],
.ct-form textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--ez-ink);
  border-radius: 4px;
  background: var(--ez-paper);
  color: var(--ez-ink);
  font: 400 1.0625rem/1.4 var(--ez-font-body);
}
.ct-form textarea { min-height: 160px; resize: vertical; }
.ct-form input:focus-visible,
.ct-form textarea:focus-visible { outline: 3px solid var(--ez-sea); outline-offset: 2px; background: #fff; }
.ct-form [aria-invalid="true"] { border-color: var(--ez-red); box-shadow: inset 0 0 0 1px var(--ez-red); }
.ct-error { margin-top: 8px; font-size: 0.9375rem; font-weight: 700; }
.ct-error:empty { display: none; }
.ct-error::before {
  content: '!';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ez-red);
  color: #fff;
  font-size: 0.8125rem;
  vertical-align: 0.05em;
}

/* Services: six chips in the Services colours */
.ct-services { margin: 0; padding: 0; border: 0; }
.ct-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px 8px 12px;
  border: 2px solid var(--ez-ink);
  border-radius: 999px;
  background: var(--ez-paper);
  color: var(--ez-ink);
  font: 400 0.9375rem/1.2 var(--ez-font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.ct-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ct-check span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: #fff;
  vertical-align: -0.2em;
}
.ct-check:hover { background: var(--ez-sky-light); }
.ct-check:has(input:checked) { background: var(--c); }
.ct-check--light:has(input:checked) { color: #fff; }
.ct-check:has(input:checked) span::before { background: currentColor; box-shadow: inset 0 0 0 3px var(--c); }
.ct-check:has(input:focus-visible) { outline: 3px solid var(--ez-sea); outline-offset: 3px; }

.ct-privacy { font-size: 0.9375rem; line-height: 1.45; }
.ct-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.ct-submit .ez-btn:disabled {
  background: var(--ez-ink-soft);
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.ct-submit__note { font-size: 0.9375rem; color: var(--ez-ink-soft); }

/* Other ways to reach us */
.ct-ways__title {
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1;
  text-transform: uppercase;
}
.ct-ways__list { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 640px) and (max-width: 1023px) {
  .ct-ways__list { grid-template-columns: 1fr 1fr; }
  .ct-way:last-child:nth-child(odd) { grid-column: 1 / -1; } /* an odd card out spans the row (three cards since 2026-10-26) */
}
.ct-way {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 14px;
  align-content: start;
  padding: 18px;
  border: 2px solid var(--ez-ink);
  border-radius: var(--ez-radius);
  background: var(--c);
}
.ct-way__icon { grid-row: 1 / span 3; width: 40px; height: 40px; }
.ct-way__label { font: 400 1.25rem/1.1 var(--ez-font-display); text-transform: uppercase; letter-spacing: 0.04em; }
.ct-way__value { font-weight: 700; font-size: 1.0625rem; line-height: 1.35; overflow-wrap: anywhere; }
a.ct-way__value { display: inline-block; padding-block: 3px; color: var(--ez-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a.ct-way__value:hover { text-decoration-thickness: 4px; }
.ct-way__value[data-placeholder], .ct-way__more { font-weight: 400; font-size: 0.9375rem; }
.ct-way__more { margin-top: 4px; }

/* ================= 4. Marine Drive after six ================= */
.ct-marine { padding-top: clamp(48px, 7vw, 96px); background: var(--ez-lilac); }
.ct-marine__line {
  font-family: var(--ez-font-display);
  font-size: var(--ez-text-h2);
  line-height: 0.95;
  text-transform: uppercase;
}
.ct-marine__alt { display: inline-block; }
@supports (-webkit-text-stroke: 2px black) {
  .ct-marine__alt { color: transparent; -webkit-text-stroke: 2px var(--ez-ink); }
}
.ct-marine__scene svg { display: block; width: 100%; height: clamp(230px, 50vw, 340px); margin-top: clamp(8px, 2vw, 24px); }
@media (min-width: 1024px) { .ct-marine__scene svg { height: auto; aspect-ratio: 1440 / 360; } }
.ct .ct-win { fill: var(--ez-yellow); }
.ct-lamp__glow { opacity: 0.4; }
.ct-lamp__core { stroke: var(--ez-paper); stroke-width: 1.5; }
.ct-refl { opacity: 0.75; }

/* ================= 5. Postcard ================= */
.ct-cta { padding-block: clamp(48px, 7vw, 96px); background: var(--ez-sea); }
.ct-postcard {
  display: grid;
  gap: 28px;
  width: min(100% - 2 * var(--ez-gutter), 64rem);
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  border: 3px solid var(--ez-ink);
  border-radius: var(--ez-radius);
  background: #fff;
  box-shadow: 8px 8px 0 var(--ez-ink);
}
.ct-postcard__title {
  max-width: 11ch;
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: var(--ez-text-h2);
  line-height: 0.95;
  text-transform: uppercase;
}
.ct-postcard__text { max-width: 30rem; margin: 16px 0 26px; font-size: var(--ez-text-lead); line-height: 1.45; }
.ct-postcard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.ct-postcard__addr { position: relative; min-height: 260px; padding-top: 24px; border-top: 2px dashed var(--ez-ink-soft); }
.ct-postcard__stamp { position: absolute; top: 24px; right: 0; width: 80px; height: auto; aspect-ratio: 90 / 110; transform: rotate(3deg); }
.ct-postmark { position: absolute; top: 46px; right: 52px; width: 150px; height: auto; transform: rotate(-12deg); }
.ct-postmark__text { font: 400 12px var(--ez-font-display); letter-spacing: 1.5px; fill: var(--ez-ink-soft); }
.ct-postcard__to { margin-top: 128px; font: 400 1rem/1 var(--ez-font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ez-ink-soft); }
.ct-postcard__lines { margin-top: 6px; font-style: normal; }
.ct-postcard__lines span { display: block; padding: 8px 0 6px; border-bottom: 2px solid var(--ez-ink-soft); font-weight: 600; font-size: 1.125rem; }
.ct-postcard__lines a { color: var(--ez-ink); text-decoration-color: var(--ez-sea); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (min-width: 860px) {
  .ct-postcard { grid-template-columns: 1.15fr 1fr; gap: 0; }
  .ct-postcard__msg { padding-right: clamp(24px, 4vw, 48px); }
  .ct-postcard__addr { padding: 0 0 0 clamp(24px, 4vw, 48px); border-top: 0; border-left: 2px dashed var(--ez-ink-soft); }
  .ct-postcard__stamp { top: 0; }
  .ct-postmark { top: 22px; }
}

/* ================= Motion ================= */
@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .ct-hero .ez-eyebrow { animation: ez-rise 0.6s var(--ez-ease-out) both; }
  .ct-hero__word { animation: ez-rise 0.8s var(--ez-ease-out) both 0.08s; }
  .ct-hero__word:nth-child(2) { animation-delay: 0.16s; }
  .ct-hero__word:nth-child(3) { animation-delay: 0.24s; }
  .ct-hero__lead { animation: ez-rise 0.8s var(--ez-ease-out) both 0.34s; }
  .ct-hero__actions { animation: ez-rise 0.8s var(--ez-ease-out) both 0.44s; }
  .ct-postbox { animation: ez-rise-sm 1s var(--ez-ease-out) both 0.3s; }

  /* Loops: paused off-screen or on request */
  .ct-envelope { transform-box: fill-box; transform-origin: 50% 100%; animation: ct-post 5s var(--ez-ease-out) infinite 1.2s; }
  .ct-win { animation: ez-twinkle 3.6s ease-in-out infinite alternate var(--d, 0s); }
  .ct-waves { animation: ct-waves 3.2s linear infinite; }
  .ct-refl { animation: ct-shimmer 2.4s ease-in-out infinite alternate calc(var(--i) * -0.3s); }

  /* The necklace switches on, lamp by lamp, when the scene is reached (js/prototype/contact.js). */
  .ct-marine__scene.is-armed:not(.is-lit) .ct-lamp,
  .ct-marine__scene.is-armed:not(.is-lit) .ct-refl { opacity: 0; animation: none; }
  .ct-marine__scene.is-lit .ct-lamp { transition: opacity 0.35s ease calc(var(--i) * 90ms); }

  .ct-postcard { transition: transform 0.4s var(--ez-ease-out); }
  .ct-postcard.is-revealed .ct-postmark { animation: ct-postmark 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both 0.6s; }
  .ct-check, .ct-way { transition: background-color 0.2s ease, transform 0.3s var(--ez-ease-out); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ct-way:hover { transform: translateX(-6px); }
  .ct-postcard:hover { transform: rotate(-0.6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ct *, .ct *::before, .ct *::after { animation: none !important; transition: none !important; }
  .ct .ez-btn:hover, .ct .ez-btn:active { transform: none; }
}

@keyframes ct-post {
  0% { opacity: 0; transform: translateY(-36px); }
  14% { opacity: 1; transform: translateY(0); }
  55% { opacity: 1; transform: translateY(0); }
  82%, 100% { opacity: 0; transform: translateY(62px) scaleY(0.2); }
}
@keyframes ct-waves { from { transform: translateX(-40px); } to { transform: translateX(0); } }
@keyframes ct-shimmer { from { opacity: 0.85; } to { opacity: 0.25; } }
@keyframes ct-postmark { from { opacity: 0; transform: rotate(-12deg) scale(1.5); } }

/* ================= Milestone 8B: the working form =================
 * Dropdowns match the text fields; notices show only when they have something to say. */
.ct-form select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 44px 12px 14px;
  border: 2px solid var(--ez-ink);
  border-radius: 4px;
  background: var(--ez-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23313132' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
  color: var(--ez-ink);
  font: 400 1.0625rem/1.4 var(--ez-font-body);
  appearance: none;
  cursor: pointer;
}
.ct-form select:focus-visible { outline: 3px solid var(--ez-sea); outline-offset: 2px; background-color: #fff; }
.ct-hint--after { margin: 8px 0 0; }
.ct-notice:empty, .ct-alert:empty { display: none; }
.ct-notice a, .ct-alert a, .ct-privacy a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Spam trap: off-screen for people, still in the form for bots. */
.ct-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Errors from the server or the network. */
.ct-alert {
  padding: 12px 16px;
  border-left: 6px solid var(--ez-red);
  background: #fff;
  font-size: 1rem;
  line-height: 1.45;
}

/* Sending. */
.ct-submit .ez-btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }

/* Sent: the form gives way to a thank-you. */
.ct-sent {
  margin-top: 22px;
  padding: clamp(20px, 3vw, 32px);
  border: 2px solid var(--ez-ink);
  border-radius: 6px;
  background: var(--ez-sky-light);
}
.ct-sent__title { font: 400 clamp(1.6rem, 3vw, 2.2rem)/1.05 var(--ez-font-display); text-transform: uppercase; }
.ct-sent__title:focus { outline: none; }
.ct-sent__text { max-width: 46ch; margin-top: 10px; font-size: 1.0625rem; line-height: 1.5; }
