/* ==========================================================================
   Contact — hero, channels, brief composer with live letter preview
   ========================================================================== */

.contact-hero { position: relative; overflow: hidden; padding-top: 26px; padding-bottom: clamp(70px, 8vw, 120px); background: var(--block); color: var(--block-ink); isolation: isolate; }
.contact-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 75% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(circle at 75% 40%, #000 10%, transparent 70%);
  animation: grid-drift 24s linear infinite;
}
@keyframes grid-drift { to { background-position: 56px 56px; } }
.contact-hero .hero-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--block-muted); }
.contact-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(30px, 5vw, 80px); align-items: end; margin-top: clamp(60px, 7vw, 110px); }
.contact-title { margin: 0 0 0 -6px; font-size: clamp(76px, 10.6vw, 190px); font-weight: 500; line-height: .84; letter-spacing: -.09em; }
.contact-title em { color: var(--coral-soft); font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; }
.availability { display: flex; gap: 16px; align-items: flex-start; max-width: 520px; margin: clamp(40px, 4vw, 60px) 0 0; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; color: var(--block-muted); }
.availability .status-dot { flex: 0 0 auto; margin-top: .55em; }
.status-dot { position: relative; display: inline-block; width: 7px; height: 7px; background: #7df0b0; border-radius: 50%; }
.status-dot::after { content: ""; position: absolute; inset: -5px; border: 1px solid #7df0b0; border-radius: 50%; animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

.clock-card { position: relative; padding: 26px; border: 1px solid rgba(248, 246, 240, .5); background: rgba(12, 24, 110, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.clock-card .mono { margin: 0; color: var(--block-muted); }
.clock-face { display: block; margin: 22px 0 10px; font-size: clamp(48px, 5vw, 84px); font-weight: 500; line-height: .9; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.clock-card p:last-child { margin: 0; font-family: var(--serif); font-size: 24px; font-style: italic; }
.clock-dial { position: absolute; top: 20px; right: 20px; width: 58px; height: 58px; border: 1px solid rgba(248, 246, 240, .6); border-radius: 50%; }
.clock-dial i { position: absolute; left: 50%; bottom: 50%; width: 1.5px; margin-left: -.75px; background: var(--block-ink); transform-origin: 50% 100%; transform: rotate(var(--deg, 0deg)); }
.clock-dial .hand-h { height: 15px; }
.clock-dial .hand-m { height: 22px; opacity: .8; }
.clock-dial .hand-s { height: 24px; background: var(--coral); width: 1px; }

/* ---------- Channels ---------- */
.channels { padding-block: clamp(90px, 9vw, 150px); }
.channels-head { display: grid; grid-template-columns: 28% minmax(0, 1fr); gap: 30px; }
.channels-head .eyebrow { margin-top: 14px; }
.channels-head h2, .composer-head h2 { margin: 0; font-size: clamp(54px, 6.4vw, 112px); font-weight: 500; line-height: .95; letter-spacing: -.075em; }
.channels-head h2 em, .composer-head h2 em { color: var(--accent); font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; }
.channel-list { margin: 70px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.channel { position: relative; display: grid; grid-template-columns: 60px minmax(0, .8fr) minmax(0, 1.3fr) auto; gap: 18px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); isolation: isolate; transition: color .35s ease, padding-left .5s var(--ease-out); }
.channel::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--block); clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease-out); }
.channel:hover, .channel:focus-within { color: var(--block-ink); padding-left: 16px; }
.channel:hover::before, .channel:focus-within::before { clip-path: inset(0 0 0 0); }
.channel-index { color: var(--muted); }
.channel:hover .channel-index, .channel:focus-within .channel-index { color: var(--block-muted); }
.channel-name { font-size: clamp(30px, 3.4vw, 58px); font-weight: 500; line-height: 1; letter-spacing: -.065em; }
.channel-value { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 36px); font-style: italic; line-height: 1.1; overflow-wrap: anywhere; }
.channel-actions { display: flex; gap: 10px; }
.channel-button { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid currentColor; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .3s ease, color .3s ease; }
.channel-button:hover, .channel-button:focus-visible { background: var(--block-ink); color: var(--block); }
.channel-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.copy-note { min-width: 5.5em; }
.channel-note { margin: 22px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Composer ---------- */
.composer { padding-block: clamp(90px, 9vw, 150px); background: var(--paper-deep); }
.composer-head { display: grid; grid-template-columns: 28% minmax(0, 1fr); gap: 30px; }
.composer-head .eyebrow { margin-top: 14px; }
.composer-head .intro-aside { max-width: 420px; margin: 30px 0 0 auto; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 90px); align-items: start; margin-top: 70px; }
.brief-form { display: grid; gap: 34px; }
.brief-form fieldset { margin: 0; padding: 0; border: 0; }
.brief-form legend, .field label { display: block; margin-bottom: 14px; color: var(--muted); }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chips input { position: absolute; opacity: 0; pointer-events: none; }
.topic-chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .3s ease, color .3s ease, transform .3s var(--ease-out); }
.topic-chips label:hover { transform: translateY(-2px); }
.topic-chips input:checked + label { background: var(--ink); color: var(--paper); }
.topic-chips input:focus-visible + label { outline: 2px solid transparent; box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px var(--focus); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 0;
  border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  background: transparent;
  font-size: 20px; letter-spacing: -.02em;
  transition: border-color .3s ease;
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 1.5px 0 var(--accent); }
.field-help { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.field-error { margin: 8px 0 0; color: #b3261e; font-size: 13px; font-weight: 600; }
.field-error:empty { display: none; }
.brief-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.submit-button { position: relative; display: inline-flex; align-items: center; gap: 30px; min-height: 60px; padding: 0 26px; border: 0; background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 600; cursor: pointer; overflow: hidden; isolation: isolate; }
.submit-button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--block); transform: translateY(101%); transition: transform .45s var(--ease-out); }
.submit-button:hover::before, .submit-button:focus-visible::before { transform: none; }
.submit-button span { font-size: 22px; font-weight: 400; transition: transform .45s var(--ease-out); }
.submit-button:hover span { transform: rotate(45deg); }
.privacy-note { max-width: 340px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.letter { position: sticky; top: 120px; padding: clamp(24px, 3vw, 40px); background: var(--paper-light); border: 1px solid var(--card-border); box-shadow: 0 40px 70px -40px var(--shadow); transform: rotate(1.2deg); transition: transform .6s var(--ease-out); }
.letter:hover { transform: rotate(0deg); }
.letter::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: rgba(229, 120, 93, .55); transform: rotate(-3deg); }
.letter-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.letter dl { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 12px; margin: 18px 0 0; font-size: 14px; }
.letter dt { color: var(--muted); }
.letter dd { margin: 0; overflow-wrap: anywhere; }
.letter-body { min-height: 190px; margin: 22px 0 0; padding-top: 20px; border-top: 1px dashed var(--line); font-family: var(--serif); font-size: 22px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.letter-body .placeholder { color: #a8a9a2; }
.letter-body::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.letter-sign { margin: 22px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Tips ---------- */
.tips { padding-block: clamp(90px, 9vw, 140px); }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 60px; border-top: 1px solid var(--ink); }
.tip { padding: 26px 26px 10px 0; }
.tip + .tip { padding-left: 26px; border-left: 1px solid var(--line); }
.tip .mono { color: var(--coral-ink); }
.tip h3 { margin: 22px 0 0; font-size: clamp(30px, 3vw, 48px); font-weight: 500; letter-spacing: -.065em; line-height: 1; }
.tip p { max-width: 330px; margin: 16px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

@media (max-width: 1050px) {
  .contact-hero-grid, .composer-grid { grid-template-columns: 1fr; }
  .clock-card { max-width: 440px; }
  .letter { position: relative; top: 0; transform: none; }
  .channel { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .channel-value { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 850px) {
  .channels-head, .composer-head { grid-template-columns: 1fr; gap: 24px; }
  .composer-head .intro-aside { margin-left: 0; }
  .tips-grid { grid-template-columns: 1fr; }
  .tip + .tip { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .contact-hero .hero-meta span:last-child { display: none; }
  .contact-title { font-size: clamp(60px, 16vw, 96px); }
  .channel { grid-template-columns: 32px minmax(0, 1fr); gap: 8px 12px; }
  .channel:hover, .channel:focus-within { padding-left: 0; }
  .channel-value { grid-column: 2; grid-row: auto; font-size: 20px; }
  .channel-actions { grid-column: 2; }
  .field-row { grid-template-columns: 1fr; }
  .channels-head h2, .composer-head h2 { font-size: clamp(46px, 11.5vw, 72px); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-hero::before, .status-dot::after, .letter-body::after { animation: none; }
  .letter { transform: none; }
}
