/* aarryantrades.com — "The Floor"
   One idea: the whole site is the floor Aarryan draws on.
   Concrete ground, sheets of paper taped down, marker-blue ink.
*/

:root {
  color-scheme: dark;
  --concrete: #111315;          /* page ground */
  --concrete-deep: #0B0C0D;
  --paper: #1B1E21;             /* cards */
  --paper-2: #23272B;
  --ink: #F2F2EE;
  --ink-soft: #A7ABA4;
  --marker: #C8FF3D;            /* neon: actions only */
  --marker-deep: #B4EC22;
  --on-marker: #111315;
  --gold: #E3B341;              /* prices and handwritten notes */
  --loss: #FF5A4E;
  --win: #8FD694;
  --tape: rgba(242, 242, 238, 0.13);
  --pencil: #4A4F55;
  --rule: #2E3337;

  --hand: 'Kalam', 'Segoe Print', cursive;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.4rem, 4.6vw, 3.6rem);
  --step-5: clamp(3.1rem, 7.4vw, 6.6rem);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--concrete);
  background-image:
    radial-gradient(rgba(242, 242, 238, 0.045) 1px, transparent 1.2px),
    radial-gradient(ellipse at 15% 0%, rgba(200, 255, 61, 0.05), transparent 45%),
    radial-gradient(ellipse at 90% 80%, rgba(227, 179, 65, 0.04), transparent 50%);
  background-size: 8px 8px, 100% 100%, 100% 100%;
  font-variant-numeric: tabular-nums;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--marker); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--marker-deep); }

:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { left: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

.hand { font-family: var(--hand); }

.display {
  font-family: var(--hand);
  font-weight: 700;
  font-size: var(--step-5);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.title {
  font-family: var(--hand);
  font-weight: 700;
  font-size: var(--step-4);
  line-height: 1.02;
}

.subhead {
  font-family: var(--body);
  font-weight: 800;
  font-stretch: 118%;
  font-size: var(--step-2);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 36em; margin: 0; }

p { margin: 0; max-width: 68ch; }

.note-hand {
  font-family: var(--hand);
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--gold);
}

/* ---------- Header ---------- */

.site-header { padding-block: 22px; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }

.wordmark {
  font-family: var(--hand); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--marker); text-decoration: none;
}
.wordmark:hover { color: var(--marker-deep); }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  min-height: 44px; display: inline-flex; align-items: center; padding-inline: 10px;
}
.nav a:hover { color: var(--marker); }
.nav a[aria-current="page"] {
  color: var(--marker);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 30 3, 60 8, 98 4' fill='none' stroke='%23C8FF3D' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") bottom 6px left 10px / calc(100% - 20px) 8px no-repeat;
}

.lang { display: inline-flex; gap: 6px; margin-left: 8px; }
.lang button {
  min-height: 44px; padding: 0 14px; cursor: pointer;
  font-family: var(--hand); font-weight: 700; font-size: 1.1rem;
  color: var(--marker); background: transparent;
  border: 2px dashed var(--marker); border-radius: 3px 10px 4px 9px;
}
.lang button:first-child { transform: rotate(-1.5deg); }
.lang button:last-child { transform: rotate(1.2deg); }
.lang button[aria-pressed="true"] { background: var(--marker); color: var(--on-marker); border-style: solid; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; cursor: pointer;
  font-family: var(--hand); font-weight: 700; font-size: 1.35rem; line-height: 1;
  text-decoration: none; color: var(--on-marker); background: var(--marker);
  border: 0; border-radius: 3px 16px 5px 14px;
  box-shadow: 0 0 0 1px rgba(200,255,61,.2), 0 6px 18px -8px rgba(200,255,61,.45);
}
.btn:hover { background: var(--marker-deep); color: var(--on-marker); }
.btn:active { transform: translateY(1px); box-shadow: none; }

.btn-ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink); box-shadow: none;
}
.btn-ghost:hover { background: rgba(242, 242, 238, 0.06); color: var(--ink); }

/* ---------- Paper ---------- */

.sheet {
  position: relative;
  background: var(--paper);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: rotate(var(--tilt, 0deg));
}
.sheet.taped::before, .sheet.taped::after {
  content: ""; position: absolute; top: -13px; width: 104px; height: 28px; background: var(--tape);
}
.sheet.taped::before { left: 38px; transform: rotate(-4deg); }
.sheet.taped::after { right: 46px; transform: rotate(5deg); }

.sheet.lined {
  background-image: repeating-linear-gradient(var(--paper) 0 39px, rgba(242,242,238,0.08) 39px 40px);
  background-position: 0 18px;
}

@media (max-width: 700px) {
  .sheet { transform: none; }
}

.chalk-box {
  border: 3px dashed var(--pencil);
  padding: clamp(20px, 3vw, 32px);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-soft); max-width: 30em; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(24px, 5vw, 56px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 64px); }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-figure { flex: 1 1 460px; min-width: 0; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; }
.signature { font-family: var(--hand); font-size: 1.4rem; color: var(--gold); }

@media (prefers-reduced-motion: no-preference) {
  .draw.is-drawing path:not([stroke-dasharray]) {
    stroke-dasharray: var(--len, 1200);
    stroke-dashoffset: var(--len, 1200);
    animation: draw var(--dur, 1.1s) cubic-bezier(.55,.1,.35,1) forwards;
    animation-delay: var(--delay, 0s);
  }
  .draw.is-drawing text { opacity: 0; animation: appear .4s ease forwards; animation-delay: var(--delay, 0s); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- PropIQ teaser on home ---------- */

.propiq-home { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 48px); align-items: flex-start; }
.propiq-home .sheet { flex: 1 1 560px; min-width: 0; --tilt: -1deg; }
.propiq-home .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; }
@media (max-width: 560px) { .field-grid { grid-template-columns: minmax(0, 1fr); } }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field .label { font-family: var(--hand); font-size: 1.2rem; color: var(--gold); }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }

.field select, .field input {
  width: 100%; min-height: 48px;
  font: 500 1.1rem var(--body); color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  padding: 6px 2px;
}
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2 C 6 6, 8 9, 10 10 C 12 8, 15 5, 18 2' fill='none' stroke='%23F2F2EE' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") right 4px center / 16px 10px no-repeat;
}
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--marker); box-shadow: 0 2px 0 var(--marker); }
.field input:focus-visible, .field select:focus-visible { outline: none; }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--marker); }

/* ---------- Results (PropIQ) ---------- */

.results { display: flex; flex-direction: column; gap: 28px; }
.result-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 24px; }
.result-meta p { color: var(--ink-soft); }

.firm-card {
  position: relative; background: var(--paper);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: 0 14px 24px -16px rgba(0, 0, 0, 0.6);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr); gap: 20px 36px;
}
@media (max-width: 760px) { .firm-card { grid-template-columns: minmax(0, 1fr); } }
.firm-card:nth-child(odd) { transform: rotate(-0.35deg); }
.firm-card:nth-child(even) { transform: rotate(0.3deg); }
@media (max-width: 700px) { .firm-card:nth-child(n) { transform: none; } }

.firm-card .rank {
  position: absolute; top: -16px; left: -10px;
  width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--hand); font-weight: 700; font-size: 1.5rem; color: var(--marker);
  background: var(--paper); border: 2.5px solid var(--marker); border-radius: 52% 48% 55% 45%;
}
.firm-name { font-weight: 800; font-stretch: 115%; font-size: 1.5rem; line-height: 1.1; }
.firm-program { color: var(--ink-soft); }
.firm-price { font-family: var(--hand); font-weight: 700; font-size: 2.1rem; line-height: 1.1; color: var(--gold); margin-top: 10px; }
.firm-price small { font-family: var(--body); font-weight: 500; font-size: var(--step--1); color: var(--ink-soft); }

.rules { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
@media (max-width: 460px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.rules div { border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.rules dt { font-size: var(--step--1); color: var(--ink-soft); }
.rules dd { margin: 0; font-weight: 600; }

.fit { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.fit .note-hand { font-size: 1.25rem; }
.card-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; font-size: var(--step--1); color: var(--ink-soft); }
.card-foot a { font-weight: 600; }
.stale { color: var(--loss); font-weight: 600; }
.warn { color: var(--loss); }

.code-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 2px dashed var(--pencil); font-weight: 600; color: var(--ink-soft);
}
.code-chip.live { border-style: solid; border-color: var(--marker); color: var(--marker); }

.empty { text-align: left; }

/* ---------- Account finder ---------- */

.finder { display: flex; flex-direction: column; gap: 20px; }
#fd-body { display: flex; flex-direction: column; gap: 18px; }
#fd-body h3:focus, #fd-body h3:focus-visible { outline: none; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.choice {
  min-height: 64px; padding: 14px 18px; cursor: pointer; text-align: left;
  font: 600 1.1rem var(--body); color: var(--ink);
  background: transparent; border: 2.5px solid var(--ink);
  border-radius: 4px 14px 6px 12px;
}
.choice:nth-child(even) { border-radius: 12px 5px 14px 4px; }
.choice:hover { border-color: var(--marker); color: var(--marker); }
.choice.chosen { background: var(--marker); border-color: var(--marker); color: var(--on-marker); }
.fd-result { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.fd-result h3:focus { outline: none; }
.fd-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; width: 100%; }
.fd-cols h4 { margin-bottom: 8px; font-size: 1.15rem; }
.ticks, .warns { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ticks li, .warns li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 18px; height: 12px; border-left: 3px solid var(--marker); border-bottom: 3px solid var(--marker); transform: rotate(-45deg); }
.warns li::before { content: "!"; position: absolute; left: 4px; top: -2px; font: 700 1.3rem var(--hand); color: var(--loss); }
.choices.many { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; width: 100%; }
.pick-card { position: relative; border: 3px dashed var(--pencil); padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pick-card .rank { position: absolute; top: -18px; left: -12px; width: 40px; height: 40px; display: grid; place-items: center; font: 700 1.3rem var(--hand); color: var(--marker); background: var(--paper); border: 2.5px solid var(--marker); border-radius: 52% 48% 55% 45%; }
.pick-card .firm-price { font-size: 1.8rem; margin-top: 0; }
.pick-meta { font-size: var(--step--1); color: var(--ink-soft); margin-top: -6px; }
.pick-card .btn { min-height: 46px; font-size: 1.15rem; padding: 0 20px; margin-top: 4px; }
.best { display: flex; flex-direction: column; gap: 16px; --tilt: -0.3deg; border: 1px solid rgba(200,255,61,.25); }
.alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.alt { border: 3px dashed var(--pencil); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.alt .firm-name { font-size: 1.2rem; }
.fineprint { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- Rules explainers ---------- */

.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 44px); }
.rule-card { display: flex; flex-direction: column; gap: 14px; }
.rule-card svg { width: 100%; height: auto; background: var(--paper); padding: 14px; box-shadow: 0 12px 22px -16px rgba(0, 0, 0, 0.6); }
.rule-card h3 { font-weight: 800; font-stretch: 115%; font-size: 1.35rem; line-height: 1.15; }
.rule-card p { color: var(--ink-soft); }

/* ---------- Tools ---------- */

.tool-row { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 40px); }
.tool-card { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tool-card:nth-child(1) { --tilt: 0.8deg; }
.tool-card:nth-child(2) { --tilt: -0.9deg; }
.tool-card .note-hand { font-size: 1.45rem; }
.tool-card .btn { align-self: flex-start; margin-top: 6px; }

.locked { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* tool pages */
.tool-layout { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 48px); align-items: flex-start; }
.tool-layout .sheet { flex: 1 1 520px; min-width: 0; --tilt: -0.6deg; display: flex; flex-direction: column; gap: 22px; }
.tool-layout .answer { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.readout { display: flex; flex-direction: column; gap: 6px; }
.readout .big { font-family: var(--hand); font-weight: 700; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; }
.readout .big.ok { color: var(--marker); }
.readout .big.danger { color: var(--loss); }
.readout .big.gone { color: var(--loss); text-decoration: line-through; text-decoration-thickness: 4px; }

.working {
  font-family: var(--hand); font-size: 1.3rem; line-height: 1.6; color: var(--ink);
  border-left: 3px solid var(--marker); padding-left: 16px;
}
.working .em { color: var(--marker); font-weight: 700; }

.meter { height: 18px; border: 2px solid var(--ink); border-radius: 3px 9px 4px 8px; overflow: hidden; background: var(--paper); }
.meter span { display: block; height: 100%; width: 0; background: var(--marker); transition: width .35s ease; }
.meter span.danger { background: var(--loss); }
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }

.preset-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.preset-row .field { flex: 1 1 260px; }

.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.fieldset legend { font-weight: 800; font-stretch: 115%; font-size: 1.15rem; padding: 0; margin-bottom: 4px; }

/* ---------- Explainers ---------- */

.reel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.reel { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.reel .thumb {
  aspect-ratio: 4 / 3; border: 3px dashed var(--pencil); display: grid; place-items: center;
  padding: 18px; background: rgba(242, 242, 238, 0.03);
}
.reel .thumb svg { width: 78%; }
.reel h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.reel:hover h3 { color: var(--marker); }

/* ---------- Codes / disclosure ---------- */

.codes { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 56px); }
.codes > div { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.codes .sheet { flex: 1 1 480px; --tilt: 0.6deg; }

.code-list { list-style: none; margin: 0; padding: 0; font-family: var(--hand); font-size: 1.35rem; line-height: 40px; }
.code-list li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.code-list .soon { color: var(--ink-soft); }
.field select option { background: var(--paper); color: var(--ink); }

/* ---------- Photo slot ---------- */

.photo { margin: 0; flex: 1 1 340px; min-width: 0; transform: rotate(1deg); }
.photo img { width: 100%; height: auto; border: 10px solid var(--paper); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.6); }
.photo figcaption { font-family: var(--hand); font-size: 1.15rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 2px solid var(--ink); padding-block: 36px 56px; margin-top: clamp(24px, 4vw, 48px); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
.fineprint { flex-basis: 100%; font-size: var(--step--1); color: var(--ink-soft); max-width: 80ch; }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .site-header nav, .lang, .site-footer nav, .hero-actions { display: none; }
  .sheet, .firm-card { box-shadow: none; transform: none; border: 1px solid #999; }
}
