/* ==========================================================================
   DIA BONITO · retreat-calculator.css
   Retreat Earnings Calculator: plain ink header (no photo, mirrors
   our-hosts.css), a two-column calculator (inputs left, live results
   right, stacked on phones), then the "What the island rate covers" copy.
   Only the shared tokens from style.css are used here.
   ========================================================================== */

/* --- Plain ink header ------------------------------------------------------ */

.calc-head {
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) var(--gutter) clamp(52px, 8vw, 88px);
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}

.calc-head .container-narrow { margin: 0 auto; }

.calc-title {
  font-family: var(--serif);
  font-weight: 330;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--bone);
}

.calc-lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.5;
  color: var(--bone);
  max-width: 620px;
  margin: 20px auto 0;
}

.calc-sublede {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(16px, 1.9vw, 18px);
  line-height: 1.75;
  color: var(--bone-2);
  max-width: 620px;
  margin: 16px auto 0;
}

/* --- Calculator layout ----------------------------------------------------- */

.calc {
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 110px);
}

.calc-grid {
  display: grid;
  gap: clamp(44px, 6vw, 64px);
}

@media (min-width: 860px) {
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }

  /* Results stay in view while the visitor works down the inputs. */
  .calc-results {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

@media (min-width: 1120px) {
  /* The desktop header compacts to about 110px once the page scrolls, so
     its full 204px height would leave a gap above the pinned card. */
  .calc-results { top: 132px; }
}

/* --- Inputs ---------------------------------------------------------------- */

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
  min-width: 0;
}

.calc-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-2);
}

.calc-help {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--bone-3);
  max-width: 460px;
}

/* Money input: a bordered box with a fixed $ prefix */
.calc-money {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color 0.3s var(--ease-out);
  max-width: 320px;
}

.calc-money:focus-within { border-color: var(--lagoon); }

.calc-money-prefix {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--bone-3);
  padding: 0 4px 0 18px;
  line-height: 1;
}

.calc-money input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--bone);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  padding: 14px 18px 14px 4px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.calc-money input::-webkit-outer-spin-button,
.calc-money input::-webkit-inner-spin-button,
.calc-stepper input::-webkit-outer-spin-button,
.calc-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Stepper: minus, value, plus */
.calc-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  width: max-content;
  transition: border-color 0.3s var(--ease-out);
}

.calc-stepper:focus-within { border-color: var(--lagoon); }

.calc-step {
  width: 54px;
  background: transparent;
  border: 0;
  color: var(--bone);
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.calc-step:first-child { border-right: 1px solid var(--line); }
.calc-step:last-child { border-left: 1px solid var(--line); }

.calc-step:hover:not(:disabled) { background: var(--ink-2); color: var(--lagoon); }

.calc-step:disabled { color: var(--bone-3); opacity: 0.45; cursor: not-allowed; }

.calc-stepper input {
  width: 76px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--bone);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  padding: 13px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Founding rate toggle: a real checkbox drawn as a switch */
.calc-toggle {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  border-top: 1px solid var(--line-soft);
  padding-top: 32px;
}

.calc-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.calc-switch {
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 26px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: transparent;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.calc-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bone-3);
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.calc-toggle input:checked + .calc-switch {
  background: var(--lagoon);
  border-color: var(--lagoon);
}

.calc-toggle input:checked + .calc-switch::after {
  transform: translateX(20px);
  background: var(--ink);
}

.calc-toggle input:focus-visible + .calc-switch {
  outline: 1px solid var(--lagoon);
  outline-offset: 3px;
}

.calc-toggle-text { display: flex; flex-direction: column; gap: 8px; }

.calc-toggle-label {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--bone);
  line-height: 1.5;
}

/* --- Results card ---------------------------------------------------------- */

.calc-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 44px);
}

.calc-card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 26px);
  line-height: 1.2;
  color: var(--bone);
  margin-bottom: 20px;
}

.calc-lines { margin: 0; }

.calc-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.calc-line dt {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--bone-2);
}

.calc-line dd {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--bone);
  white-space: nowrap;
  text-align: right;
}

.calc-line-deduct dd { color: var(--bone-2); }

/* The answer: what the leader keeps */
.calc-line-keep {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 8px;
  padding: 22px 0;
}

.calc-line-keep dt {
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 400;
  color: var(--bone);
}

.calc-line-keep dd {
  font-size: clamp(34px, 4.6vw, 46px);
  font-weight: 450;
  line-height: 1;
  color: var(--lagoon);
}

.calc-line-keep.is-negative dd { color: var(--bone-2); }

.calc-line-last { border-bottom: 0; padding-bottom: 0; }

.calc-note {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--bone-3);
  margin-top: 24px;
}

.calc-apply {
  display: block;
  text-align: center;
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lagoon);
  border: 1px solid var(--lagoon);
  padding: 19px 28px;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
              color 0.4s var(--ease-out);
}

.calc-apply:hover {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--ink);
}

/* --- What the island rate covers ------------------------------------------- */

.calc-covers {
  padding: clamp(64px, 9vw, 110px) 0 clamp(90px, 13vw, 150px);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.calc-covers-title {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--bone);
  max-width: 720px;
  margin: 0 auto;
}

.calc-covers-rule {
  width: 52px;
  height: 1px;
  background: var(--lagoon-dim);
  margin: 32px auto 40px;
}

.calc-covers-body {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.8;
  color: var(--bone-2);
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: left;
}

.calc-covers-body:last-child { margin-bottom: 0; }
