/* ============================================================
   Home Trades Online — Parent Brand Home Page (#355)
   Standalone design-system tokens + section styles.
   Pattern mirrors deckcountry.css — self-contained :root.
   ============================================================ */

html, body { overflow-x: clip; }

:root {
  --bg:        #FBF9F4;
  --bg-raised: #FFFFFF;
  --bg-tint:   #F4EFE5;
  --bg-tint-2: #ECE4D2;
  --ink-1:     #1A1A1A;
  --ink-2:     #3F3D38;
  --ink-3:     #6E6A5F;
  --ink-4:     #706A5F;  /* AA on light incl. --bg-tint — was #9E9889 (2.7:1), #430 */
  --line-1:    #E7E1D2;
  --line-2:    #D4CCB7;
  --brand:       #E76F51;
  --brand-hover: #D85A3D;
  --brand-tint:  #FBE4DC;
  --brand-ink:   #6F2B1A;
  /* Accessible terracotta for TEXT + button fills (WCAG 1.4.3 AA, #430).
     #B5421F = 5.58:1 on white, 4.58:1 on --brand-tint. --brand stays the
     bright decorative shade (e.g. the pulsing status dot). */
  --brand-strong:       #B5421F;
  --brand-strong-hover: #963A1C;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  color: var(--ink-1); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; }

.hto-wrap { max-width: 1180px; margin: 0 auto; padding: 0 36px; }

/* ---- Top bar ---- */
.hto-topbar {
  border-bottom: 1px solid var(--line-1);
  background: rgba(251, 249, 244, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.hto-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  /* vertical only — keep .hto-wrap's horizontal padding (#430: a `0` shorthand
     here was zeroing it, gluing the logo/CTA to the screen edges on mobile). */
  padding-top: 18px; padding-bottom: 18px;
}
.hto-brand { display: flex; align-items: center; gap: 14px; }
/* Interactive treatment is scoped to `a.hto-brand` on purpose (#584): this
   stylesheet is also loaded by the four /hto/ legal pages, where the lockup is
   still a plain <div>. On the bare class, the pointer cursor + hover fade would
   read as clickable there without navigating anywhere, and the 48px min-height
   would grow their sticky top bar for no reason. */
a.hto-brand {
  cursor: pointer; text-decoration: none;
  min-height: 48px; border-radius: 6px; outline-offset: 4px;
  transition: opacity 150ms ease;
}
a.hto-brand:hover { opacity: 0.75; }
a.hto-brand:focus-visible { outline: 2px solid var(--brand-strong); }
.hto-brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--ink-1); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 500; font-size: 18px;
  letter-spacing: -0.04em; font-style: italic;
}
.hto-brand-name {
  font-family: var(--display); font-weight: 500;
  font-size: 21px; letter-spacing: -0.02em; color: var(--ink-1);
}
.hto-brand-name b { color: var(--brand-strong); font-weight: 500; font-style: italic; }
.hto-contact-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 14px;
  background: var(--ink-1); color: var(--bg);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  transition: background 150ms ease;
}
.hto-contact-cta:hover { background: var(--brand-strong); }
.hto-contact-cta svg { transition: transform 150ms ease; }
.hto-contact-cta:hover svg { transform: translateX(2px); }

/* ---- Hero ---- */
.hto-hero { padding: 40px 0 40px; }
.hto-hero-wrap { max-width: 1600px; margin: 0 auto; padding: 0 36px; }
.hto-hero-title {
  font-family: var(--display); font-weight: 500;
  font-size: 48px;
  line-height: 0.97; letter-spacing: -0.035em;
  margin: 0 0 36px; max-width: 1600px;
  color: var(--ink-1); text-wrap: balance;
}
.hto-hero-title em { font-style: italic; color: var(--brand-strong); font-weight: 400; }
.hto-hero-lede {
  font-size: 22px; line-height: 1.5;
  color: var(--ink-2); max-width: 680px; margin: 0;
}

/* ---- Rule separator ---- */
.rule {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--line-1); }

/* ---- First Focus: DeckCountry ---- */
.focus { padding: 80px 0 110px; }
.focus-head {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 56px; align-items: end;
  margin-bottom: 56px;
}
.focus-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand-strong);
  margin-bottom: 18px;
}
.focus-label::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.focus-head h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.02; letter-spacing: -0.025em;
  margin: 0; text-wrap: balance; color: var(--ink-2);
}
.focus-head h2 em { font-style: italic; color: var(--brand-strong); font-weight: 400; }
.focus-head p {
  font-size: 17px; line-height: 1.55; color: var(--ink-2);
  margin: 0; max-width: 520px;
}

/* DeckCountry card */
.dc-card {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line-1);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(26, 26, 26, 0.22);
}
/* "Coming Soon" corner ribbon (#585) — diagonal, top-right corner, above the
   card content, and never a click target (pointer-events:none). The card's
   overflow:hidden + border-radius clip it into a corner banner. */
.dc-ribbon {
  position: absolute; z-index: 3; pointer-events: none;
  top: 28px; right: -54px;
  width: 200px; padding: 7px 0;
  transform: rotate(45deg);
  background: var(--brand-strong); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  box-shadow: 0 8px 18px -8px rgba(26, 26, 26, 0.35);
}
.dc-card-body {
  padding: 48px 52px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 36px; min-height: 460px;
}
.dc-top { display: flex; flex-direction: column; gap: 22px; }
.dc-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.06em;
}
.dc-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
}
.dc-meta .num { font-family: var(--mono); color: var(--ink-3); }
.dc-name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.0; letter-spacing: -0.03em; color: var(--ink-1);
}
.dc-name b { color: var(--brand-strong); font-weight: 500; }
.dc-desc {
  font-size: 18px; line-height: 1.5; color: var(--ink-2);
  max-width: 460px; margin: 0;
}
.dc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dc-tag {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  background: var(--bg-tint); color: var(--ink-2);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: -0.005em;
}
.dc-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
/* Non-clickable status chip replacing the old CTA (#585): muted brand tint,
   brand-colored text, default cursor — it is not a link and nothing lifts on
   hover, so the box no longer reads as clickable. */
.dc-status-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 22px;
  background: var(--brand-tint); color: var(--brand-strong);
  border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  cursor: default;
}
.dc-status-chip .dc-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-strong);
}
.dc-card-body .dc-url {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--ink-3); letter-spacing: 0.01em;
}
.dc-card-body .dc-url b { color: var(--ink-1); font-weight: 600; }

/* DeckCountry visual side */
.dc-card-visual {
  position: relative;
  background: var(--bg-tint-2); overflow: hidden;
  min-height: 460px; border-left: 1px solid var(--line-1);
  padding: 40px 36px;
  display: flex; align-items: center; justify-content: center;
}
.dc-card-visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(231,111,81,0.10), transparent 55%),
    radial-gradient(80% 60% at 10% 100%, rgba(26,26,26,0.06), transparent 60%);
  pointer-events: none;
}
.dc-browser {
  position: relative; width: 100%; max-width: 520px;
  border-radius: 12px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line-1);
  box-shadow: 0 28px 56px -22px rgba(26, 26, 26, 0.35);
}
.dc-browser-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  background: var(--bg-tint); border-bottom: 1px solid var(--line-1);
}
.dc-dots { display: flex; gap: 5px; }
.dc-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dc-browser-chrome .dc-url {
  flex: 1; background: var(--bg-raised);
  border-radius: 5px; padding: 4px 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.01em; text-align: left;
}
.dc-browser-chrome .dc-url b { color: var(--ink-1); font-weight: 600; }
.dc-card-visual .photo { display: block; width: 100%; height: auto; }
.dc-card-visual .v-pill {
  position: absolute; left: 24px; bottom: 24px; z-index: 2;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  background: var(--bg-raised); border: 1px solid var(--line-1);
  padding: 7px 12px; border-radius: 6px; letter-spacing: 0.04em;
  box-shadow: 0 6px 16px -8px rgba(26,26,26,0.18);
}

/* ---- What's Next ---- */
.hto-next {
  background: var(--bg-tint);
  padding: 88px 0 96px;
  border-top: 1px solid var(--line-1);
}
.hto-next-grid {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 56px; align-items: start;
}
.hto-next-title {
  font-family: var(--display); font-weight: 500;
  font-size: 32px; line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 16px; text-wrap: balance; color: var(--ink-2);
}
.hto-next-title em { font-style: italic; color: var(--brand-strong); font-weight: 400; }
.hto-next-copy {
  font-size: 16px; line-height: 1.6;
  color: var(--ink-2); margin: 0;
}
.hto-trades-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
.hto-trades-list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line-1);
  font-size: 15.5px; color: var(--ink-2);
}
.hto-trade-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-4); letter-spacing: 0.06em;
  min-width: 28px;
}
.hto-trade-status {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: auto;
}

/* ---- Footer ---- */
.hto-foot {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line-1); background: var(--bg);
}
.hto-foot-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.hto-foot-l { font-size: 13px; color: var(--ink-3); }
.hto-foot-r { display: flex; gap: 22px; font-size: 13px; color: var(--ink-3); }
.hto-foot-r a { transition: color 150ms ease; }
.hto-foot-r a:hover { color: var(--ink-1); }

/* ---- Responsive: 880px ---- */
@media (max-width: 880px) {
  .hto-wrap { padding: 0 20px; }
  .hto-topbar-inner { padding-top: 14px; padding-bottom: 14px; }

  /* Hero: reduced padding (must stay ≤ desktop 40px) */
  .hto-hero { padding: 32px 0 32px; }
  .hto-hero-wrap { padding: 0 20px; }

  /* First Focus section */
  .focus-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .dc-card { grid-template-columns: 1fr; }
  .dc-card-body { padding: 36px 28px; min-height: 0; }
  .dc-card-visual { min-height: 280px; border-left: none; border-top: 1px solid var(--line-1); }

  /* What's Next: stacks vertically */
  .hto-next-grid { grid-template-columns: 1fr; gap: 28px; }
  .hto-trades-list { grid-template-columns: 1fr; }

  /* Footer: stack + center. Let the link row wrap so it never runs off the
     right edge now that the footer carries more links (Cookies, Cookie
     Settings — #497). */
  .hto-foot-inner { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .hto-foot-r { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
}

/* Small phones (#430, WCAG 1.4.10): the 36px DeckCountry name forced the card
   wider than a 320px viewport and got clipped by `overflow-x: clip`. Shrink it,
   allow it to break, and trim the card padding so the card fits. */
/* Small phones (#430): keep the top bar on one tidy line so the logo mark
   stays aligned and nothing wraps/clips. */
@media (max-width: 480px) {
  .hto-brand { gap: 10px; }
  .hto-brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .hto-brand-name { font-size: 15px; white-space: nowrap; }
  .hto-contact-cta { padding: 9px 14px; font-size: 12.5px; white-space: nowrap; }
}

@media (max-width: 400px) {
  .dc-name { font-size: 26px; overflow-wrap: anywhere; }
  .dc-card-body { padding: 28px 20px; }
}

/* Very small phones (≤360px): the full "Home Trades Online" wordmark + CTA
   don't both fit, so drop the "Online" suffix (the H mark + "Home Trades"
   still read as the brand). Restores at 361px+. (#430) */
@media (max-width: 360px) {
  .hto-brand-name b { display: none; }
}

/* Keyboard focus indicator (WCAG 2.4.7, #430) — this page ships its own CSS
   and doesn't inherit the design-system focus fallback. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect reduced-motion (WCAG 2.3.3, #430) — neutralises the status-dot
   pulse and any transitions for users who opt out of animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
