/* =============================================================
   VEEDAY CONSULTANTS — m-contact.css  (round 11: contact page on phones)
   Loaded after mobile.css. Everything here is inside the phone query; the phone-only
   markup (.mreach, .mweek, .mcopy, #mcMail) is hidden elsewhere by .m-only / .m-sheet
   in mobile.css. The new pieces only appear once js/mobile.js is running (html.m-phone),
   so without JS the phone keeps the plain layout from contact.css.
   ============================================================= */

@media (max-width: 700px), (hover: none) and (pointer: coarse) and (max-height: 500px) {

  html:not(.m-phone) .mreach,
  html:not(.m-phone) .mweek,
  html:not(.m-phone) .mcopy { display: none !important; }

  /* The quick actions take the place of the two hero buttons (the dock and the
     "Where to start" doors carry them), and the week strip replaces the clock strip. */
  html.m-phone .chero .phero__ctas { display: none; }
  html.m-phone .chero .cnow { display: none; }

  /* ═════════ QUICK ACTIONS CARD ═════════ */
  .mreach {
    position: relative; margin-top: 30px; max-width: 560px;
    border: 1px solid rgba(250, 250, 248, .15); border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, rgba(250, 250, 248, .06), rgba(250, 250, 248, .02) 60%);
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(250, 250, 248, .06);
    color: var(--paper);
  }
  .mreach svg, .mcopy svg, .mrow svg {
    flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  }

  .mreach__now { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 16px 15px; }
  .mreach__status { min-width: 0; }
  .mreach__chip {
    display: inline-flex; white-space: nowrap; align-items: center; gap: 9px; min-height: 30px; padding: 5px 13px 5px 11px;
    border: 1px solid rgba(250, 250, 248, .2); border-radius: 999px;
    font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--paper);
    transition: border-color .6s, background-color .6s;
  }
  .mreach__chip::before {
    content: ''; position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%;
    border: 1px solid rgba(250, 250, 248, .55); transition: background-color .6s, border-color .6s;
  }
  .mreach__chip[data-open="1"] { border-color: rgba(242, 180, 84, .42); background: rgba(242, 180, 84, .08); }
  .mreach__chip[data-open="1"]::before { background: #F2B454; border-color: #F2B454; box-shadow: 0 0 0 0 rgba(242, 180, 84, .45); animation: mc-beat 2.6s ease-out infinite; }
  @keyframes mc-beat {
    0% { box-shadow: 0 0 0 0 rgba(242, 180, 84, .45); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(242, 180, 84, 0); }
  }
  .mreach__next { display: block; margin-top: 9px; font-size: 13px; line-height: 1.45; color: rgba(250, 250, 248, .66); }
  .mreach__next:empty { display: none; }
  .mreach__clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
  .mreach__clock span { font-size: 13px; line-height: 1.2; color: rgba(250, 250, 248, .6); }
  .mreach__clock b {
    font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.1; letter-spacing: -.01em;
    font-variant-numeric: lining-nums tabular-nums; white-space: nowrap;
  }

  .mreach__grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(250, 250, 248, .12); }
  .mact {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    min-width: 0; min-height: 112px; padding: 15px 14px 15px;
    color: var(--paper); text-align: left;
    transition: background-color .25s;
  }
  .mact:nth-child(odd) { border-right: 1px solid rgba(250, 250, 248, .12); }
  .mact:nth-child(-n+2) { border-bottom: 1px solid rgba(250, 250, 248, .12); }
  .mact svg { width: 22px; height: 22px; margin-bottom: auto; }
  .mact b { margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.15; letter-spacing: -.01em; }
  .mact span { margin-top: 4px; font-size: 13px; line-height: 1.35; color: rgba(250, 250, 248, .62); overflow-wrap: anywhere; }
  /* the arrow cue in the corner */
  .mact::after {
    content: ''; position: absolute; top: 19px; right: 16px; width: 7px; height: 7px;
    border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; opacity: .38;
  }
  .mact--call { background: var(--red); border-right-color: transparent; border-bottom-color: transparent; }
  .mact--call span { color: rgba(250, 250, 248, .84); }
  .mact--call::after { opacity: .7; }
  .mact:active { background: rgba(250, 250, 248, .07); }
  .mact--call:active { background: var(--red-deep); }
  .mact.is-done::after { width: 10px; height: 5px; top: 19px; border-top: 0; border-left: 1.5px solid #F2B454; border-bottom: 1.5px solid #F2B454; border-right: 0; opacity: 1; transform: rotate(-45deg); }
  .mact:not(.is-done)::after { transform: rotate(45deg); }
  .mact[data-mc-copy]:not(.is-done)::after { display: none; }

  .mreach__save {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px;
    border-top: 1px solid rgba(250, 250, 248, .12);
    color: var(--paper); text-align: left; transition: background-color .25s;
  }
  .mreach__save svg { width: 24px; height: 24px; opacity: .9; }
  .mreach__save > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .mreach__save b { font-size: 15px; font-weight: 500; line-height: 1.3; }
  .mreach__save small { font-size: 13px; line-height: 1.35; color: rgba(250, 250, 248, .6); }
  .mreach__save > i {
    flex: none; width: 8px; height: 8px; margin-right: 4px;
    border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .4;
  }
  .mreach__save:active { background: rgba(250, 250, 248, .06); }

  /* ═════════ WEEK STRIP (hero foot) ═════════ */
  .mweek { padding: 20px 0 30px; border-top: 1px solid var(--line); max-width: 560px; }
  .mweek__head {
    display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
    font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
  }
  .mweek__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 -4px; padding: 0; list-style: none; }
  .mweek__days li {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px;
    padding: 10px 0 11px; border-radius: 12px;
    transition: background-color .4s;
  }
  .mweek__days b { font-size: 13px; font-weight: 500; line-height: 1; color: rgba(250, 250, 248, .6); }
  .mweek__days li > span { font-size: 13px; line-height: 1; color: var(--paper); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
  .mweek__days li.is-off > span { color: rgba(250, 250, 248, .4); }
  .mweek__bar { position: relative; display: block; width: 6px; height: 54px; border-radius: 3px; background: rgba(250, 250, 248, .09); }
  .mweek__bar::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--h, 0) * 100%);
    border-radius: 3px; background: rgba(250, 250, 248, .42);
  }
  .mweek__days li.is-today { background: rgba(250, 250, 248, .07); }
  .mweek__days li.is-today b { color: #F0554E; font-weight: 600; }
  .mweek__days li.is-today .mweek__bar::before { background: #E0453E; }
  /* where "now" falls on today's bar (9 AM at the top, 6 PM at the bottom) */
  .mweek__now {
    position: absolute; left: 50%; top: calc(var(--t) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
    border-radius: 50%; background: #F2B454; box-shadow: 0 0 0 3px rgba(18, 16, 15, .9);
  }
  .mweek__vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mweek__text { margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--mute); }

  /* ═════════ LICENCE: copy button under the plate ═════════ */
  .mcopy {
    align-items: center; gap: 10px; min-height: 46px; margin-top: 22px; padding: 10px 18px 10px 14px;
    border: 1px solid rgba(250, 250, 248, .24); border-radius: 999px;
    font-size: 14px; font-weight: 500; color: var(--paper);
    transition: background-color .25s, border-color .25s;
  }
  .mcopy svg { width: 18px; height: 18px; }
  .mcopy:active { background: rgba(250, 250, 248, .08); }
  .mcopy.is-done { border-color: rgba(242, 180, 84, .55); }

  /* ═════════ EMAIL SHEET ═════════ */
  .mmail__addr { margin-top: 10px; font-family: var(--serif); font-size: 26px; line-height: 1.15; letter-spacing: -.012em; overflow-wrap: anywhere; }
  .mmail__note { margin-top: 6px; font-size: 14px; line-height: 1.5; color: rgba(17, 17, 17, .62); }
  .mmail__rows { margin-top: 14px; border-top: 1px solid rgba(17, 17, 17, .1); }
  .mrow {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 2px;
    border-bottom: 1px solid rgba(17, 17, 17, .1);
    font-size: 16px; font-weight: 500; color: var(--ink); text-align: left;
  }
  .mrow svg { width: 22px; height: 22px; color: var(--red); }
  .mrow span { flex: 1; }
  .mrow > i { flex: none; width: 8px; height: 8px; margin-right: 4px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .35; }
  .mrow:active { background: rgba(17, 17, 17, .04); }

  /* ═════════ SOCIAL: a 2 × 2 grid of tiles on narrow phones ═════════ */
  @media (max-width: 560px) {
    .csocial__links { grid-template-columns: 1fr 1fr; border-bottom: 0; }
    .csocial__link, .csocial__link:first-child {
      flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 30px;
      min-height: 118px; padding: 18px 16px 16px; border-left: 0; border-top: 0;
      border-bottom: 1px solid var(--line);
    }
    .csocial__link + .csocial__link { border-top: 0; border-left: 0; }
    .csocial__link:nth-child(odd) { padding-left: 2px; border-right: 1px solid var(--line); }
    .csocial__link span { flex: none; width: 100%; }
    .csocial__link b { font-size: 21px; }
    .csocial__link:active { background: rgba(17, 17, 17, .035); }
  }

  /* ═════════ PHONES HELD SIDEWAYS ═════════ */
  @media (max-height: 500px) {
    .mreach { max-width: none; margin-top: 22px; }
    .mreach__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mact { min-height: 96px; border-bottom: 0 !important; }
    .mact:nth-child(odd) { border-right: 0; }
    .mact + .mact { border-left: 1px solid rgba(250, 250, 248, .12); }
    .mact--call + .mact { border-left-color: transparent; }
  }

  @media (prefers-reduced-motion: reduce) {
    .mreach__chip[data-open="1"]::before { animation: none; }
    .mreach__chip, .mreach__chip::before, .mact, .mreach__save, .mweek__days li, .mcopy { transition: none; }
  }
}
