/* Toranj landing page — hand-written CSS, no build step. */

/* ---------- reset & base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: "IRANYekanX", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent-ink);
  text-decoration: none;
}

a:hover {
  color: var(--color-ink);
}

button {
  font-family: inherit;
}

h1,
h2,
h3 {
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

/*
 * Card titles are real headings (<h3>) so the document has an outline below
 * the section <h2>s — they used to be <div>/<span>, which left ~20 headings
 * invisible to crawlers and to screen-reader heading navigation.
 *
 * Each of these classes already declares its own font-size/font-weight, and
 * `margin: 0` above covers the rest, so promoting them changed exactly one
 * thing visually: they inherited the display tracking above. Opting back out
 * keeps the rendered page byte-for-byte what it was before the change. Drop
 * this block only if the intent is to genuinely restyle the cards.
 */
.step-title,
.tool-title,
.gallery-style,
.plan-name,
.faq-question-text {
  letter-spacing: normal;
}

/* text-wrap: balance/pretty are progressive enhancements; unsupported
   browsers just get normal wrapping. */
h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  right: 12px;
  z-index: 100;
  background: var(--color-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Visible focus ring throughout. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent-ink);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.eyebrow-kicker {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  border-radius: var(--radius-md);
  corner-shape: squircle; /* progressive enhancement; ignored gracefully */
  padding: 15px 24px;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn .icon {
  font-size: 22px;
}

.btn-dark {
  background: var(--color-ink);
  color: #fff;
}

.btn-dark:hover {
  background: #26231f;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid rgba(23, 21, 18, 0.18);
}

.btn-outline:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn-pill {
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
}

.btn-pill .icon {
  font-size: 18px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(233, 230, 224, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 21, 18, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  flex: none;
}

.brand:hover {
  color: var(--color-ink);
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
  flex-wrap: wrap;
}

.site-nav a {
  color: #6f6a62;
}

.site-nav a:hover {
  color: var(--color-ink);
}

.header-cta {
  flex: none;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(46px, 7vw, 96px) 0 0;
}

.hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(11, 122, 116, 0.09);
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 800;
  margin: 0 0 26px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.hero-copy h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.1;
  margin: 0 0 22px;
}

.hero-copy .lede {
  margin: 0 0 34px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.9;
  color: #6f6a62;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(23, 21, 18, 0.1);
}

.stat-n {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-ink);
}

.stat-label {
  font-size: 12.5px;
  color: var(--color-muted);
  margin-top: 2px;
}

/* ---------- compare card ---------- */

.compare {
  position: relative;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-xl);
  corner-shape: squircle;
  overflow: hidden;
  background: #ddd8d0;
  box-shadow: var(--shadow-card);
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-before {
  filter: grayscale(0.45) saturate(0.55) brightness(0.86) contrast(0.86) blur(0.6px);
  clip-path: inset(0 0 0 var(--pos, 54%));
}

/* The real control: a full-bleed range input. Height is stretched to cover
   the whole card so a pointer/touch drag anywhere over the photo works, not
   just a thin strip — the value only ever depends on horizontal position.
   dir="ltr" is forced on the element itself (see index.html) so the value
   maps physically left-to-right regardless of the page's RTL direction,
   matching the physical `left` math used for the clip-path/handle below. */
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.compare-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
}

.compare-range::-moz-range-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.compare-range::-moz-range-track {
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
}

/* Because opacity:0 hides the input's own focus ring too, draw the ring on
   the decorative handle/line siblings instead when the input has focus. */
.compare-range:focus-visible ~ .compare-line,
.compare-range:focus-visible ~ .compare-handle {
  outline: 3px solid var(--color-accent-ink);
  outline-offset: 3px;
}

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  left: var(--pos, 54%);
  transform: translateX(-1px);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  left: var(--pos, 54%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: var(--color-ink);
  font-size: 24px;
}

.compare-badge {
  position: absolute;
  top: 16px;
  background: rgba(23, 21, 18, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.compare-badge.badge-before {
  right: 16px;
}

.compare-badge.badge-after {
  left: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-ink);
}

.compare-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(23, 21, 18, 0.55);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
}

/* ---------- steps ---------- */

.steps-section {
  padding: clamp(64px, 8vw, 120px) 0 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
}

.section-head .section-note {
  font-size: 14px;
  line-height: 1.85;
  color: var(--color-muted);
  max-width: 340px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid rgba(23, 21, 18, 0.06);
  border-radius: var(--radius-lg);
  corner-shape: squircle;
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  corner-shape: squircle;
  background: var(--color-accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 22px;
}

.step-n {
  font-size: 34px;
  font-weight: 900;
  color: rgba(23, 21, 18, 0.1);
  line-height: 1;
}

.step-title {
  font-size: 18px;
  font-weight: 800;
}

.step-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-muted);
}

/* ---------- tools (dark) ---------- */

.tools-section {
  margin-top: clamp(64px, 8vw, 120px);
  background: var(--color-ink);
  color: #fff;
}

.tools-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 104px) var(--container-pad);
}

.tools-head {
  max-width: 560px;
  margin-bottom: 48px;
}

.tools-head .eyebrow-kicker {
  color: var(--color-accent2);
}

.tools-head h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  color: #fff;
  margin: 0 0 16px;
}

.tools-head p {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-dark-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 0;
}

.tool-card {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding: 26px 22px 30px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card .icon {
  font-size: 26px;
  color: var(--color-dark-icon);
}

.tool-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.tool-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--color-dark-muted);
  max-width: 300px;
}

/* ---------- gallery ---------- */

.gallery-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 116px) var(--container-pad) 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  corner-shape: squircle;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #ddd8d0;
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 20px 20px;
  background: linear-gradient(to top, rgba(12, 10, 8, 0.72), transparent);
}

.gallery-style {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.gallery-room {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}

/* ---------- plans ---------- */

.plans-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 116px) var(--container-pad) 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.plans-copy p {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.9;
  color: #6f6a62;
  max-width: 400px;
}

.plans-copy h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 0 0 16px;
}

.gift-card {
  border-radius: var(--radius-lg);
  corner-shape: squircle;
  background: #dfe8e4;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gift-card img {
  width: 120px;
  height: 92px;
  object-fit: contain;
  flex: none;
}

.gift-card-title {
  font-size: 15px;
  font-weight: 800;
}

.gift-card-desc {
  font-size: 13px;
  line-height: 1.7;
  color: #5f6b64;
  margin-top: 3px;
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-row {
  background: var(--color-surface);
  border: 1px solid rgba(23, 21, 18, 0.07);
  border-radius: var(--radius-lg);
  corner-shape: squircle;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.plan-info {
  flex: 1;
  min-width: 0;
}

.plan-name-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.plan-name {
  font-size: 17px;
  font-weight: 800;
}

.plan-note {
  font-size: 13px;
  color: var(--color-muted);
}

.plan-price-wrap {
  flex: none;
  text-align: left;
}

.plan-price {
  font-size: 19px;
  font-weight: 900;
}

.plan-per {
  font-size: 11.5px;
  color: var(--color-muted2);
  margin-top: 2px;
}

/* ---------- faq ---------- */

.faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 116px) var(--container-pad) 0;
}

.faq-section h2 {
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

/* Each FAQ item is a native <details>/<summary> pair: fully keyboard
   operable and functional with JS disabled, with no custom ARIA needed —
   <details>/<summary> carry their own implicit accessibility semantics
   (summary gets an implicit button role and aria-expanded state, the panel
   is only in the accessibility tree while open). main.js only listens for
   the "toggle" event to keep at most one item open at a time; it does not
   own the open/closed state itself. */
.faq-item {
  border-top: 1px solid rgba(23, 21, 18, 0.11);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  color: var(--color-ink);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question-text {
  flex: 1;
  font-size: 16.5px;
  font-weight: 700;
}

.faq-icon-wrap {
  flex: none;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--color-muted);
}

.faq-icon-wrap .icon-remove {
  display: none;
}

.faq-item[open] .faq-icon-wrap .icon-add {
  display: none;
}

.faq-item[open] .faq-icon-wrap .icon-remove {
  display: block;
}

.faq-answer {
  font-size: 14.5px;
  line-height: 1.95;
  color: #6f6a62;
  padding: 0 0 24px;
  max-width: 660px;
}

/* ---------- download (dark) ---------- */

.download-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 110px) var(--container-pad) 0;
}

.download-card {
  position: relative;
  overflow: hidden;
  background: var(--color-ink);
  border-radius: 40px;
  corner-shape: squircle;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
}

.download-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.download-content h2 {
  font-size: clamp(28px, 3.6vw, 46px);
  color: #fff;
  line-height: 1.2;
  margin: 0 0 14px;
}

.download-content p {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-dark-muted);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  max-width: 760px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-dark-2);
  color: #fff;
  border: 0;
  border-radius: var(--radius-md);
  corner-shape: squircle;
  padding: 16px 18px;
  text-align: right;
  cursor: pointer;
}

.store-btn:hover {
  background: var(--color-dark-3);
  color: #fff;
}

.store-btn .icon {
  font-size: 26px;
  color: var(--color-dark-icon);
}

.store-kicker {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
}

.store-label {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
}

.download-bg-photo {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 34%;
  object-fit: cover;
  opacity: 0.5;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.9), transparent);
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.9), transparent);
}

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--container-max);
  margin: 44px auto 0;
  padding: 44px var(--container-pad) 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(23, 21, 18, 0.09);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 16px;
  font-weight: 900;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-muted);
}

.footer-copyright {
  font-size: 12.5px;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .skip-link {
    transition: none;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }
}
