/* DomainKit - Terminal/ASCII Aesthetic */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

:root {
  --bg: #0a0a0b;
  --bg-lighter: #111113;
  --text: #fafafa;
  --text-muted: #888;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --taken: #ff4444;
  --border: #333;
}

html {
  font-size: 14px;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 80ch;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  font-size: 1rem;
  color: var(--text);
}

nav a {
  color: var(--text-muted);
  margin-left: 2ch;
}

nav a:hover {
  color: var(--text);
}

/* ASCII Boxes */
pre {
  font-size: 1rem;
  line-height: 1.4;
  overflow-x: auto;
}

.ascii-hero {
  padding: 2rem 0;
  text-align: center;
}

.ascii-hero pre {
  display: inline-block;
  text-align: left;
  margin: 0 auto;
}

.ascii-hero .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* Buttons as terminal commands */
.btn-row {
  display: flex;
  gap: 2ch;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-lighter);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover {
  background: var(--border);
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections */
section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 1rem;
  font-weight: normal;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

/* Live Demo */
.demo-section {
  background: var(--bg-lighter);
}

.demo-form {
  display: flex;
  gap: 1ch;
  margin-bottom: 1.5rem;
}

.demo-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.demo-input:focus {
  outline: none;
  border-color: var(--accent);
}

.demo-input::placeholder {
  color: var(--text-muted);
}

/* Results - terminal style */
.demo-results {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
  min-height: 8rem;
}

.demo-results pre {
  margin: 0;
}

.result-available {
  color: var(--accent);
}

.result-taken {
  color: var(--taken);
}

.result-loading {
  color: var(--text-muted);
}

/* Features as ASCII */
.features-ascii pre {
  margin-bottom: 2rem;
}

/* Footer */
footer {
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--text);
}

/* ===========================================
   MOBILE RESPONSIVE - ASCII Art Fixes
   =========================================== */

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Desktop/Mobile ASCII toggles */
.ascii-desktop {
  display: block;
}

.ascii-mobile {
  display: none;
}

/* Tablet (768px) */
/* Tablet (768px) */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  pre {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* Mobile - iPhone 12/13/14 optimized (390px logical width) */
/* Using 14-16px as optimal mobile reading size */
@media (max-width: 480px) {
  html {
    font-size: 16px;  /* 40% bigger than 12px */
  }
  
  /* Switch to mobile ASCII */
  .ascii-desktop {
    display: none !important;
  }
  
  .ascii-mobile {
    display: block !important;
  }
  
  /* ASCII art sized to fit ~50 chars on iPhone (390px / 7.8px per char) */
  pre {
    font-size: 14px;  /* 40% bigger than 10px */
    line-height: 1.3;
  }
  
  /* Mobile ASCII hero - compact, one line */
  .ascii-hero pre {
    font-size: 11px;  /* Larger since we're using compact ASCII */
    line-height: 1.2;
    text-align: center;
  }
  
  .ascii-hero .tagline {
    font-size: 1rem;
    margin-top: 1rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .ascii-hero {
    padding: 1.5rem 0;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .demo-form {
    flex-direction: column;
  }
  
  .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .btn-row .btn {
    width: 100%;
    text-align: center;
  }
  
  header .container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  nav a {
    margin-left: 0;
  }
  
  nav a:first-child {
    margin-left: 0;
  }
}

/* Very small devices (360px) */
/* Small phones - iPhone SE (375px) and smaller */
@media (max-width: 375px) {
  pre {
    font-size: 12px;
    line-height: 1.25;
  }
  
  /* ASCII hero - slightly smaller for SE */
  .ascii-hero pre {
    font-size: 10px;
    line-height: 1.15;
  }
  
  .container {
    padding: 0 0.5rem;
  }
}

/* Code blocks */
code {
  background: var(--bg-lighter);
  padding: 0.2em 0.4em;
  border-radius: 2px;
}

/* Docs layout */
.docs-layout {
  display: grid;
  grid-template-columns: 20ch 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

.docs-nav {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}

.docs-nav a {
  display: block;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.docs-nav a:hover,
.docs-nav a.active {
  color: var(--text);
}

.docs-content {
  max-width: 60ch;
}

.docs-content h1 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.docs-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}

.docs-content p {
  margin-bottom: 1rem;
}

.docs-content pre {
  background: var(--bg-lighter);
  padding: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  
  .docs-nav {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  
  .docs-content pre {
    font-size: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
