/* =========================================================================
   Core theme — Contact.

   Hero band, a two-column body that becomes one column on a phone, and a trust
   bar. Everything is drawn from the store's own --core-* tokens, so a merchant
   changing their palette changes this page with it. The channel icons are the
   one place with fixed hues, because a phone/WhatsApp/mail set reads as those
   services; they are tinted, never solid, so they still sit in the palette.
   ========================================================================= */

.storly-cf {
  padding-block: 0 var(--cf-pad-bottom, var(--core-rhythm, 64px));
  background: var(--cf-bg, var(--core-background));
  color: var(--core-text);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.storly-cf__hero {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: clamp(180px, 22vw, 280px);
  margin-block-end: clamp(26px, 4vw, 48px);
  padding: clamp(28px, 5vw, 56px) var(--core-gutter, 20px);
  background: color-mix(in srgb, var(--core-primary) 10%, var(--core-surface));
  text-align: center;
}
.storly-cf__hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.storly-cf__hero.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12, 14, 17, .42), rgba(12, 14, 17, .58));
}
.storly-cf__hero.has-image .storly-cf__hero-text,
.storly-cf__hero.has-image .storly-cf__hero-text :is(h1, h2),
.storly-cf__hero.has-image .storly-cf__hero-text p { color: #fff; }
.storly-cf__hero.has-image .storly-cf__hero-text p { opacity: .9; }
.storly-cf__hero-text { position: relative; z-index: 1; max-width: 60ch; }
.storly-cf__hero-text :is(h1, h2) {
  margin: 0;
  font-family: var(--core-font-heading);
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.025em;
}
.storly-cf__hero-text p { margin: 12px 0 0; font-size: 1rem; line-height: 1.6; opacity: .82; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.storly-cf__inner {
  width: min(100% - 2 * var(--core-gutter, 20px), var(--core-track-default, 1360px));
  margin-inline: auto;
  display: grid;
  gap: clamp(20px, 3vw, 30px);
}
.storly-cf__grid { display: grid; gap: clamp(18px, 2.4vw, 26px); align-items: start; }
@media (min-width: 1000px) {
  .storly-cf__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .storly-cf__grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 44rem; margin-inline: auto; }
}
.storly-cf__aside { display: grid; gap: clamp(14px, 1.8vw, 18px); align-content: start; min-width: 0; }

.storly-cf__card {
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--core-border-color);
  border-radius: var(--core-card-radius, 10px);
  background: var(--core-surface);
  min-width: 0;
}

.storly-cf__head { display: grid; gap: 8px; margin-block-end: clamp(18px, 2.4vw, 24px); }
.storly-cf__head--sm { margin-block-end: clamp(14px, 1.8vw, 18px); }
.storly-cf__eyebrow { margin: 0; color: var(--core-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.storly-cf__title { margin: 0; font-family: var(--core-font-heading); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; letter-spacing: -.02em; }
.storly-cf__subtitle { margin: 0; font-family: var(--core-font-heading); font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; }
.storly-cf__lead { margin: 0; color: var(--core-muted); font-size: .9375rem; line-height: 1.55; }

/* ── Form ────────────────────────────────────────────────────────────────── */
.storly-cf__form { display: grid; gap: clamp(14px, 1.8vw, 18px); }
.storly-cf__row { display: grid; gap: clamp(14px, 1.8vw, 18px); }
@media (min-width: 620px) { .storly-cf__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.storly-cf__row:has(> .storly-cf__field:only-child) { grid-template-columns: minmax(0, 1fr); }

.storly-cf__field { display: grid; gap: 6px; min-width: 0; }
.storly-cf__field label { font-size: .8125rem; font-weight: 600; color: color-mix(in srgb, var(--core-text) 76%, transparent); }
.storly-cf__field label span { color: var(--core-danger); }
.storly-cf__field :is(input, select, textarea) {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--core-input-border-color, var(--core-border-color));
  border-radius: var(--core-input-radius, 8px);
  background: var(--core-input-bg, var(--core-surface));
  color: var(--core-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color .18s ease;
}
.storly-cf__field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.storly-cf__field :is(input, select, textarea):hover { border-color: color-mix(in srgb, var(--core-text) 32%, transparent); }
.storly-cf__field :is(input, select, textarea):focus-visible { outline: 2px solid var(--core-primary); outline-offset: 1px; }
.storly-cf__field :is(input, select, textarea)[data-cf-invalid] { border-color: var(--core-danger); }
.storly-cf__field select { appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .storly-cf__field select { background-position: 15px 55%, 20px 55%; background-image: linear-gradient(135deg, transparent 50%, currentColor 50%), linear-gradient(45deg, currentColor 50%, transparent 50%); }

/* Attachment */
.storly-cf__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: clamp(14px, 1.8vw, 18px);
  border: 1px dashed color-mix(in srgb, var(--core-text) 26%, transparent);
  border-radius: var(--core-card-radius, 10px);
}
.storly-cf__upload-icon { display: grid; width: 40px; height: 40px; flex: none; border-radius: calc(var(--core-card-radius, 10px) * .8); background: color-mix(in srgb, var(--core-text) 6%, transparent); place-items: center; }
.storly-cf__upload-icon svg { width: 20px; height: 20px; opacity: .7; }
.storly-cf__upload-text { display: grid; gap: 2px; flex: 1 1 12rem; min-width: 0; }
.storly-cf__upload-text strong { font-size: .875rem; font-weight: 600; }
.storly-cf__upload-text span { color: var(--core-muted); font-size: .75rem; overflow-wrap: anywhere; }
.storly-cf__upload-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--core-border-color);
  border-radius: calc(var(--core-card-radius, 10px) * .8);
  font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.storly-cf__upload-btn:hover { border-color: color-mix(in srgb, var(--core-text) 34%, transparent); }
/* Visually hidden, still reachable: the label above is the control. */
.storly-cf__upload-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.storly-cf__upload-input:focus-visible + .storly-cf__upload-clear,
.storly-cf__upload-btn:focus-within { outline: 2px solid var(--core-primary); outline-offset: 2px; }
.storly-cf__upload-clear { padding: 0; border: 0; background: none; color: var(--core-danger); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }

.storly-cf__btn {
  min-height: 52px;
  padding: 14px 26px;
  border: 1px solid var(--core-button-bg);
  border-radius: var(--core-button-radius, 8px);
  background: var(--core-button-bg);
  color: var(--core-button-text);
  font: inherit; font-size: .875rem; font-weight: 600; letter-spacing: .06em;
  cursor: pointer;
  transition: background-color .18s ease;
}
.storly-cf__btn:hover { background: var(--core-button-hover-bg); }
.storly-cf__btn[disabled] { opacity: .7; cursor: progress; }

.storly-cf__note { margin: 0; color: var(--core-muted); font-size: .8125rem; text-align: center; }
.storly-cf__status { margin: 0; font-size: .9375rem; font-weight: 600; }
.storly-cf__status:empty { display: none; }
.storly-cf__status[data-tone="ok"] { color: var(--core-success); }
.storly-cf__status[data-tone="error"] { color: var(--core-danger); }

/* ── Channels ────────────────────────────────────────────────────────────── */
.storly-cf__channels { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) and (max-width: 999px) { .storly-cf__channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.storly-cf__channel {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--core-border-color);
  border-radius: calc(var(--core-card-radius, 10px) * .9);
  color: inherit; text-decoration: none;
  transition: border-color .18s ease;
}
a.storly-cf__channel:hover { border-color: color-mix(in srgb, var(--core-text) 30%, transparent); }
.storly-cf__channel-icon { display: grid; width: 42px; height: 42px; flex: none; border-radius: calc(var(--core-card-radius, 10px) * .8); place-items: center; }
.storly-cf__channel-icon svg { width: 20px; height: 20px; }
/* Tinted, never solid: they stay inside the merchant's palette. */
.storly-cf__channel-icon[data-tone="blue"]   { background: color-mix(in srgb, #2563eb 14%, transparent); color: #2563eb; }
.storly-cf__channel-icon[data-tone="green"]  { background: color-mix(in srgb, #16a34a 14%, transparent); color: #16a34a; }
.storly-cf__channel-icon[data-tone="red"]    { background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; }
.storly-cf__channel-icon[data-tone="violet"] { background: color-mix(in srgb, #7c3aed 13%, transparent); color: #7c3aed; }
.storly-cf__channel-icon[data-tone="plain"]  { background: color-mix(in srgb, var(--core-text) 7%, transparent); color: var(--core-text); }
.storly-cf__channel-text { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.storly-cf__channel-text strong { font-size: .875rem; font-weight: 600; }
.storly-cf__channel-text span { color: var(--core-muted); font-size: .8125rem; overflow-wrap: anywhere; }
.storly-cf__channel-go { flex: none; color: var(--core-muted); }
.storly-cf__channel-go svg { width: 15px; height: 15px; display: block; }
[dir="rtl"] .storly-cf__channel-go svg { transform: scaleX(-1); }

/* ── Shortcut cards ──────────────────────────────────────────────────────── */
.storly-cf__promo { display: grid; gap: 8px; position: relative; }
.storly-cf__promo[data-tone="amber"] { background: color-mix(in srgb, #d97706 8%, var(--core-surface)); }
.storly-cf__promo[data-tone="sky"]   { background: color-mix(in srgb, #0284c7 8%, var(--core-surface)); }
.storly-cf__promo-icon { display: grid; width: 44px; height: 44px; border-radius: 50%; background: var(--core-surface); place-items: center; margin-block-end: 4px; }
.storly-cf__promo-icon svg { width: 22px; height: 22px; opacity: .8; }
.storly-cf__ghost {
  display: inline-flex; align-items: center; gap: 8px;
  justify-self: start;
  margin-block-start: 6px;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--core-text) 22%, transparent);
  border-radius: 999px;
  background: var(--core-surface);
  color: var(--core-text);
  font-size: .8125rem; font-weight: 600; text-decoration: none;
  transition: border-color .18s ease;
}
.storly-cf__ghost:hover { border-color: color-mix(in srgb, var(--core-text) 44%, transparent); }
.storly-cf__ghost svg { width: 14px; height: 14px; }
[dir="rtl"] .storly-cf__ghost svg { transform: scaleX(-1); }

.storly-cf__address { display: flex; align-items: center; gap: 12px; }

/* ── Trust bar ───────────────────────────────────────────────────────────── */
.storly-cf__trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin: clamp(8px, 1.4vw, 14px) 0 0;
  padding: clamp(22px, 3vw, 32px) clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--core-border-color);
  border-radius: var(--core-card-radius, 10px);
  background: var(--core-surface);
  list-style: none;
}
.storly-cf__trust li { display: flex; align-items: center; gap: 14px; min-width: 0; }
.storly-cf__trust-icon { display: grid; width: 38px; height: 38px; flex: none; color: color-mix(in srgb, var(--accent, var(--core-primary)) 70%, var(--core-text)); place-items: center; }
.storly-cf__trust-icon svg { width: 25px; height: 25px; }
.storly-cf__trust-text { display: grid; gap: 2px; min-width: 0; }
.storly-cf__trust-text strong { font-size: .9375rem; font-weight: 600; }
.storly-cf__trust-text span { color: var(--core-muted); font-size: .8125rem; }
