/* Rifat Exits — rifatexits.com */

:root {
  --paper: #f5f0e6;
  --paper-raised: #fbf8f1;
  --paper-sunk: #ede6d8;
  --ink: #16241e;
  --ink-soft: #4f5b54;
  --green: #173d30;
  --green-hover: #0f2c22;
  --on-green: #f5f0e6;
  --on-green-soft: #c5d0c8;
  --accent: #a04e1c;
  --accent-bright: #e0a071;
  --rule: #d9d0bd;
  --rule-strong: #bfb49c;
  --band: #143328;
  --band-rule: #2c4d40;
  --shadow: 0 1px 2px rgba(22, 36, 30, .05), 0 12px 32px -16px rgba(22, 36, 30, .22);

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 11vw, 136px);
  --header-h: 68px;
  --form-h: 3400px; /* measured height of the Google Form at this width, plus room for validation messages */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a16;
    --paper-raised: #16241f;
    --paper-sunk: #0b1411;
    --ink: #ece6d8;
    --ink-soft: #a9b3ab;
    --green: #e6dfcf;
    --green-hover: #ffffff;
    --on-green: #10201a;
    --on-green-soft: #b9c4bc;
    --accent: #e0a071;
    --accent-bright: #e0a071;
    --rule: #26362f;
    --rule-strong: #3a4d44;
    --band: #16261f;
    --band-rule: #2c4036;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color .2s ease;
}
a:hover { color: var(--accent); }

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

.container {
  width: 100%;
  max-width: calc(1120px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green);
  color: var(--on-green);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-green); }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34em;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-hover); color: var(--on-green); box-shadow: var(--shadow); }

.btn-ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-small { min-height: 42px; padding: 0 18px; font-size: .9rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled, .site-header.menu-open { border-bottom-color: var(--rule); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  font-variation-settings: 'opsz' 36;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo span { color: var(--accent); font-style: italic; }

.site-nav { display: flex; gap: 32px; margin-left: auto; margin-right: 16px; }
.site-nav a {
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom 4px / 0 1px;
  transition: background-size .25s ease, color .2s ease;
}
.site-nav a:hover { color: var(--ink); background-size: 100% 1px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
}
.nav-toggle .bar {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-origin: 11px 11px;
  transition: transform .25s ease;
}
.menu-open .bar-top { transform: translateY(4px) rotate(45deg); }
.menu-open .bar-bottom { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 820px) {
  .site-header { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .header-inner { flex-wrap: wrap; }
  .logo { margin-right: auto; }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    gap: 0;
    flex-direction: column;
    padding-bottom: 12px;
  }
  .site-nav a {
    padding: 14px 0;
    font-size: 1.05rem;
    border-top: 1px solid var(--rule);
    background: none;
  }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 0 var(--gutter) 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 32px -24px rgba(22, 36, 30, .3);
  }
  .js .site-nav a:first-child { border-top: 0; }
  .js .menu-open .site-nav { display: flex; }
}

/* Sections */

.section { padding-block: var(--section); }
.section-head { max-width: 46rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head.centered .lede { margin: 20px auto 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* Hero */

.hero { padding-block: clamp(48px, 8vw, 104px) clamp(64px, 9vw, 120px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}

.hero h1 em { font-style: italic; color: var(--accent); font-weight: 300; }
.hero .lede { margin-top: 28px; }
.hero .btn-row { margin-top: 36px; }

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 8px 28px;
  box-shadow: var(--shadow);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.fact:last-child { border-bottom: 0; }
.fact dd {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}
.fact dt { margin-top: 6px; font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .fact:nth-last-child(2) { border-bottom: 0; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); padding: 4px 22px; }
  .fact { flex-direction: row-reverse; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; }
  .fact:nth-last-child(2) { border-bottom: 1px solid var(--rule); }
  .fact dd { flex: none; font-size: 1.75rem; white-space: nowrap; }
  .fact dt { margin-top: 0; text-align: right; max-width: 11em; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* Why */

.why { background: var(--paper-sunk); }
.split-body > p { font-size: 1.15rem; line-height: 1.65; }

.alone-list { margin: 28px 0; border-top: 1px solid var(--rule-strong); }
.alone-list li {
  position: relative;
  padding: 14px 0 14px 36px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
}
.alone-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 20px; height: 1px;
  background: var(--accent);
}
.split-body .closing {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* What the fee covers */

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.cover {
  padding: 28px 28px 32px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 16px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease, opacity .7s ease;
}
.cover:hover { border-color: var(--rule-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.cover-num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 36px;
}
.cover h3 { margin-bottom: 10px; }
.cover p { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }

@media (max-width: 900px) { .cover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .cover-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cover { padding: 24px; }
  .cover-num { margin-bottom: 20px; }
}

/* How it works: the deal timeline */

.how { background: var(--paper-sunk); }

.timeline-art { width: 100%; height: auto; overflow: visible; margin-bottom: 28px; }
.timeline-base { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 2 6; fill: none; }
.timeline-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.timeline-nodes circle { fill: var(--paper-sunk); stroke: var(--green); stroke-width: 2; vector-effect: non-scaling-stroke; }
.timeline-nodes .node-final { fill: var(--accent); stroke: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.step { padding-right: 28px; }
.step-num {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .98rem; line-height: 1.55; }

.note {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .timeline-art { display: none; }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    margin-left: 7px;
    border-left: 2px solid var(--green);
  }
  .step { position: relative; padding: 0 0 36px 32px; }
  .step:last-child { padding-bottom: 0; }
  .step::before {
    content: '';
    position: absolute;
    left: -9px; top: 0;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--paper-sunk);
    border: 2px solid var(--green);
  }
  .step-final::before { background: var(--accent); border-color: var(--accent); }
  .step-num { line-height: 16px; }
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.about-copy h2 { margin-bottom: 28px; }
.about-copy p:not(.eyebrow) { font-size: 1.15rem; max-width: 32em; }
.about-copy p + p { margin-top: 18px; }
.about-copy .btn { margin-top: 32px; }

.exits-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.exits-card h3 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.exits-card li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.exits-card li:last-child { border-bottom: 0; padding-bottom: 0; }
.exit-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.exit-meta { display: block; margin-top: 4px; font-size: .92rem; color: var(--ink-soft); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .exits-card { padding: 24px; }
}

/* Pricing */

.pricing { background: var(--band); color: var(--on-green); }
@media (prefers-color-scheme: dark) { .pricing { color: var(--ink); } }
.pricing .eyebrow { color: var(--accent-bright); }

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: end;
}
.fee {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(8rem, 27vw, 19rem);
  line-height: .82;
  letter-spacing: -0.05em;
  color: var(--accent-bright);
  margin: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px) -0.04em;
  font-variant-numeric: lining-nums;
}
.fee span { font-size: .5em; font-style: italic; letter-spacing: 0; margin-left: .04em; vertical-align: .42em; }
.fee-text { font-size: 1.2rem; line-height: 1.55; max-width: 26em; }

.rules h3 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 8px;
}
.rules li {
  position: relative;
  padding: 18px 0 18px 32px;
  border-bottom: 1px solid var(--band-rule);
  color: var(--on-green-soft);
  line-height: 1.55;
}
.rules li:last-child { border-bottom: 0; }
.rules li::before {
  content: '';
  position: absolute;
  left: 2px; top: 1.72em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
}

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* FAQ */

.faq-list { border-top: 1px solid var(--rule-strong); }
.faq-list details { border-bottom: 1px solid var(--rule-strong); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  transition: color .2s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent); }
.faq-list summary h3 { font-size: 1.25rem; font-weight: 400; }
.faq-list summary::after {
  content: '';
  flex: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .25s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer { padding: 0 34px 26px 0; color: var(--ink-soft); }

/* Free valuation */

.valuation { background: var(--paper-sunk); }
.valuation-inner { max-width: calc(820px + var(--gutter) * 2); }

.form-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.form-card iframe {
  width: 100%;
  height: var(--form-h);
  border: 0;
}
.form-fallback { margin-top: 24px; text-align: center; color: var(--ink-soft); font-size: .98rem; }
.form-fallback a { color: var(--ink); font-weight: 500; }
.form-fallback a:hover { color: var(--accent); }

@media (max-width: 760px) { :root { --form-h: 3500px; } }
@media (max-width: 480px) { :root { --form-h: 3800px; } }
@media (max-width: 340px) { :root { --form-h: 4000px; } }
@media (max-width: 640px) {
  .valuation-inner { padding-inline: 12px; }
  .form-card { border-radius: 14px; }
}

/* Footer */

.site-footer { border-top: 1px solid var(--rule); padding-block: 32px; font-size: .95rem; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { padding-block: 4px; }

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  }
  .js .reveal.in { opacity: 1; transform: none; }

  .js .cover.reveal.in { transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease, opacity .7s ease; }
  .js .cover.reveal.in:hover { transform: translateY(-3px); }
  .cover-grid .reveal:nth-child(3n + 2) { transition-delay: .08s; }
  .cover-grid .reveal:nth-child(3n + 3) { transition-delay: .16s; }

  .js .timeline .timeline-line { stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.4, 0, .2, 1) .2s; }
  .js .timeline.in .timeline-line { stroke-dashoffset: 0; }
  .js .timeline .timeline-nodes circle { opacity: 0; transition: opacity .4s ease; }
  .js .timeline.in .timeline-nodes circle { opacity: 1; }
  .js .timeline.in .timeline-nodes circle:nth-child(1) { transition-delay: .2s; }
  .js .timeline.in .timeline-nodes circle:nth-child(2) { transition-delay: .6s; }
  .js .timeline.in .timeline-nodes circle:nth-child(3) { transition-delay: 1s; }
  .js .timeline.in .timeline-nodes circle:nth-child(4) { transition-delay: 1.4s; }
  .js .timeline.in .timeline-nodes circle:nth-child(5) { transition-delay: 1.8s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .cover:hover { transform: none; }
}

@media print {
  .site-header { position: static; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

.nowrap { white-space: nowrap; }
