/* ==========================================================================
   next-domains.com - nd.css
   Self-contained stylesheet for the NEXT domain storefront.
   Mobile-first, works from 360px, 16px side gutter, no horizontal scroll.
   Borrowed from nextfractional.com: Lato, #033D4F headings/header, #E64800
   accent, uppercase bold borderless buttons, #E5E5E5 inputs with an orange
   left border on focus, dark footer, small corner glyph on cards.
   Class prefix "nd-" so a WordPress PHP template can reproduce the markup 1:1.
   ========================================================================== */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* NEXT palette */
  --nd-primary: #033D4F;   /* teal - headings, header, primary buttons */
  --nd-accent:  #E64800;   /* orange - borders, glyphs, focus, hover */
  --nd-plum:    #291528;
  --nd-navy:    #0D1D40;   /* button hover, dark surfaces */
  --nd-mint:    #44FFD2;   /* notice bar, sparing highlights */
  --nd-gray:    #BEBBBB;   /* hairlines, disabled */
  --nd-light:   #E5E5E5;   /* input backgrounds, card borders */
  --nd-ink:     #151314;   /* body text, footer */
  --nd-white:   #FFFFFF;
  --nd-paper:   #F8F8F8;   /* NF alternate-section background */
  --nd-muted:   #4C4C4C;   /* NF footer gray, reused for secondary text (AA on white) */

  /* Type (Lato is NF's font) */
  --nd-font: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nd-text: 1rem;         /* 16px, same as NF body */
  --nd-small: 0.875rem;
  --nd-h1: clamp(1.75rem, 5vw, 2.5rem);    /* 28 -> 40px (NF h1 = 40) */
  --nd-h2: clamp(1.375rem, 3.5vw, 1.875rem);/* 22 -> 30px (NF h2 = 30) */
  --nd-h3: 1.375rem;                        /* 22px (NF h3) */
  --nd-domain: clamp(1.25rem, 4.5vw, 1.6rem); /* card domain name; sized so 20+ character names fit a 3-up card */
  --nd-domain-xl: clamp(2rem, 9vw, 4.5rem); /* listing page domain name */

  /* Layout */
  --nd-gutter: 16px;
  --nd-max: 1100px;
  --nd-space: 1.5rem;
  --nd-section: clamp(2.5rem, 6vw, 4.5rem);
  --nd-radius: 2px;
  --nd-focus: 3px solid var(--nd-accent);
}

/* ---- 2. Reset / base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--nd-font);
  font-size: var(--nd-text);
  line-height: 1.6;
  color: var(--nd-ink);
  background: var(--nd-white);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--nd-primary);
  margin: 0 0 0.5em;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--nd-h1); }
h2 { font-size: var(--nd-h2); }
h3 { font-size: var(--nd-h3); }
p { margin: 0 0 1em; }
a { color: var(--nd-primary); text-decoration: underline; text-decoration-color: var(--nd-accent); text-underline-offset: 0.15em; }
a:hover { color: var(--nd-accent); }
ul { margin: 0 0 1em; padding-left: 1.25em; }
:focus-visible { outline: var(--nd-focus); outline-offset: 2px; }
.nd-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- 3. Layout ---------------------------------------------------------- */
.nd-container {
  width: 100%;
  max-width: var(--nd-max);
  margin: 0 auto;
  padding-left: var(--nd-gutter);
  padding-right: var(--nd-gutter);
}
.nd-section { padding: var(--nd-section) 0; }
.nd-section--alt { background: var(--nd-paper); }
.nd-section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem;
  margin-bottom: var(--nd-space);
}
.nd-section__head h2 { margin: 0; }
.nd-section__count { color: var(--nd-muted); font-size: var(--nd-small); }

.nd-skip {
  position: absolute; left: var(--nd-gutter); top: -3rem;
  background: var(--nd-accent); color: var(--nd-white);
  padding: 0.5rem 1rem; z-index: 100; text-decoration: none;
}
.nd-skip:focus { top: 0.5rem; }

/* ---- 4. Header ---------------------------------------------------------- */
.nd-header {
  background: var(--nd-primary);
  color: var(--nd-white);
  border-bottom: 3px solid var(--nd-accent);
}
.nd-header .nd-container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 56px;
}
/* Wordmark - "NEXT" heavy caps + lighter "domains.com", echoing the NF logo lockup */
.nd-brand {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  color: var(--nd-white); text-decoration: none; white-space: nowrap;
  font-size: 1.125rem; line-height: 1;
}
.nd-brand:hover { color: var(--nd-white); }
.nd-brand__next { font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.nd-brand__rest { font-weight: 400; opacity: 0.9; }
.nd-brand__glyph {
  display: inline-block; width: 0.45em; height: 0.9em;
  background: var(--nd-accent); transform: skew(-20deg);
  margin-right: 0.15em; align-self: center;
}
.nd-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.nd-nav a {
  color: var(--nd-white); text-decoration: none; font-weight: 700;
  font-size: var(--nd-small); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.5rem 0; border-bottom: 2px solid transparent;
}
.nd-nav a:hover, .nd-nav a[aria-current="page"] { border-bottom-color: var(--nd-mint); color: var(--nd-white); }
.nd-nav a:focus-visible { outline-color: var(--nd-mint); }

/* ---- 5. Hero ------------------------------------------------------------ */
.nd-hero { padding: var(--nd-section) 0 calc(var(--nd-section) * 0.75); }
.nd-hero h1 { margin-bottom: 0.4em; }
.nd-hero__lead { font-size: 1.125rem; max-width: 40em; margin-bottom: 1rem; }
.nd-hero__note {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--nd-small); color: var(--nd-primary);
  padding: 0.4rem 0.75rem; border-left: 4px solid var(--nd-accent);
  background: var(--nd-paper);
}

/* ---- 6. Buttons --------------------------------------------------------- */
.nd-btn {
  display: inline-block;
  font-family: inherit; font-size: var(--nd-small); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1;
  padding: 0.9rem 1.4rem; border: 0; border-radius: var(--nd-radius);
  background: var(--nd-primary); color: var(--nd-white);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.nd-btn:hover { background: var(--nd-navy); color: var(--nd-white); }
.nd-btn:active { transform: translateY(1px); }
.nd-btn--outline {
  background: transparent; color: var(--nd-primary);
  box-shadow: inset 0 0 0 2px var(--nd-primary);
}
.nd-btn--outline:hover { background: var(--nd-primary); color: var(--nd-white); }
.nd-btn--accent { background: var(--nd-white); color: var(--nd-primary); box-shadow: inset 0 0 0 2px var(--nd-accent); }
.nd-btn--accent:hover { background: var(--nd-accent); color: var(--nd-white); }
.nd-btn--block { display: block; width: 100%; text-align: center; }
.nd-btn--lg { font-size: var(--nd-text); padding: 1.05rem 1.6rem; }

/* ---- 7. Chips & badges -------------------------------------------------- */
.nd-chip {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1;
  padding: 0.4em 0.7em; border-radius: var(--nd-radius);
  background: var(--nd-light); color: var(--nd-primary); text-decoration: none;
}
a.nd-chip:hover { background: var(--nd-primary); color: var(--nd-white); }
.nd-chip--bundle { background: var(--nd-mint); color: var(--nd-primary); }
.nd-chip--sold { background: var(--nd-gray); color: var(--nd-ink); }

.nd-price {
  display: inline-block; font-weight: 900; font-size: 1.125rem; line-height: 1;
  padding: 0.45em 0.7em; border-radius: var(--nd-radius);
  background: var(--nd-primary); color: var(--nd-white);
  font-variant-numeric: tabular-nums;
}
.nd-price--offer {
  background: var(--nd-white); color: var(--nd-primary);
  box-shadow: inset 0 0 0 2px var(--nd-accent); font-weight: 700; font-size: var(--nd-small);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---- 8. Card grid ------------------------------------------------------- */
.nd-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  list-style: none; margin: 0; padding: 0;
}
.nd-card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--nd-white);
  border: 1px solid var(--nd-light);
  border-radius: var(--nd-radius);
  transition: border-color .2s, box-shadow .2s;
  min-width: 0;
}
/* NF flipbox-style corner glyph, drawn in CSS instead of an image */
.nd-card::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid; border-width: 0 0 18px 18px;
  border-color: transparent transparent var(--nd-accent) transparent;
  opacity: 0.85;
}
.nd-card:hover, .nd-card:focus-within { border-color: var(--nd-primary); box-shadow: 0 4px 16px rgba(3, 61, 79, 0.10); }
.nd-card__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nd-card__name {
  font-size: var(--nd-domain); font-weight: 900; line-height: 1.1;
  letter-spacing: -0.01em; margin: 0;
}
.nd-card__name a { text-decoration: none; color: var(--nd-primary); }
/* Make the whole card clickable without wrapping block content in <a> */
.nd-card__name a::after { content: ""; position: absolute; inset: 0; }
.nd-card:hover .nd-card__name a { color: var(--nd-accent); }
.nd-card__name .nd-plus { font-weight: 400; color: var(--nd-muted); font-size: 0.7em; padding: 0 0.15em; }
.nd-card__pitch { margin: 0; color: var(--nd-muted); }
.nd-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.5rem; }
.nd-card__link { font-size: var(--nd-small); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; }
.nd-card__link::after { content: " \2192"; }

/* ---- 9. Notice (redirect arrival) --------------------------------------- */
.nd-notice {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--nd-mint); color: var(--nd-primary);
  padding: 0.85rem var(--nd-gutter);
  font-weight: 700;
}
.nd-notice p { margin: 0; flex: 1 1 auto; }
.nd-notice code { font-family: inherit; font-weight: 900; }
.nd-notice__close {
  flex: 0 0 auto; appearance: none; border: 0; background: transparent;
  color: var(--nd-primary); font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 0 0.25rem; margin-top: -0.1rem;
}
.nd-notice__close:hover { color: var(--nd-accent); }
.nd-notice[hidden] { display: none; }

/* ---- 10. Listing page --------------------------------------------------- */
.nd-listing__head { padding-top: var(--nd-section); }
.nd-listing__meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.nd-listing__name {
  font-size: var(--nd-domain-xl); font-weight: 900; line-height: 1.05;
  letter-spacing: -0.02em; margin: 0 0 0.35em;
  overflow-wrap: anywhere;
}
.nd-listing__name .nd-tld { color: var(--nd-accent); }
.nd-listing__tagline { font-size: 1.125rem; color: var(--nd-muted); max-width: 40em; }

.nd-listing__body { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: var(--nd-section); }
.nd-prose { max-width: 42em; }
.nd-prose h2 { font-size: var(--nd-h3); margin-top: 1.5em; }
.nd-prose h2:first-child { margin-top: 0; }
.nd-fit { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.nd-fit li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4rem; }
.nd-fit li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.5rem; height: 0.5rem; background: var(--nd-accent); transform: skew(-20deg);
}

/* Price box */
.nd-pricebox {
  border: 1px solid var(--nd-light); border-top: 4px solid var(--nd-accent);
  border-radius: var(--nd-radius); padding: 1.25rem; background: var(--nd-white);
}
.nd-pricebox__label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--nd-muted); margin: 0 0 0.25rem; }
.nd-pricebox__amount { font-size: 2.25rem; font-weight: 900; line-height: 1; color: var(--nd-primary); margin: 0 0 0.25rem; font-variant-numeric: tabular-nums; }
.nd-pricebox__or { margin: 0 0 1rem; color: var(--nd-muted); }
.nd-pricebox .nd-btn { margin-bottom: 0.5rem; }
.nd-pricebox__fine { font-size: 0.8125rem; color: var(--nd-muted); margin: 0.5rem 0 0; }

/* Logo slot */
.nd-logo-slot { margin: 1.5rem 0 0; }
.nd-logo-slot img { border: 1px solid var(--nd-light); padding: 1rem; background: var(--nd-white); }
.nd-logo-slot--empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 140px; border: 2px dashed var(--nd-gray); color: var(--nd-muted);
  font-size: var(--nd-small); padding: 1rem; border-radius: var(--nd-radius);
}
.nd-logo-slot figcaption { font-size: 0.8125rem; color: var(--nd-muted); margin-top: 0.5rem; }

/* ---- 11. Form ----------------------------------------------------------- */
.nd-form { max-width: 40em; }
.nd-form__row { margin-bottom: 1rem; }
.nd-form__grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.nd-form label { display: block; font-weight: 700; margin-bottom: 0.35rem; color: var(--nd-primary); }
.nd-form .nd-optional { font-weight: 400; color: var(--nd-muted); font-size: var(--nd-small); }
.nd-form input, .nd-form textarea, .nd-form select {
  width: 100%; font: inherit; color: var(--nd-ink);
  padding: 0.9rem 1rem; background: var(--nd-light);
  border: 0; border-left: 5px solid transparent; border-radius: var(--nd-radius);
  transition: border-color .2s, background-color .2s;
}
.nd-form input:focus, .nd-form textarea:focus { outline: none; border-left-color: var(--nd-accent); background: #EDEDED; }
.nd-form input:focus-visible, .nd-form textarea:focus-visible { outline: var(--nd-focus); outline-offset: 2px; }
.nd-form input[readonly] { background: var(--nd-paper); color: var(--nd-muted); border-left-color: var(--nd-gray); cursor: not-allowed; }
.nd-form textarea { min-height: 8rem; resize: vertical; }
.nd-form__help { font-size: 0.8125rem; color: var(--nd-muted); margin: 0.3rem 0 0; }
.nd-form__prefix { position: relative; }
.nd-form__prefix span { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--nd-muted); pointer-events: none; }
.nd-form__prefix input { padding-left: 1.9rem; }
/* Cloudflare Turnstile placeholder - the real widget replaces this div */
.nd-turnstile {
  min-height: 65px; width: 100%; max-width: 300px;
  border: 2px dashed var(--nd-gray); border-radius: var(--nd-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; color: var(--nd-muted); text-align: center; padding: 0.5rem;
}
.nd-form__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.nd-form__privacy { font-size: 0.8125rem; color: var(--nd-muted); margin: 0; }

/* ---- 12. Related strip -------------------------------------------------- */
.nd-related .nd-card__name { font-size: 1.25rem; }
.nd-related .nd-card { padding: 1rem 1rem 1.25rem; }

/* ---- 13. Footer --------------------------------------------------------- */
.nd-footer {
  background: var(--nd-ink); color: var(--nd-light);
  padding: 2rem 0; margin-top: var(--nd-section);
  font-size: var(--nd-small);
}
.nd-footer .nd-container { display: flex; flex-direction: column; gap: 0.75rem; }
.nd-footer a { color: var(--nd-white); text-decoration-color: var(--nd-mint); }
.nd-footer a:hover { color: var(--nd-mint); }
.nd-footer a:focus-visible { outline-color: var(--nd-mint); }
.nd-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.nd-footer__copy { margin: 0; color: var(--nd-gray); }

/* ---- 14. Breakpoints ---------------------------------------------------- */
@media (min-width: 600px) {
  .nd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .nd-form__grid { grid-template-columns: 1fr 1fr; }
  .nd-footer .nd-container { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 900px) {
  :root { --nd-gutter: 24px; }
  .nd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-listing__body { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
  .nd-listing__aside { position: sticky; top: 1.5rem; }
  .nd-related .nd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .nd-header, .nd-footer, .nd-notice, .nd-form, .nd-skip { display: none; }
  a { color: inherit; text-decoration: none; }
}

/* ---- Contact Form 7 integration (the inquiry form is CF7 markup inside .nd-form) ---- */
.nd-form .wpcf7-form-control-wrap { display: block; }
.nd-form input[type="submit"] { width: auto; background: var(--nd-primary); color: var(--nd-white); border: 0; border-left: 0; cursor: pointer; }
.nd-form input[type="submit"]:hover { background: var(--nd-navy, #0D1D40); }
.nd-form .wpcf7-not-valid-tip { color: #B3261E; font-size: 0.8125rem; margin-top: 0.3rem; }
.nd-form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.75rem 1rem; border: 0; border-left: 5px solid var(--nd-primary); background: var(--nd-light); }
.nd-form .wpcf7-spinner { margin: 0 0 0 0.75rem; }
.nd-form .wpcf7-turnstile { margin: 0.5rem 0 1rem; }

/* ---- Domain names never wrap (David, 26-Oct-2026) ----
   Each name sits on one line and its font shrinks to fit the box. Templates set --len (the name's character
   count) on the element; 0.6em is Lato 900's average glyph width with a little slack. Bundles stack one name
   per line. */
.nd-card, .nd-listing__head .nd-container { container-type: inline-size; }
.nd-dn { display: block; white-space: nowrap; }
.nd-card__name .nd-dn { font-size: min(var(--nd-domain), calc(100cqi / (var(--len) * 0.6))); }
.nd-card__name .nd-plus { display: block; line-height: 1; }
.nd-listing__name { overflow-wrap: normal; }
.nd-listing__name .nd-dn { font-size: min(var(--nd-domain-xl), calc(100cqi / (var(--len) * 0.6))); }
/* Narrow phones: keep the header on one line. */
.nd-nav a { white-space: nowrap; }
@media (max-width: 479px) {
  .nd-nav ul { gap: 0.75rem; }
  .nd-nav a { font-size: 0.75rem; letter-spacing: 0.04em; }
  .nd-brand__rest { font-size: 0.85em; }
}
