/*
Theme Name: T4 Theme
Theme URI: https://tropic4.com
Author: Tropic Software
Author URI: https://tropic4.com
Description: 트로픽 소프트웨어 사이트 커스텀 테마
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: t4
*/

:root {
  --t4-teal: #0d8b8e;
  --t4-teal-deep: #075e60;
  --t4-coral: #e57a5a;
  --t4-coral-soft: #f4a58a;
  --t4-cream: #f6f1e6;
  --t4-cream-mist: #eee7d5;
  --t4-graphite: #2a2f36;
  --t4-slate: #6d7480;
  --t4-line: #d8d2c1;
  --t4-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --t4-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --t4-fs-base: 1rem;
  --t4-fs-sm: 0.875rem;
  --t4-fs-md: 1.125rem;
  --t4-fs-lg: 1.375rem;
  --t4-fs-xl: 1.75rem;
  --t4-fs-2xl: 2.25rem;
  --t4-fs-3xl: 2.875rem;
  --t4-fs-4xl: 3.75rem;
  --t4-lh-tight: 1.2;
  --t4-lh-body: 1.7;
  --t4-lh-relaxed: 1.85;
  --t4-space-2: 1rem;
  --t4-space-3: 1.5rem;
  --t4-space-4: 2rem;
  --t4-space-5: 3rem;
  --t4-space-6: 4rem;
  --t4-space-7: 5.5rem;
  --t4-radius-sm: 6px;
  --t4-radius-md: 12px;
  --t4-radius-lg: 18px;
  --t4-shadow-flat: 0 1px 3px rgba(42, 47, 54, 0.08);
  --t4-shadow-lift: 0 10px 30px rgba(42, 47, 54, 0.10);
  --t4-container-max: 1180px;
  --t4-transition-base: 0.22s ease-out;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--t4-cream);
  color: var(--t4-graphite);
  font-family: var(--t4-sans);
  font-size: var(--t4-fs-base);
  line-height: var(--t4-lh-body);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--t4-sans);
  font-weight: 700;
  line-height: var(--t4-lh-tight);
  margin: 0 0 var(--t4-space-3);
  color: var(--t4-graphite);
  letter-spacing: -0.015em;
}

h1 { font-size: var(--t4-fs-4xl); }
h2 { font-size: var(--t4-fs-3xl); }
h3 { font-size: var(--t4-fs-2xl); }
h4 { font-size: var(--t4-fs-xl); }
h5 { font-size: var(--t4-fs-lg); }
h6 { font-size: var(--t4-fs-md); }

p, li { line-height: var(--t4-lh-body); }
p { margin: 0 0 var(--t4-space-3); }

code, pre, .t4-mono {
  font-family: var(--t4-mono);
  font-size: 0.94em;
}

code {
  background: var(--t4-cream-mist);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  color: var(--t4-teal-deep);
}

pre {
  background: var(--t4-graphite);
  color: var(--t4-cream);
  padding: var(--t4-space-3);
  border-radius: var(--t4-radius-md);
  overflow-x: auto;
  margin: var(--t4-space-3) 0;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

a {
  color: var(--t4-teal);
  text-decoration: underline;
  text-decoration-color: var(--t4-coral-soft);
  text-underline-offset: 3px;
  transition: color var(--t4-transition-base);
}

a:hover,
a:focus-visible {
  color: var(--t4-coral);
  text-decoration-color: var(--t4-teal);
}

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

.t4-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--t4-graphite);
  color: var(--t4-cream);
  padding: var(--t4-space-2) var(--t4-space-3);
  z-index: 999;
  text-decoration: none;
}

.t4-skip-link:focus { top: 0; color: var(--t4-cream); }

.t4-container {
  width: 100%;
  max-width: var(--t4-container-max);
  margin: 0 auto;
  padding: 0 var(--t4-space-3);
}

.t4-header {
  background: var(--t4-cream);
  border-bottom: 1px solid var(--t4-line);
}

.t4-header-top {
  padding: var(--t4-space-3) 0 var(--t4-space-2);
}

.t4-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--t4-space-3);
}

.t4-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

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

.t4-logo-mark { width: 40px; height: 40px; }

.t4-logo-name {
  font-family: var(--t4-sans);
  font-size: var(--t4-fs-lg);
  font-weight: 700;
  color: var(--t4-graphite);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.t4-logo-tag {
  font-family: var(--t4-mono);
  font-size: 0.72rem;
  color: var(--t4-slate);
  letter-spacing: 0.04em;
  display: block;
  margin-top: 0.15rem;
}

.t4-header-meta {
  font-family: var(--t4-mono);
  font-size: 0.78rem;
  color: var(--t4-slate);
  letter-spacing: 0.02em;
}

.t4-header-nav {
  border-top: 1px dashed var(--t4-line);
  padding: 0.65rem 0;
}

.t4-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--t4-space-4);
  flex-wrap: wrap;
}

.t4-nav-link {
  color: var(--t4-graphite);
  font-family: var(--t4-sans);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.35rem 0;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--t4-transition-base), border-color var(--t4-transition-base);
}

.t4-nav-link:hover,
.t4-nav-link:focus-visible,
.t4-nav-link.is-current {
  color: var(--t4-teal);
  border-color: var(--t4-coral);
  text-decoration: none;
}

.t4-nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--t4-graphite);
  cursor: pointer;
  padding: 0.4rem;
}

.t4-hero {
  padding: var(--t4-space-7) 0 var(--t4-space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.t4-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(13, 139, 142, 0.10) 0, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(229, 122, 90, 0.10) 0, transparent 40%);
  pointer-events: none;
}

.t4-hero-inner {
  position: relative;
  z-index: 1;
}

.t4-hero-eyebrow {
  font-family: var(--t4-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--t4-teal);
  margin-bottom: var(--t4-space-3);
  display: inline-block;
}

.t4-hero h1 {
  font-size: clamp(2.4rem, 6vw, var(--t4-fs-4xl));
  margin: 0 auto var(--t4-space-3);
  max-width: 780px;
  letter-spacing: -0.02em;
}

.t4-hero-lede {
  font-size: var(--t4-fs-md);
  color: var(--t4-slate);
  max-width: 620px;
  margin: 0 auto var(--t4-space-4);
}

.t4-hero-actions {
  display: flex;
  gap: var(--t4-space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--t4-space-6);
}

.t4-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--t4-teal);
  color: var(--t4-cream);
  font-family: var(--t4-sans);
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: var(--t4-radius-sm);
  text-decoration: none;
  transition: background var(--t4-transition-base);
  border: 0;
  cursor: pointer;
}

.t4-btn:hover,
.t4-btn:focus-visible {
  background: var(--t4-teal-deep);
  color: var(--t4-cream);
  text-decoration: none;
}

.t4-btn-ghost {
  background: transparent;
  color: var(--t4-graphite);
  border: 1px solid var(--t4-line);
}

.t4-btn-ghost:hover,
.t4-btn-ghost:focus-visible {
  background: var(--t4-cream-mist);
  color: var(--t4-graphite);
}

.t4-featured-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--t4-space-3);
  max-width: 900px;
  margin: 0 auto;
}

.t4-app-card {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-md);
  padding: var(--t4-space-3);
  text-align: left;
  transition: border-color var(--t4-transition-base), box-shadow var(--t4-transition-base), transform var(--t4-transition-base);
}

.t4-app-card:hover {
  border-color: var(--t4-teal);
  box-shadow: var(--t4-shadow-lift);
  transform: translateY(-2px);
}

.t4-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--t4-teal), var(--t4-coral));
  display: grid;
  place-items: center;
  color: var(--t4-cream);
  font-family: var(--t4-mono);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: var(--t4-space-2);
}

.t4-app-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t4-graphite);
  margin: 0 0 0.3rem;
}

.t4-app-tag {
  font-family: var(--t4-mono);
  font-size: 0.74rem;
  color: var(--t4-slate);
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.t4-app-desc {
  color: var(--t4-slate);
  font-size: 0.92rem;
  margin: 0;
}

.t4-section {
  padding: var(--t4-space-7) 0;
}

.t4-section.is-mist { background: var(--t4-cream-mist); }

.t4-section-head {
  max-width: 780px;
  margin: 0 auto var(--t4-space-5);
}

.t4-section-head.is-center { text-align: center; }

.t4-section-eyebrow {
  font-family: var(--t4-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--t4-coral);
  display: block;
  margin-bottom: var(--t4-space-2);
}

/* Bento grid: 2+1 / 1+2 mixed */
.t4-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--t4-space-3);
}

.t4-bento-reverse {
  grid-template-columns: 1fr 2fr;
}

.t4-bento-cell {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-md);
  padding: var(--t4-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--t4-space-2);
  min-height: 200px;
  transition: border-color var(--t4-transition-base), box-shadow var(--t4-transition-base);
}

.t4-bento-cell:hover {
  border-color: var(--t4-teal);
  box-shadow: var(--t4-shadow-lift);
}

.t4-bento-cell-icon {
  width: 36px;
  height: 36px;
  color: var(--t4-teal);
}

.t4-bento-cell h3 {
  font-size: var(--t4-fs-xl);
  margin: 0;
}

.t4-bento-cell p {
  color: var(--t4-slate);
  margin: 0;
  flex: 1;
}

.t4-bento-cell-link {
  font-family: var(--t4-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--t4-teal);
  text-decoration: none;
  letter-spacing: 0.06em;
  margin-top: auto;
}

.t4-bento-cell-link::before { content: "→ "; }

.t4-bento-cell-link:hover,
.t4-bento-cell-link:focus-visible {
  color: var(--t4-coral);
  text-decoration: none;
}

.t4-reveal {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.t4-reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.t4-article {
  padding: var(--t4-space-6) 0;
}

.t4-article-head {
  max-width: 800px;
  margin: 0 auto var(--t4-space-5);
}

.t4-article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: var(--t4-fs-md);
  line-height: var(--t4-lh-relaxed);
}

.t4-article-body h2 { margin-top: var(--t4-space-6); }
.t4-article-body h3 { margin-top: var(--t4-space-5); }

.t4-article-body ul,
.t4-article-body ol { padding-left: 1.5rem; }

.t4-article-body li { margin-bottom: 0.5rem; }

.t4-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--t4-space-3) 0;
  font-size: 0.98rem;
}

.t4-article-body th,
.t4-article-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--t4-line);
}

.t4-article-body th {
  background: var(--t4-cream-mist);
  color: var(--t4-graphite);
  font-weight: 600;
}

.t4-breadcrumb {
  font-family: var(--t4-mono);
  font-size: 0.8rem;
  color: var(--t4-slate);
  margin-bottom: var(--t4-space-3);
  letter-spacing: 0.03em;
}

.t4-breadcrumb a { color: var(--t4-teal); text-decoration: none; }
.t4-breadcrumb a:hover,
.t4-breadcrumb a:focus-visible { color: var(--t4-coral); }

.t4-breadcrumb span[aria-hidden] { margin: 0 0.55rem; color: var(--t4-line); }

.t4-faq {
  max-width: 820px;
  margin: 0 auto;
}

.t4-faq-item {
  border-bottom: 1px solid var(--t4-line);
  padding: var(--t4-space-3) 0;
}

.t4-faq-item h3 {
  font-size: var(--t4-fs-lg);
  margin-bottom: var(--t4-space-2);
}

.t4-legacy-card {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-md);
  padding: var(--t4-space-4);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--t4-space-3);
  align-items: start;
}

.t4-legacy-card + .t4-legacy-card { margin-top: var(--t4-space-3); }

.t4-legacy-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--t4-teal-deep);
  display: grid;
  place-items: center;
  color: var(--t4-cream);
  font-family: var(--t4-mono);
  font-weight: 700;
  font-size: 1.5rem;
}

.t4-legacy-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--t4-graphite);
}

.t4-legacy-year {
  font-family: var(--t4-mono);
  font-size: 0.76rem;
  color: var(--t4-slate);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.t4-footer {
  background: var(--t4-graphite);
  color: var(--t4-cream-mist);
  padding: var(--t4-space-6) 0 var(--t4-space-4);
  font-size: 0.94rem;
}

.t4-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--t4-space-5);
  margin-bottom: var(--t4-space-5);
}

.t4-footer-signature {
  font-family: var(--t4-sans);
  font-size: 1.4rem;
  color: var(--t4-cream);
  margin-bottom: var(--t4-space-2);
  letter-spacing: -0.01em;
}

.t4-footer-tag {
  font-family: var(--t4-mono);
  font-size: 0.78rem;
  color: var(--t4-coral-soft);
  letter-spacing: 0.06em;
  margin-bottom: var(--t4-space-3);
}

.t4-footer-links {
  columns: 2;
  column-gap: var(--t4-space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.t4-footer-links li { break-inside: avoid; margin-bottom: 0.4rem; }

.t4-footer-links a {
  color: var(--t4-cream-mist);
  text-decoration: none;
}

.t4-footer-links a:hover,
.t4-footer-links a:focus-visible { color: var(--t4-coral-soft); }

.t4-footer-bottom {
  border-top: 1px solid rgba(246, 241, 230, 0.1);
  padding-top: var(--t4-space-3);
  color: var(--t4-slate);
  font-family: var(--t4-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  gap: var(--t4-space-3);
  flex-wrap: wrap;
}

.t4-form {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: var(--t4-space-3);
}

.t4-form-field { display: grid; gap: 0.4rem; }

.t4-form label {
  font-family: var(--t4-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--t4-graphite);
  letter-spacing: 0.03em;
}

.t4-form input,
.t4-form textarea,
.t4-form select {
  font-family: var(--t4-sans);
  font-size: 0.98rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-sm);
  background: #fff;
  color: var(--t4-graphite);
  transition: border-color var(--t4-transition-base);
}

.t4-form input:focus,
.t4-form textarea:focus,
.t4-form select:focus {
  outline: 0;
  border-color: var(--t4-teal);
}

.t4-form textarea { min-height: 160px; resize: vertical; }

.t4-form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.t4-notice {
  padding: var(--t4-space-3);
  background: rgba(13, 139, 142, 0.12);
  border-left: 3px solid var(--t4-teal);
  border-radius: var(--t4-radius-sm);
  color: var(--t4-graphite);
}

.t4-contact-direct {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-md);
  padding: var(--t4-space-3) var(--t4-space-4);
  max-width: 640px;
  margin: 0 auto var(--t4-space-4);
  display: flex;
  gap: var(--t4-space-3);
  align-items: center;
  flex-wrap: wrap;
}

.t4-contact-direct-label {
  font-family: var(--t4-mono);
  font-size: 0.78rem;
  color: var(--t4-slate);
  letter-spacing: 0.06em;
}

.t4-contact-direct-email {
  font-family: var(--t4-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--t4-teal);
  text-decoration: none;
  flex: 1;
}

.t4-contact-direct-email:hover,
.t4-contact-direct-email:focus-visible { color: var(--t4-coral); text-decoration: none; }

.t4-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--t4-space-3);
  margin-top: var(--t4-space-4);
}

.t4-post-card {
  background: #fff;
  border: 1px solid var(--t4-line);
  border-radius: var(--t4-radius-md);
  padding: var(--t4-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--t4-space-2);
  transition: border-color var(--t4-transition-base), box-shadow var(--t4-transition-base);
}

.t4-post-card:hover {
  border-color: var(--t4-teal);
  box-shadow: var(--t4-shadow-lift);
}

.t4-post-card-eyebrow {
  font-family: var(--t4-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--t4-coral);
}

.t4-post-card h3 {
  font-size: var(--t4-fs-lg);
  margin: 0;
  line-height: 1.35;
}

.t4-post-card h3 a { color: var(--t4-graphite); text-decoration: none; }
.t4-post-card h3 a:hover,
.t4-post-card h3 a:focus-visible { color: var(--t4-teal); }

.t4-post-card-excerpt { color: var(--t4-slate); margin: 0; font-size: 0.94rem; }

.t4-post-meta {
  font-family: var(--t4-mono);
  font-size: 0.76rem;
  color: var(--t4-slate);
  margin: 0;
  letter-spacing: 0.03em;
}

.t4-post-meta-eyebrow {
  font-family: var(--t4-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--t4-coral);
  display: block;
  margin-bottom: var(--t4-space-2);
}

.t4-archive { padding: var(--t4-space-6) 0; }

.t4-archive-desc {
  max-width: 720px;
  margin: var(--t4-space-3) auto 0;
  color: var(--t4-slate);
}

@media (max-width: 900px) {
  .t4-nav {
    position: fixed;
    inset: 0 0 auto 0;
    background: var(--t4-cream);
    flex-direction: column;
    padding: 5rem var(--t4-space-3) var(--t4-space-4);
    gap: var(--t4-space-3);
    transform: translateY(-100%);
    transition: transform var(--t4-transition-base);
    border-bottom: 1px solid var(--t4-line);
    z-index: 90;
  }
  .t4-nav.is-open { transform: translateY(0); }
  .t4-nav-toggle { display: inline-flex; }
  .t4-featured-apps { grid-template-columns: 1fr; max-width: 480px; }
  .t4-bento,
  .t4-bento-reverse { grid-template-columns: 1fr; }
  .t4-footer-grid { grid-template-columns: 1fr; }
  .t4-post-grid { grid-template-columns: 1fr; }
  .t4-header-nav { border-top-color: transparent; }
}

@media (max-width: 600px) {
  :root {
    --t4-fs-3xl: 2rem;
    --t4-fs-4xl: 2.5rem;
  }
  .t4-section { padding: var(--t4-space-5) 0; }
  .t4-footer-links { columns: 1; }
  .t4-footer-bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .t4-reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  * { transition: none; animation: none; }
}
