/* ==========================================================================
   Iceworks — Redesign Stylesheet
   Clean, modern, simple.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --bg-soft-2: #eef4fa;
  --text: #0f172a;
  --text-muted: #5b6472;
  --text-faint: #8a94a3;
  --border: #e6ebf1;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  --gradient: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 55%, #0284c7 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 12px 28px rgba(14, 165, 233, 0.16);
  --container: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.12);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-mark img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: inherit;
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover { background: var(--bg-soft-2); color: var(--text); }
.nav-links a.active { color: var(--primary-dark); background: var(--bg-soft-2); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(60% 60% at 15% 0%, rgba(14,165,233,0.10) 0%, rgba(14,165,233,0) 70%),
    radial-gradient(50% 60% at 100% 10%, rgba(56,189,248,0.10) 0%, rgba(56,189,248,0) 70%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft-2);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 800;
}

.hero p.lead {
  max-width: 560px;
  margin: 0 auto 22px;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.platform-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 34px;
}

.platform-strip span,
.platform-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); transform: translateY(-2px); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- Sections ---------- */

section { padding: 72px 0; }
.section-alt { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  font-weight: 800;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.page-head {
  padding: 64px 0 8px;
  text-align: center;
}
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--text-muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto; }

/* ---------- App filters ---------- */

.app-filter { max-width: 1120px; margin: 0 auto 24px; }
.app-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-toggle { padding: 10px 18px; }
.filter-toggle span { font-size: 0.9rem; }
.filter-result { color: var(--text-muted); font-size: 0.9rem; }
.filter-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.filter-options[hidden] { display: none; }
.filter-option-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.filter-option-list label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 0.9rem; cursor: pointer; }
.filter-option-list input { width: 16px; height: 16px; accent-color: var(--primary-dark); }
.filter-reset { flex-shrink: 0; padding: 6px 0; border: 0; background: transparent; color: var(--primary-dark); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.filter-reset:hover { text-decoration: underline; }
.app-card.is-hidden { display: none; }
@media (max-width: 600px) {
  .filter-options { align-items: flex-start; flex-direction: column; }
  .filter-reset { padding-top: 0; }
}

/* ---------- Category cards (home) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 720px) { .category-grid { grid-template-columns: 1fr; } }

.category-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }

.category-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.category-card h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.01em; }
.category-card p { margin: 0 0 20px; color: var(--text-muted); }
.category-card .link { color: var(--primary-dark); font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }
.category-card .link:hover { text-decoration: underline; }

/* ---------- Value props ---------- */

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: center;
}
@media (max-width: 780px) { .values-grid { grid-template-columns: 1fr; } }

.value-item .value-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg-soft-2);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 16px;
}
.value-item h3 { font-size: 1.05rem; margin: 0 0 8px; }
.value-item p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---------- App / Plugin cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.app-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.app-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.app-icon-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-grid .app-icon-wrap {
  width: 118px;
  height: 176px;
  border-radius: 18px;
  background: var(--bg-soft);
}

.app-grid .app-icon-wrap.landscape-shot {
  width: 176px;
  height: 82px;
}

.app-grid .app-icon-wrap.square-shot {
  width: 118px;
  height: 118px;
  border-radius: 26px;
}

.plugin-grid .app-icon-wrap {
  width: 176px;
  height: 88px;
  border-radius: 18px;
  background: var(--bg-soft);
}

.app-card h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.app-card p { margin: 0 0 22px; color: var(--text-muted); font-size: 0.96rem; flex-grow: 1; }

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.platform-badges span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 0.72rem;
}

.platform-badges span.muted {
  border-color: var(--border);
  color: var(--text-faint);
  background: var(--bg-soft);
}

/* ---------- CTA strip ---------- */

.cta-strip {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}
.cta-strip h2 { margin: 0 0 10px; font-size: 1.7rem; letter-spacing: -0.01em; }
.cta-strip p { margin: 0 0 28px; opacity: 0.92; }
.cta-strip .btn-outline { background: #fff; border-color: transparent; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card, .form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.contact-method:first-of-type { border-top: none; }
.contact-method .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-soft-2); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-method a { font-weight: 600; }
.contact-method a:hover { color: var(--primary-dark); }
.contact-method span.label { display: block; font-size: 0.82rem; color: var(--text-faint); margin-bottom: 2px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.96rem;
  background: var(--bg-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }

.field textarea::placeholder { color: var(--text-faint); }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 24px; margin: 14px 0 0; color: var(--text-muted); font-size: 0.9rem; }
.form-status a, .admin-status a { color: var(--primary-dark); font-weight: 600; }
button:disabled { cursor: wait; opacity: 0.65; }

.form-note {
  color: var(--text-muted);
  margin: 0 0 22px;
}

.feedback-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #7c5a10;
  font-size: 0.86rem;
  line-height: 1.5;
}
.feedback-note-icon { flex-shrink: 0; line-height: 1.45; }
.feedback-note p { margin: 0; }
.feedback-note strong { color: #654a0b; }
.feedback-note a { color: #8a6200; font-weight: 700; }
.feedback-note a:hover { text-decoration: underline; }

.feedback-standalone { background: var(--bg-soft); }
.feedback-shell { width: 100%; max-width: 680px; margin: 0 auto; padding: 32px 20px; }
.feedback-panel { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.feedback-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
.feedback-heading-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--bg-soft-2); font-size: 1.25rem; }
.feedback-heading h1 { margin: 0 0 5px; font-size: 1.55rem; }
.feedback-heading p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }
@media (max-width: 520px) {
  .feedback-shell { padding: 16px 12px; }
  .feedback-panel { padding: 24px 20px; }
}

/* ---------- Private messages ---------- */

.admin-status { color: var(--text-muted); margin-bottom: 18px; }
.message-list { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.message-item { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.message-item-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-faint); font-size: 0.86rem; }
.message-item p { white-space: pre-wrap; margin: 14px 0 0; color: var(--text); }
.message-delete { border: 0; padding: 4px 0; background: transparent; color: var(--primary-dark); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.message-delete:hover { text-decoration: underline; }

/* ---------- Legal pages ---------- */

.legal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 28px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
}
.legal-card h2 { font-size: 1.3rem; margin: 0 0 6px; }
.legal-card .lang-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
  background: var(--bg-soft-2);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.legal-card h3 { font-size: 1.02rem; margin: 24px 0 8px; }
.legal-card p, .legal-card li { color: var(--text-muted); font-size: 0.96rem; }
.legal-card ul { padding-left: 20px; }
.legal-card .updated { font-size: 0.85rem; color: var(--text-faint); margin-top: 24px; }

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a5b13;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary-dark); }

/* ---------- Reveal-on-scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
