@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

html {
  overflow-y: scroll;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #111111;
  background: #ffffff;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111111;
}

.header-tool-name {
  font-weight: 600;
  font-size: 15px;
  color: #111111;
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  font-size: 14px;
  color: #888888;
  text-decoration: none;
  transition: color 0.15s;
}

.header-nav a:hover {
  color: #111111;
}

.header-nav a[aria-current="page"] {
  color: #111111;
  font-weight: 500;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #111111;
  border-radius: 2px;
  display: block;
  transition: all 0.2s ease;
}

/* Hamburger → X */
.site-header.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}
.site-header.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 20px 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-copy {
  font-size: 13px;
  color: #888888;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  font-size: 13px;
  color: #888888;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: #111111;
}

/* ── Main content ── */
main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── Typography ── */
h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

p {
  font-size: 15px;
  line-height: 1.65;
  color: #333333;
}

.subtitle {
  font-size: 15px;
  color: #555555;
  margin-bottom: 40px;
  line-height: 1.5;
}

/* ── Tool area ── */
.tool-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.textarea-wrap {
  position: relative;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #111111;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.55;
}

textarea:focus {
  border-color: #111111;
}

textarea::placeholder {
  color: #aaaaaa;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: #888888;
  margin-top: 4px;
}

/* ── Dropdowns row ── */
.dropdowns-row {
  display: flex;
  gap: 12px;
}

.dropdown-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dropdown-wrap label {
  font-size: 12px;
  font-weight: 500;
  color: #555555;
  letter-spacing: 0.02em;
}

select {
  width: 100%;
  padding: 9px 32px 9px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #111111;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

select:focus {
  border-color: #111111;
}

/* ── Button row ── */
.button-row {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  height: 42px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px #111111;
}

.btn-outline {
  background: #ffffff;
  color: #111111;
  border: 1px solid #111111;
}

.btn-outline:hover:not(:disabled) {
  background: #f5f5f5;
}

.btn-filled {
  background: #111111;
  color: #ffffff;
  border: 1px solid #111111;
}

.btn-filled:hover:not(:disabled) {
  background: #333333;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Status ── */
.status-text {
  font-size: 13px;
  color: #888888;
  min-height: 18px;
}

.status-text.error {
  color: #cc0000;
}

.status-text.success {
  color: #116611;
}

/* ── Player button (used in dynamically created audio cards) ── */
.player-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.player-btn:hover {
  background: #f0f0f0;
}

.player-btn:focus-visible {
  outline: 2px solid #111111;
}

.player-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.player-btn svg {
  display: block;
}

/* ── About page ── */
.content-section {
  margin-bottom: 36px;
}

.content-section p {
  margin-top: 8px;
}

/* ── Contact form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: #555555;
}

.form-field input,
.form-field textarea {
  min-height: unset;
  resize: vertical;
}

.form-field textarea {
  min-height: 120px;
}

.form-status {
  font-size: 14px;
  color: #888888;
  min-height: 20px;
}

.form-status.success {
  color: #116611;
}

.form-status.error {
  color: #cc0000;
}

/* ── Privacy / Terms pages ── */
.privacy-body h2,
.terms-body h2 {
  margin-top: 32px;
  margin-bottom: 6px;
}

.privacy-body p,
.terms-body p {
  margin-bottom: 10px;
}

.privacy-body ul,
.terms-body ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 4px;
}

.privacy-body ul li,
.terms-body ul li {
  font-size: 15px;
  line-height: 1.65;
  color: #333333;
  margin-bottom: 4px;
}

.privacy-body a,
.terms-body a {
  color: #111111;
}

.last-updated {
  font-size: 13px;
  color: #888888;
  margin-bottom: 32px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  /* Hamburger visible, nav hidden */
  .hamburger {
    display: flex;
  }

  .header-nav {
    display: none;
  }

  /* Mobile nav open */
  .site-header.nav-open .header-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 24px;
    gap: 16px;
    z-index: 99;
  }

  .site-header.nav-open .header-nav a {
    font-size: 15px;
    color: #111111;
  }

  /* Footer stacks */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    gap: 12px;
  }

  /* Tool area */
  main {
    padding: 32px 16px 56px;
  }

  h1 {
    font-size: 24px;
  }

  .dropdowns-row {
    flex-direction: column;
  }

  .button-row {
    flex-direction: column;
  }

  .btn {
    flex: none;
    width: 100%;
  }
}
