/*
Theme Name: Field
Theme URI: https://example.com/field
Author: Field
Author URI: https://example.com
Description: A dark, fast marketing-and-app theme for the Field bonding-curve launchpad on Arc. Includes a landing page, blog templates, Customizer controls, and a full-screen page template that serves the bundled launchpad app with your contract addresses injected server-side.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: field-theme
Tags: dark-mode, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns
*/

/* ---------- tokens ---------- */
:root {
  --bg: #111113;
  --surface: #18191b;
  --surface-2: #212225;
  --border: #272a2d;
  --border-light: #363a3f;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #86efac;
  --accent-dark: #4ade80;
  --accent-ink: #052e16;
  --warn: #facc15;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .4);
  --wrap: 1120px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --border: #e4e4e7;
  --border-light: #d4d4d8;
  --text: #18181b;
  --muted: #52525b;
  --accent: #15803d;
  --accent-dark: #166534;
  --accent-ink: #ffffff;
  --warn: #a16207;
  --shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
pre code { background: none; padding: 0; }
blockquote { margin: 1.5em 0; padding: .2em 1.2em; border-left: 3px solid var(--accent); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--surface); clip: auto !important; clip-path: none; color: var(--text); display: block;
  height: auto; left: 8px; padding: 12px 18px; top: 8px; width: auto; z-index: 100000; border-radius: var(--radius-sm);
}
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- buttons & forms ---------- */
.btn, button, input[type="submit"], .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); background: var(--surface-2); color: var(--text);
  transition: transform .15s, background .15s, border-color .15s; text-decoration: none;
}
.btn:hover, button:hover, input[type="submit"]:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary, input[type="submit"], .wp-block-button__link { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover, input[type="submit"]:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 12px;
}
textarea { min-height: 140px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); }
.site-brand:hover { text-decoration: none; }
.site-brand .custom-logo { max-height: 38px; width: auto; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); display: inline-block; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 8px 12px; color: var(--muted); font-weight: 500; border-radius: var(--radius-sm); }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 200px; flex-direction: column; align-items: stretch; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { padding: 8px 12px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 80px); text-align: center; background: radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.hero .eyebrow { display: inline-block; padding: 4px 12px; border: 1px solid var(--border-light); border-radius: 999px; color: var(--muted); font-size: .85rem; margin-bottom: 20px; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero p.lead { max-width: 62ch; margin: 0 auto 28px; font-size: 1.15rem; color: var(--muted); }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 800; margin-bottom: 12px; }
.fee { font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1.1; margin-bottom: 6px; }
.contracts { font-family: var(--mono); font-size: .9rem; word-break: break-all; }
.notice { border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--border)); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-radius: var(--radius); padding: 16px 20px; color: var(--text); }
.cta-band { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); padding: clamp(28px, 5vw, 56px); }

/* ---------- posts ---------- */
.content-area { display: grid; gap: 40px; padding: 40px 0 72px; }
.content-area.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
.page-header { padding: 40px 0 8px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card .body { padding: 20px; }
.post-card h2, .post-card h3 { font-size: 1.2rem; }
.post-card h2 a, .post-card h3 a { color: var(--text); }
.entry-meta { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.entry-title { margin-bottom: .3em; }
.entry-content > * { max-width: 72ch; }
.entry-content > .alignwide, .entry-content > .alignfull, .entry-content > figure, .entry-content > table, .entry-content > pre { max-width: 100%; }
.entry-content a { text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.post-thumbnail img { border-radius: var(--radius); margin-bottom: 24px; }
.tags-links a { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border: 1px solid var(--border-light); border-radius: 999px; color: var(--muted); font-size: .85rem; }
.post-navigation .nav-links, .pagination .nav-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.pagination .page-numbers.current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.widget { margin-bottom: 24px; }
.widget-title { font-size: 1rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--border); }

/* ---------- comments ---------- */
.comments-area { margin-top: 48px; max-width: 72ch; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.comment-meta { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; color: var(--muted); font-size: .95rem; }
.footer-top { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 28px; }
.footer-menu, .social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-disclaimer { font-size: .85rem; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { max-width: 1000px; }
.wp-caption, .wp-block-image figcaption, figcaption { color: var(--muted); font-size: .9rem; }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sticky .entry-title::after { content: " ★"; color: var(--warn); }
.bypostauthor > .comment-body { border-color: var(--accent); }

/* ---------- embedded app ---------- */
.field-app-embed { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .content-area.has-sidebar { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding-left: 14px; }
  .header-actions { margin-left: 0; }
  .site-header .wrap { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
