/* ==========================================================================
   Nir Host — core stylesheet
   Design tokens
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap");

:root {
  /* Color */
  --canvas: #f7f7f3;
  --canvas-raised: #ffffff;
  --ink: #16231f;
  --ink-soft: #4b564f;
  --teal: #0f6e56;
  --teal-deep: #0a4e3e;
  --teal-tint: #e4f1ec;
  --coral: #d9714a;
  --border: #deded3;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --content-width: 1120px;
  --radius: 10px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
  font-size: 17px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 500;
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
  color: var(--ink-soft);
}

a {
  color: var(--teal-deep);
  text-decoration-color: rgba(15, 110, 86, 0.35);
}
a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--coral);
  outline-offset: 2px;
}

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

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--canvas-raised);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  min-height: 76px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--teal);
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--teal);
  white-space: nowrap;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 500;
}

.main-nav a[aria-current="page"] {
  color: var(--teal-deep);
}

.nav-only-link {
  display: none;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

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

.hero {
  padding: 76px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow-note {
  font-size: 0.92rem;
  color: var(--teal-deep);
  font-weight: 600;
  margin: 0 0 14px;
}

.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-mark {
  display: flex;
  justify-content: center;
}

/* Trust strip ------------------------------------------------------------ */

.trust-strip {
  background: var(--teal-tint);
  padding: 34px 0;
}

.trust-strip .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trust-item h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-weight: 600;
}
.trust-item p {
  margin: 0;
  font-size: 0.94rem;
}

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

section {
  padding: 72px 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}

/* Meaning / story section --------------------------------------------------- */

.meaning {
  background: var(--ink);
  color: #edefea;
}
.meaning h2,
.meaning p {
  color: #edefea;
}
.meaning .bn {
  font-size: 1.4rem;
  opacity: 0.75;
  font-family: var(--font-display);
}
.meaning p {
  color: #c7cfc9;
}

/* Currency + billing period toggles ---------------------------------------------- */

.amt {
  display: none;
}
.amt-usd.amt-monthly {
  display: inline;
}
body.show-bdt .amt-usd.amt-monthly {
  display: none;
}
body.show-bdt .amt-bdt.amt-monthly {
  display: inline;
}
body.show-yearly .amt-usd.amt-monthly {
  display: none;
}
body.show-yearly .amt-usd.amt-yearly {
  display: inline;
}
body.show-bdt.show-yearly .amt-bdt.amt-monthly {
  display: none;
}
body.show-bdt.show-yearly .amt-usd.amt-yearly {
  display: none;
}
body.show-bdt.show-yearly .amt-bdt.amt-yearly {
  display: inline;
}

.period-yearly {
  display: none;
}
body.show-yearly .period-monthly {
  display: none;
}
body.show-yearly .period-yearly {
  display: inline;
}

.toggle-group {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 3px;
  background: var(--canvas-raised);
}
.toggle-group button {
  border: none;
  background: none;
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--ink-soft);
}
.toggle-group button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Plan cards ------------------------------------------------------------------ */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.plan-card {
  background: var(--canvas-raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.plan-card.is-popular {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.plan-card .badge {
  align-self: flex-start;
  background: var(--coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.plan-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.plan-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin: 10px 0 2px;
  color: var(--ink);
}
.plan-price small {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  flex-grow: 1;
}
.plan-features li {
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.plan-features li:first-child {
  border-top: none;
}

/* Comparison table --------------------------------------------------------------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--canvas-raised);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.compare-table caption {
  text-align: left;
  padding: 16px 20px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 15px;
}
.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-top: 1px solid var(--border);
  font-size: 0.94rem;
}
.compare-table thead th {
  font-family: var(--font-body);
  font-weight: 600;
  border-top: none;
  background: var(--teal-tint);
}
.compare-table td:first-child,
.compare-table th:first-child {
  font-weight: 500;
}

/* FAQ ----------------------------------------------------------------------------- */

.faq-list {
  max-width: 74ch;
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--teal-deep);
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item p {
  margin-top: 12px;
}

/* CTA band ---------------------------------------------------------------------- */

.cta-band {
  background: var(--teal);
  color: #fff;
  text-align: center;
  padding: 64px 0;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: #ddefe8;
  margin-left: auto;
  margin-right: auto;
}
.cta-band .hero-actions {
  justify-content: center;
}
.cta-band .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.cta-band .btn-ghost:hover {
  border-color: #fff;
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--teal-deep);
}
.cta-band .btn-primary:hover {
  background: #edefea;
}

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

.site-footer {
  background: var(--ink);
  color: #c7cfc9;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-grid li {
  margin-bottom: 8px;
}
.footer-grid a {
  color: #c7cfc9;
  font-size: 0.92rem;
  text-decoration: none;
}
.footer-grid a:hover {
  color: #fff;
}

.site-footer .brand span {
  color: #fff;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* Contact form -------------------------------------------------------------------- */

.form-grid {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--canvas-raised);
  color: var(--ink);
}
textarea {
  min-height: 140px;
  resize: vertical;
}

/* Utility ------------------------------------------------------------------------- */

.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;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Domain search -------------------------------------------------------------------- */

.domain-search {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin-bottom: 10px;
}
.domain-search input {
  flex: 1;
  font-size: 1.02rem;
}

.domain-hint {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 28px;
}

.domain-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}
.domain-status-error {
  color: var(--coral);
}

.domain-spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: domain-spin 0.7s linear infinite;
}
@keyframes domain-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .domain-spinner { animation: none; }
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.domain-badge.is-available {
  background: var(--teal-tint);
  color: var(--teal-deep);
}
.domain-badge.is-taken,
.domain-badge.is-unknown {
  background: var(--border);
  color: var(--ink-soft);
}

/* Featured result: the exact domain searched (or .com by default) gets a
   larger, higher-emphasis card above the rest — a flat grid of ten
   identical cards buries the one answer most visitors actually came for. */
.domain-primary {
  background: var(--canvas-raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
}
.domain-primary.is-available {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.domain-primary-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.domain-primary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.domain-primary-price {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.domain-more-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.domain-result {
  background: var(--canvas-raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.domain-result.is-available { border-color: rgba(15, 110, 86, 0.35); }
.domain-result.is-taken .domain-result-name { color: var(--ink-soft); }

.domain-result-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.domain-result-price {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.domain-amt-bdt { display: none; }
body.show-bdt .domain-amt-usd { display: none; }
body.show-bdt .domain-amt-bdt { display: inline; }

/* Compact search prompt embedded on the homepage, deep-links to /domains */
.domain-search-prompt {
  background: var(--teal-tint);
}
.domain-search-prompt form {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}
.domain-search-prompt input {
  flex: 1;
  font-size: 1.02rem;
}

/* Responsive ------------------------------------------------------------------------ */

/* Header nav collapses to a disclosure menu once the full bar (brand + links +
   log in/get started) no longer has room to sit on one line — verified against
   real content width, not a device size. */
@media (max-width: 56em) {
  .main-nav {
    display: none;
    flex-basis: 100%;
    order: 10;
  }
  .main-nav.is-open {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .main-nav.is-open ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav.is-open li {
    border-top: 1px solid var(--border);
  }
  .main-nav.is-open li:first-child {
    border-top: none;
  }
  .main-nav.is-open a {
    display: block;
    padding: 12px 4px;
    font-size: 1.02rem;
  }
  .nav-only-link {
    display: list-item;
  }
  .header-actions .btn-ghost {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}

/* Below this, brand wordmark + "Get started" + toggle no longer fit alongside
   each other — drop the wordmark and keep the mark alone (icon stays labeled
   via aria-label on the link). */
@media (max-width: 26em) {
  .brand span {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-mark {
    order: -1;
    max-width: 260px;
    margin: 0 auto;
  }
  .trust-strip .wrap {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .compare-table {
    display: block;
    overflow-x: auto;
  }
  .domain-search,
  .domain-search-prompt form {
    flex-direction: column;
  }
  .domain-primary {
    flex-direction: column;
    align-items: flex-start;
  }
}
