/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }

/* ===== GRYPHON WEALTH TOKENS ===== */
:root {
  --copper: #BC8466;
  --copper-light: #d4a68a;
  --clearwater: #083A5B;
  --atlantic: #041C2F;
  --stone: #54585A;
  --stone-light: #7a7d7f;
  --mint: #8BD1CC;
  --verdigris: #50BAB3;
  --bg: #000000;
  --surface: #FFFFFF;
  --surface-alt: #F5F2EE;
  --surface-row: #F0EDE8;
  --border: #E2DDD6;
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(4, 28, 47, 0.06);
  --shadow-md: 0 4px 16px rgba(4, 28, 47, 0.08);
  --shadow-lg: 0 8px 32px rgba(4, 28, 47, 0.1);
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  
   /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
    /* Fonts */
  --font-display: 'Playfair Display', serif;
  --font-sub: 'bicyclette', sans-serif;
  --font-body: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
  
    /* Content Widths */
  --content-wide: 1120px;
  --content-default: 960px;
  
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
  background: #000;
  padding: var(--space-4) var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner li {
  display: inline-block;
  padding: 0 0;
  font-family: var(--font-sub);
  line-height: 1.5rem;
  font-size: 14px;
  margin-left: 20px;
}

.header-inner li a {
  color: #999;
  text-transform: uppercase;
  transition: .1s ease-in-out;
  transition-property: color;
  text-decoration: none;
}

.header-inner li a:hover, .header-inner li a:focus {
  color: var(--copper);
}

.logo-link {
  display: inline-flex;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
}

.hero {
  background-image: url(https://gryphon-wealth.com/wp-content/themes/frankel-base/images/hero.jpg);
  background-color: #000000;
  background-size: 100%;
  background-repeat: no-repeat;
  padding: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-6);
  text-align: center;
}

.hero-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-sub);
  font-size: 2.5em;
  font-weight: 300;
  line-height: .75em;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: .75em;
  text-align: center;
  line-height: 1.9em;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  max-width: 600px;
  margin: 40px auto 0 auto;
  font-weight: 800;
}

.gold-emphasis {
  font-size: 2em;
  line-height: 1em;
  display: block;
  font-style: italic;
  color: var(--copper);
  font-family: var(--font-display);
  text-transform: lowercase;
}

/* ========================================
   CALCULATOR
   ======================================== */

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: #ffffff;
  background-color: #000000;
}

/* ===== PAGE LAYOUT ===== */
.calc-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 24px;
}

.border-bottom {
  background: url(https://gryphon-wealth.com/wp-content/themes/frankel-base/images/border-bottom01.svg) top left no-repeat;
  background-size: contain;
  height: 18px;
  width: 100%;
  margin-bottom: 25px;
}

/* ===== CALCULATOR CARD ===== */

.calc-inputs {
  padding: 32px 32px 28px;
}
.calc-inputs h2 {
  font-family: var(--font-display);
  font-size: 2.5em;
  font-weight: 400;
  line-height: 1.2em;
  color: var(--copper);
  margin-bottom: var(--space-3);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--copper);
  letter-spacing: 0.2px;
}
.field .hint {
  font-size: 12px;
  color: var(--stone-light);
  margin-top: -2px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--stone-light);
  pointer-events: none;
}
.input-suffix {
  position: absolute;
  right: 14px;
  font-size: 13px;
  color: var(--stone-light);
  pointer-events: none;
}

input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  transition: border-color var(--transition), box-shadow var(--transition);
  -moz-appearance: textfield;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border 250ms ease, transform 250ms ease;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"]:focus {
  outline: none;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 0 3px rgba(188, 132, 102, 0.15);
}
input.has-prefix { padding-left: 28px; }
input.has-suffix { padding-right: 60px; }

.rate-display {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.rate-btn-group {
  display: flex;
  gap: 6px;
  width: 100%;
}
.rate-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
  font-family: inherit;
}
.rate-btn:hover {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.rate-btn.active {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}
.rate-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  appearance: none;
  cursor: pointer;
  outline: none;
}
.rate-select:focus {
  border-color: var(--copper);
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}
.rate-select option {
  background: #1a1a1a;
  color: #fff;
}

/* ===== ELIGIBILITY CHECKBOXES ===== */
.eligibility-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #201813;
}
.eligibility-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--copper);
  letter-spacing: 0.2px;
  margin-bottom: 14px;
}
.eligibility-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eligibility-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  -moz-appearance: textfield;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border 250ms ease, transform 250ms ease;
}
.eligibility-option:hover {
  border-color: rgba(255,255,255,0.5);
}
.eligibility-option.checked {
  background: rgba(188, 132, 102, 0.04);
}

/* Custom radio/checkbox appearance */
.eligibility-option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #4a4a4a;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: border-color var(--transition), background var(--transition);
}
.eligibility-option input[type="checkbox"]:checked {
  border-color: var(--copper);
  background: var(--copper);
}
.eligibility-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.eligibility-option input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.eligibility-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eligibility-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eligibility-amount {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.eligibility-note {
  font-size: 12px;
  line-height: 1.5;
}
.eligibility-note a {
  color: var(--copper);
  text-decoration: none;
}
.eligibility-note a:hover { text-decoration: underline; }

.initial-total {
  margin-top: 16px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.initial-total-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}
.initial-total-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--copper);
}

/* ===== CALCULATE BUTTON ===== */
.calc-action {
  padding: 0 32px 32px;
}
.btn-calculate {
  width: 100%;
  padding: 14px 24px;
  background: var(--copper);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-calculate:hover { background: var(--copper-light); }
.btn-calculate:active { transform: scale(0.985); }

/* ===== RESULTS ===== */
.calc-results {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: #0e0e0e;
  padding: 32px;
  display: none;
}
.calc-results.visible { display: block; }

.result-hero {
  text-align: center;
  margin-bottom: 28px;
}
.result-hero-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}
.result-hero-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 700;
  color: var(--copper);
  line-height: 1.1;
}
.result-hero-sub {
  font-size: 13px;
  color: var(--stone-light);
  margin-top: 6px;
  max-width: 500px;
  margin: 10px auto;
}

.result-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 560px) {
  .result-breakdown { grid-template-columns: 1fr; }
}
.result-stat {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.1);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.result-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.result-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--copper);
}

/* ===== GROWTH CHART ===== */
.chart-container {
  padding: 20px;
  margin-bottom: 24px;
}
.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--copper);
  margin-bottom: 16px;
}
canvas { width: 100%; height: 300px; }

/* ===== MILESTONES ===== */
.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.milestone {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.1);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.milestone-age {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.milestone-value {
  font-size: 19px;
  font-weight: 600;
  color: var(--copper);
}
.milestone-label {
  font-size: 11px;
  color: var(--stone-light);
  margin-top: 2px;
}

/* ===== DISCLAIMER (CALCULATOR) ===== */
.calc-disclaimer {
  margin-top: 20px;
  padding: 18px 22px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
}
.calc-disclaimer strong {
  color: #fff;
  font-weight: 600;
}

/* ===== AGE ERROR / DISABLED STATE ===== */
.age-error {
  margin-top: 12px;
  padding: 14px 18px;
  background: rgba(188, 132, 102, 0.08);
  border: 1px solid var(--copper-light);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--copper);
  line-height: 1.6;
  display: none;
}
.age-error.visible { display: block; }
.btn-calculate:disabled {
  background: #000;
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-calculate:disabled:hover {
  background: #000;
  transform: none;
}
.calc-inputs.disabled-state .field input:not(#childAge),
.calc-inputs.disabled-state .eligibility-option {
  opacity: 0.4;
  pointer-events: none;
}
.calc-inputs.disabled-state .rate-display,
.calc-inputs.disabled-state .rate-select { opacity: 0.4; pointer-events: none; }
.eligibility-option.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
.ineligible-msg {
  display: none;
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}
.eligibility-option.disabled .ineligible-msg {
  display: block;
}

/* ===== CALLOUT ===== */
.advisor-callout {
  background: #0a0a0a;
  border-top: 1px solid #201813;
  padding: 32px 24px;
  text-align: center;
}
.advisor-callout p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.advisor-callout a {
  color: var(--copper);
  text-decoration: none;
  font-weight: 500;
}
.advisor-callout a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.site-footer {
  background: #000000;
  border-top: 1px solid #201813;
  padding: 40px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}
.footer-logo {
  height: 30px;
  width: auto;
  margin: 0 auto 16px;
  opacity: 0.8;
  display: block;
}
.footer-text {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0;
  line-height: 1.6;
}
.footer-sub {
  margin-top: 4px;
  color: rgba(255,255,255,0.35);
}
.footer-sub a {
  color: var(--copper);
  text-decoration: none;
}
.footer-sub a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .calc-wrap { padding: 0 16px; }
  .calc-inputs { padding: 24px 20px 20px; }
  .calc-action { padding: 0 20px 24px; }
  .calc-results { padding: 24px 20px; }
}
@media (max-width: 768px) {
  .header-inner li {
  display: none;
	}
}