/* Tiewrap QR code generator (Oct 2026).
   Night-navy band under the site's white header; the live code sits in a "scanner" frame whose
   corner brackets echo the three finder squares of a QR code. One orange signal colour for actions. */
.twq-page {
  --q-night: #0f1730;
  --q-field: #17223f;
  --q-line: #2b3963;
  --q-signal: #ff8a1f;
  --q-signal-hi: #ffa24f;
  --q-text: #eef2ff;
  --q-muted: #9ba6c9;
  --q-display: 'Chakra Petch', 'Hind', sans-serif;
  background: var(--q-night);
}
html[dir="rtl"] .twq-page { --q-display: 'Reem Kufi', 'Cairo', sans-serif; }

/* ---------- band ---------- */
.twq { position: relative; color: var(--q-text); overflow: hidden; }
.twq::before {           /* faint grid of modules, fading out towards the bottom */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(238, 242, 255, .09) 1.1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
}
.twq-wrap {
  position: relative; display: grid; column-gap: 64px; padding-top: 72px; padding-bottom: 96px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "intro out" "what out" "look out";
  align-items: start;
}
.twq-wrap::before, .twq-wrap::after { display: none; }   /* Bootstrap clearfix would become grid items */
.twq-form { display: contents; }
.twq-intro { grid-area: intro; margin-bottom: 44px; }
.twq-form > .twq-group:first-child { grid-area: what; }
.twq-form > .twq-group:last-child { grid-area: look; }
.twq-out { grid-area: out; position: sticky; top: 118px; }

/* ---------- type ---------- */
.twq-page .twq .twq-title {
  font-family: var(--q-display) !important; font-weight: 600; color: #fff;
  font-size: clamp(36px, 4.3vw, 58px); line-height: 1.06; letter-spacing: -.01em; margin: 0 0 18px;
}
html[dir="rtl"] .twq-page .twq .twq-title { line-height: 1.3; letter-spacing: 0; }
html[dir="rtl"] .twq-page .twq .twq-title, html[dir="rtl"] .twq-page .twq .twq-h { word-spacing: .2em; }
html[dir="rtl"] .twq-btn { word-spacing: .08em; }   /* Reem Kufi's own space is very narrow */
.twq-lead { font-size: 18px; line-height: 1.6; color: var(--q-muted); max-width: 34em; margin: 0; }
.twq-page .twq .twq-h {
  font-family: var(--q-display) !important; font-weight: 600; font-size: 19px; color: var(--q-text);
  margin: 0 0 16px; padding: 0; border: 0; width: auto; float: none; line-height: 1.3;
}
.twq [hidden] { display: none !important; }
.twq-group { border: 0; margin: 0 0 40px; padding: 0; min-width: 0; }
.twq p, .twq span, .twq label, .twq li { color: inherit; }
.twq-help { font-size: 14px; line-height: 1.5; color: var(--q-muted) !important; margin: 10px 0 0; }

/* ---------- what the code opens ---------- */
.twq-types { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.twq-type {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 76px; padding: 10px 4px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--q-line); border-radius: 8px; text-align: center;
  color: var(--q-muted); font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.twq-type .fa { font-size: 19px; width: auto; text-align: center; }
.twq-type:hover { color: var(--q-text); border-color: #3b4c80; }
.twq-type[aria-selected="true"] { color: #fff; border-color: var(--q-signal); background: rgba(255, 138, 31, .12); }
.twq-type[aria-selected="true"] .fa { color: var(--q-signal); }
.twq-type span { color: inherit !important; }

.twq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.twq-field { display: block; margin: 0 0 16px; font-weight: 400; }
.twq-field > span, .twq-opt-label { display: block; font-size: 14px; font-weight: 500; color: var(--q-muted) !important; margin-bottom: 7px; }
.twq input[type="text"], .twq input[type="url"], .twq input[type="tel"], .twq input[type="email"], .twq textarea, .twq select {
  display: block; width: 100%; height: 48px; padding: 0 14px; font-size: 16px; line-height: 1.4;
  color: var(--q-text); background: var(--q-field); border: 1px solid var(--q-line); border-radius: 6px;
  box-shadow: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.twq textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.twq select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ba6c9' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
html[dir="rtl"] .twq select { padding-right: 14px; padding-left: 40px; background-position: left 15px center; }
.twq select option { background: var(--q-field); color: var(--q-text); }
.twq input::placeholder, .twq textarea::placeholder { color: #66729a; opacity: 1; }
.twq input:focus, .twq textarea:focus, .twq select:focus { outline: none; border-color: var(--q-signal); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
.twq-check { display: flex; align-items: center; gap: 10px; height: 48px; margin: 0 0 16px; font-weight: 400; font-size: 15px; cursor: pointer; }
.twq-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--q-signal); }

/* ---------- look ---------- */
.twq-look { display: grid; gap: 20px; }
.twq-opt { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; }
.twq-opt .twq-opt-label { margin: 0; }
.twq-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.twq-swatch {
  position: relative; width: 36px; height: 36px; margin: 0; border-radius: 8px; cursor: pointer;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.twq-swatch input[type="radio"] { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.twq-swatch:has(input:checked) { outline: 2px solid var(--q-signal); outline-offset: 3px; }
.twq-swatch:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 3px; }
.twq-swatch-custom { background: conic-gradient(#ff5f6d, #ffc371, #7cf29b, #47c3ff, #8f6bff, #ff5f6d); }
.twq-swatch-custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

.twq-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.twq-seg label { position: relative; margin: 0; font-weight: 400; cursor: pointer; }
.twq-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.twq-seg span {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font-size: 15px;
  border: 1px solid var(--q-line); border-radius: 6px; color: var(--q-muted) !important; transition: border-color .15s, color .15s, background .15s;
}
.twq-seg label:hover span { color: var(--q-text) !important; }
.twq-seg input:checked + span { color: #fff !important; border-color: var(--q-signal); background: rgba(255, 138, 31, .12); }
.twq-seg input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.twq-ico { display: inline-block; width: 12px; height: 12px; background: currentColor; }
.twq-ico-rd { border-radius: 4px; }
.twq-ico-dt { border-radius: 50%; }
.twq-seg input:checked + span .twq-ico { background: var(--q-signal); }

.twq-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.twq-logo .twq-help { margin: 0; }

/* ---------- buttons ---------- */
.twq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 22px; margin: 0;
  border-radius: 6px; border: 1px solid transparent; font-family: var(--q-display); font-weight: 600; font-size: 16px;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.twq-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.twq-btn-main { background: var(--q-signal); color: var(--q-night) !important; }
.twq-btn-main:hover, .twq-btn-main:focus { background: var(--q-signal-hi); color: var(--q-night) !important; text-decoration: none; }
.twq-btn-line { background: transparent; border-color: #4a5a8c; color: var(--q-text) !important; }
.twq-btn-line:hover { border-color: var(--q-text); }
.twq-btn-ghost { height: 40px; padding: 0 14px; font-family: inherit; font-weight: 500; font-size: 15px; background: transparent; border: 1px dashed #4a5a8c; color: var(--q-text) !important; }
.twq-btn-ghost:hover { border-color: var(--q-signal); }
.twq-btn-ghost span, .twq-btn span { color: inherit !important; }
.twq-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- the scanner (the one bold element) ---------- */
.twq-scanner {
  position: relative; padding: 26px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
}
.twq-corner { position: absolute; width: 38px; height: 38px; border: 3px solid var(--q-signal); pointer-events: none; }
.twq-c1 { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.twq-c2 { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.twq-c3 { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.twq-c4 { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.twq-paper { background: #fff; border-radius: 4px; transition: opacity .25s, filter .25s; }
.twq-paper.is-clear { background-color: #fff; background-image: conic-gradient(#e7eaf2 25%, #fff 0 50%, #e7eaf2 0 75%, #fff 0); background-size: 18px 18px; }
.twq-code svg, .twq-code canvas { display: block; width: 100% !important; height: auto !important; }
.twq-beam {
  position: absolute; left: 26px; right: 26px; top: 26px; height: 2px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--q-signal) 18%, #ffd2a8 50%, var(--q-signal) 82%, transparent);
  box-shadow: 0 0 18px 3px rgba(255, 138, 31, .55);
}
.twq-scanner.is-scan .twq-beam { animation: twq-scan 1.05s cubic-bezier(.45, 0, .25, 1) 1; }
@keyframes twq-scan {
  0% { top: 26px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 28px); opacity: 0; }
}
.twq-empty {
  position: absolute; left: 26px; right: 26px; top: 50%; transform: translateY(-50%); margin: 0; padding: 14px 18px; text-align: center;
  font-size: 16px; font-weight: 500; color: #fff !important; background: rgba(15, 23, 48, .88); border: 1px solid var(--q-line); border-radius: 6px; display: none;
}
.twq-scanner.is-empty .twq-paper { opacity: .14; filter: grayscale(1); }
.twq-scanner.is-empty .twq-empty { display: block; }
.twq-warn { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: #ffc08a !important; }
.twq-warn::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #ffc08a; color: var(--q-night); font-weight: 700; font-size: 13px; line-height: 20px; text-align: center; }
.twq-warn[hidden] { display: none; }
.twq-size { margin-top: 22px; }
.twq-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.twq-actions .twq-btn-main { flex: 1 1 180px; }
.twq-out .twq-help { margin-top: 12px; }

/* ---------- call to action ---------- */
.twq-cta { background: #141f3d; border-top: 1px solid var(--q-line); }
.twq-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; padding-top: 40px; padding-bottom: 40px; }
.twq-cta-in::before, .twq-cta-in::after { display: none; }
.twq-cta p { margin: 0; max-width: 40em; font-size: 19px; line-height: 1.5; color: var(--q-text) !important; }
.twq-cta .twq-btn { flex: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 991px) {
  .twq-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "what" "out" "look"; padding-top: 44px; padding-bottom: 64px; }
  .twq-out { position: static; margin-bottom: 44px; max-width: 460px; width: 100%; justify-self: center; }
  .twq-intro { margin-bottom: 32px; }
}
@media (max-width: 600px) {
  .twq-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .twq-opt { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .twq-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .twq-type { min-height: 68px; font-size: 13px; }
  .twq-scanner { padding: 20px; }
  .twq-beam { left: 20px; right: 20px; }
  .twq-cta-in { flex-direction: column; align-items: flex-start; }
  .twq-lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .twq-scanner.is-scan .twq-beam { animation: none; }
  .twq-paper, .twq-type, .twq-seg span, .twq-btn { transition: none; }
}
