/* Goldsands Trading — site v6 */
:root {
  --navy: #0F1E33;
  --navy-2: #172A45;
  --gold: #C9A24A;
  --gold-light: #E6C981;
  --gold-dark: #9C7426;
  --sand: #F3EEE3;
  --ink: #1B2638;
  --muted: #5B6577;
  --line: #DCD3C0;
  --max: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Jost", "Futura", "Century Gothic", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

/* Hero */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--sand);
  overflow: hidden;
  padding: 2rem 0 0;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero-top img { width: clamp(11rem, 30vw, 15rem); }
.hero-top a.nav { color: var(--gold-light); text-decoration: none; font-weight: 500; }
.hero-top a.nav:hover { color: var(--sand); }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); flex-wrap: nowrap; justify-content: flex-end; }
.site-nav a { padding: .5rem 0; white-space: nowrap; }
.hero-top a.nav[aria-current="page"] { color: var(--sand); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .4em; text-decoration-thickness: 2px; }
.logo-link { display: block; }

.hero-body { padding: 6rem 0 3rem; max-width: 40rem; }
.hero h1 {
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}
.hero p { color: #C9CFD9; font-size: 1.15rem; margin: 0; max-width: 34rem; }

.dunes { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 250; min-height: 120px; margin-top: 2rem; }

/* Sections */
section { padding: 5rem 0; }
.split { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1.4fr; gap: 5rem; } }

h2 {
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: var(--navy);
}
.lede { color: var(--muted); margin: 0; }

.principles { list-style: none; margin: 0; padding: 0; }
.principles li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principles h3 { color: var(--navy); font-weight: 500; font-size: 1.15rem; line-height: 1.3; margin: 0 0 .35rem; }
.principles p { color: var(--muted); margin: 0; }

.note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-left: 3px solid var(--gold);
  color: var(--ink);
}

/* Contact */
.contact { background: #fff; }
form { display: grid; gap: 1.1rem; }
label { display: grid; gap: .35rem; font-weight: 500; color: var(--navy); font-size: .95rem; }
input, textarea {
  font: inherit;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--sand);
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
textarea { min-height: 9rem; resize: vertical; }
.hidden { position: absolute; left: -9999px; }
button {
  justify-self: start;
  font: inherit;
  font-weight: 500;
  padding: .85rem 1.8rem;
  border: 0;
  border-radius: 4px;
  background: var(--navy);
  color: var(--sand);
  cursor: pointer;
}
button:hover { background: var(--gold-dark); }

/* Footer */
footer { background: var(--navy); color: #9AA4B5; font-size: .9rem; padding: 3rem 0; }
footer .foot { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { footer .foot { grid-template-columns: auto 1fr; gap: 4rem; } }
footer img { width: 3.5rem; }
footer p { margin: 0 0 .75rem; }
footer a { color: var(--gold-light); }

/* Simple pages */
.simple { min-height: 100vh; display: grid; place-items: center; background: var(--navy); color: var(--sand); text-align: center; padding: 2rem; }
.simple img { width: 5rem; margin: 0 auto 1.5rem; }
.simple h1 { font-weight: 400; font-size: 2rem; margin: 0 0 .75rem; }
.simple p { color: #C9CFD9; margin: 0 0 1.5rem; }
.simple a { color: var(--gold-light); }

@media (prefers-reduced-motion: no-preference) {
  .ridge { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.2s ease-out .3s forwards; }
  .ridge-dot { opacity: 0; animation: pop .4s ease-out 2.3s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { to { opacity: 1; } }
}

/* ---------------------------------------------------------------
   Indicators page (v3)
   --------------------------------------------------------------- */
.hero-short .hero-body { padding: 4.5rem 0 2rem; }

.ind { padding: 4rem 0 5rem; }

.ind-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (max-width: 52rem) { .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; } }

.ind-tile {
  /* reset the site-wide button style */
  -webkit-tap-highlight-color: transparent;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
  width: 100%;
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
  border-radius: 0;
}
.ind-tile:hover { background: none; }
.ind-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 18px;
  outline: 3px solid transparent;
  outline-offset: 4px;
  transition: outline-color 160ms ease, transform 160ms ease;
}
.ind-tile:hover img { transform: translateY(-2px); }
.ind-tile[aria-expanded="true"] img { outline-color: var(--gold); }
.ind-tile:focus-visible { outline: none; }
.ind-tile:focus-visible img { outline-color: var(--gold-dark); }

.ind-name { color: var(--navy); font-weight: 500; font-size: 1.1rem; line-height: 1.3; }
.ind-cta {
  position: relative;
  white-space: nowrap;
  font-size: .95rem;
  font-weight: 500;
  padding: .55rem 1.1rem;
  border-radius: 4px;
  background: var(--navy);
  color: var(--sand);
  transition: background 160ms ease;
}
.ind-tile:hover .ind-cta { background: var(--gold-dark); }
.ind-tile[aria-expanded="true"] .ind-cta { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
/* Visible label is "Read more"; screen readers hear "Read about <name>" */
.ind-cta .ind-cta-name {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.ind-cta .ind-cta-more::after { content: " more"; }

.ind-panel {
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--sand);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.ind-panel[hidden] { display: none; }
.ind-panel:focus { outline: none; }
@media (max-width: 52rem) {
  .ind-panel { grid-template-columns: 1fr; }
  .ind-panel-img { max-width: 8rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .ind-panel.is-opening { animation: ind-open 260ms ease-out; }
  @keyframes ind-open { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.ind-panel-img { width: 100%; height: auto; border-radius: 14px; }
.ind-panel h2 { margin-bottom: .35rem; }
.ind-panel .lede { margin-bottom: 1.5rem; }
.ind-body p { margin: 0 0 1rem; max-width: 40rem; }
.ind-platforms {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.ind-platforms strong { color: var(--navy); font-weight: 500; }
.ind-close {
  margin-top: 1.25rem;
  padding: 0;
  background: none;
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 0;
}
.ind-close:hover { background: none; color: var(--navy); }

.ind-note { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.ind-disclaimer { margin: 1.5rem 0 0; color: var(--muted); font-size: .9rem; max-width: 40rem; }

/* ---------------------------------------------------------------
   Phones (v5)
   --------------------------------------------------------------- */
@media (max-width: 40rem) {
  body { font-size: 1rem; }

  /* Header: logo and both links on one row */
  .hero { padding-top: 1.25rem; }
  .hero-top img { width: 8.75rem; }
  .site-nav { gap: 1.25rem; font-size: .95rem; }

  /* Hero: bring the headline up */
  .hero-body { padding: 3rem 0 1.5rem; }
  .hero-short .hero-body { padding: 2.5rem 0 1rem; }
  .hero h1 { margin-bottom: 1rem; }
  .hero p { font-size: 1.05rem; }
  .dunes { margin-top: 1rem; min-height: 90px; }

  /* Tighter section rhythm */
  section { padding: 3.25rem 0; }
  .split { gap: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .principles li { padding: 1.1rem 0; }
  .note { margin-top: 1.5rem; padding: 1rem 1.15rem; }

  /* Contact form: full-width button for thumbs */
  button[type="submit"] { justify-self: stretch; padding: 1rem; }

  /* Footer */
  footer { padding: 2.25rem 0; }
  footer img { width: 2.75rem; }

  /* Indicators page */
  .ind { padding: 2.5rem 0 3.25rem; }
  .ind-grid { gap: 1rem; row-gap: 1.75rem; }
  .ind-tile { gap: .65rem; }
  .ind-tile img { border-radius: 14px; }
  .ind-name { font-size: 1rem; }
  .ind-cta { padding: .6rem 1rem; }
  .ind-panel { padding: 1.35rem 1.15rem 1.5rem; gap: 1.1rem; margin-top: 2rem; }
  .ind-panel-img { max-width: 5.5rem; border-radius: 10px; }
  .ind-panel .lede { margin-bottom: 1.1rem; }
  .ind-close { padding: .5rem 0; }
  .ind-note { margin-top: 2rem; }
}

/* Very small phones (iPhone SE 1st gen, older Androids) */
@media (max-width: 22.5rem) {
  .wrap { padding-left: max(1.1rem, env(safe-area-inset-left)); padding-right: max(1.1rem, env(safe-area-inset-right)); }
  .hero-top img { width: 7.75rem; }
  .site-nav { gap: 1rem; font-size: .9rem; }
  .ind-grid { gap: .75rem; row-gap: 1.5rem; }
}

/* ---------------------------------------------------------------
   v6: indicator pages, tools section, footer links
   --------------------------------------------------------------- */
.crumbs { font-size: .9rem; color: #9AA4B5; margin: 0 0 1.25rem; }
.crumbs a { color: var(--gold-light); text-decoration: none; }
.crumbs a:hover { color: var(--sand); }
.crumbs [aria-current] { color: var(--sand); }

.ipage { padding: 4rem 0; }
.ipage-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .ipage-grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 4.5rem; } }
.ipage-side { align-self: start; }
@media (min-width: 52rem) { .ipage-side { position: sticky; top: 2rem; } }
.ipage-img { width: 100%; max-width: 15rem; border-radius: 18px; }
.ipage-body { max-width: 42rem; }
.ipage-body h2 { margin-top: 2.5rem; }
.ipage-body h2:first-child { margin-top: 0; }
.ipage-body p { margin: 0 0 1rem; }
.btn { display: inline-block; font-weight: 500; padding: .8rem 1.4rem; border-radius: 4px; background: var(--navy); color: var(--sand); text-decoration: none; }
.btn:hover { background: var(--gold-dark); color: var(--sand); }
.ipage-cta { margin: 1.25rem 0 0; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: .5rem 0 .5rem 1.75rem; border-top: 1px solid var(--line); }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: .2rem; top: 1.05rem; width: .65rem; height: .35rem; border-left: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark); transform: rotate(-45deg); }
.faq h3 { color: var(--navy); font-weight: 500; font-size: 1.1rem; margin: 1.5rem 0 .35rem; }
.faq p { color: var(--muted); }

.more { background: #fff; padding: 4rem 0; }
.more-grid, .tools-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 52rem) { .more-grid, .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.more-grid a, .tools-grid a { display: grid; gap: .6rem; text-decoration: none; color: var(--navy); font-weight: 500; }
.more-grid img, .tools-grid img { border-radius: 14px; transition: transform 160ms ease; }
.more-grid a:hover img, .tools-grid a:hover img { transform: translateY(-2px); }
.tool-name { font-size: 1.1rem; }
.tool-line { color: var(--muted); font-weight: 400; font-size: .95rem; line-height: 1.45; }
.tools { background: #fff; }
.tools-all { margin: 2rem 0 0; font-weight: 500; }

.ind-more { margin: 1rem 0 0; font-weight: 500; }
.ind-index { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.ind-index h2 { font-size: 1.25rem; }
.ind-index ul { margin: .5rem 0 0; padding-left: 1.2rem; columns: 2; }
@media (max-width: 40rem) { .ind-index ul { columns: 1; } }

.foot-nav { margin-bottom: 1.5rem; }
.foot-nav-title { margin: 0 0 .5rem; font-weight: 500; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }

@media (max-width: 40rem) {
  .ipage { padding: 2.5rem 0; }
  .ipage-img { max-width: 8rem; }
  .more { padding: 2.75rem 0; }
}
