/* OfficeKits — shared styles */

:root {
  --color-bg: #f6f8fb;
  --color-surface: #ffffff;
  --color-text: #1a2332;
  --color-text-muted: #5c6b7f;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-border: #e2e8f0;
  --color-accent: #0ea5e9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --font-sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --max-width: 1120px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f1f5f9;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.lang-switch--mobile {
  display: none;
  margin-top: 0.75rem;
  width: fit-content;
}

.lang-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  border-radius: 1px;
}

/* Main */
main {
  flex: 1;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: #f8fafc;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tool-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card.is-disabled {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.tool-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.tool-card p {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tool-tag {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 6px;
}

.tool-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.tool-status.is-live {
  color: #059669;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* Content pages */
.page-hero {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--color-text-muted);
}

.content-card {
  max-width: 48rem;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p,
.content-card li {
  color: var(--color-text-muted);
}

.content-card ul,
.content-card ol {
  padding-left: 1.25rem;
}

.content-card .updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.contact-info {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.footer-brand strong {
  font-size: 1.05rem;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-nav a:hover {
  color: var(--color-primary);
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Ad placeholder — insert AdSense unit after approval */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 2rem auto;
  max-width: 728px;
  background: #f1f5f9;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.ad-slot[data-hidden="true"] {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .lang-switch:not(.lang-switch--mobile) {
    display: none;
  }

  .lang-switch--mobile {
    display: inline-flex;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .content-card {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand nav"
      "copy copy";
    text-align: left;
    align-items: start;
  }

  .footer-brand {
    grid-area: brand;
  }

  .footer-nav {
    grid-area: nav;
    justify-content: flex-end;
  }

  .footer-copy {
    grid-area: copy;
    text-align: center;
  }
}
