/*
Theme Name: Williams Designs
Theme URI: https://williamsdesigns.au
Author: Williams Designs
Author URI: https://williamsdesigns.au
Description: A warm, editorial "coming soon" landing page theme designed for the Williams Designs studio launch. Features a cream paper aesthetic, Fraunces serif typography with a vermillion italic accent, a live Brisbane clock, ambient cursor-tracked gradients, a fine animated grain texture, and a built-in email signup that captures leads to the WordPress database — no plugins required.
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: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: williams-designs
Tags: one-page, landing-page, coming-soon, minimal, editorial, custom-colors
*/

:root {
  --cream: #F2EBDD;
  --cream-deep: #E8DEC8;
  --ink: #14110F;
  --ink-soft: rgba(20, 17, 15, 0.55);
  --ink-faint: rgba(20, 17, 15, 0.15);
  --vermillion: #D94E2F;
  --vermillion-deep: #B83A1F;
}

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

::selection { background: var(--vermillion); color: var(--cream); }

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide WP admin bar offset since we use full-viewport layout */
html { margin-top: 0 !important; }
* html body { margin-top: 0 !important; }
body.admin-bar { padding-top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar { padding-top: 46px; }
}

/* Atmospheric blob — autonomous slow drift */
.blob-auto {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle,
    rgba(217, 78, 47, 0.28) 0%,
    rgba(217, 78, 47, 0.14) 35%,
    rgba(217, 78, 47, 0.04) 65%,
    transparent 80%);
  filter: blur(60px);
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: drift 22s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33%      { transform: translate(-42%, -56%) scale(1.08); }
  66%      { transform: translate(-58%, -44%) scale(0.94); }
}

/* Smaller blob that follows the cursor with easing */
.blob-cursor {
  position: fixed;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle,
    rgba(217, 78, 47, 0.18) 0%,
    rgba(217, 78, 47, 0.05) 50%,
    transparent 75%);
  filter: blur(40px);
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.6s ease;
  opacity: 0;
}

/* Grain texture overlay */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift 8s steps(6) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20%      { transform: translate(-3%, 2%); }
  40%      { transform: translate(2%, -3%); }
  60%      { transform: translate(-2%, -2%); }
  80%      { transform: translate(3%, 1%); }
}

/* Layout */
.wd-container {
  position: relative;
  z-index: 10;
  height: 100vh;
  width: 100vw;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 32px 40px 28px;
}

/* Header */
.wd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  animation: rise 1s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.wd-header-col { display: flex; flex-direction: column; gap: 5px; }
.wd-header-col.right { text-align: right; align-items: flex-end; }
.wd-header-col .muted { color: var(--ink-soft); }

.wd-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wd-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermillion);
  box-shadow: 0 0 0 0 rgba(217, 78, 47, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 78, 47, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(217, 78, 47, 0); }
}

/* Hero */
.wd-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 32px;
  padding: 20px 0;
}

.wd-eyebrow {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--vermillion);
  opacity: 0;
  animation: rise 1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.wd-eyebrow::before,
.wd-eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--vermillion);
  opacity: 0.6;
}

.wd-display {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 300;
  font-size: clamp(72px, 15vw, 230px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--ink);
}

.wd-display .line {
  display: block;
  overflow: hidden;
  padding: 0.05em 0;
}

.wd-display .word {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  animation: wordUp 1.3s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
}

.wd-display .line:nth-child(1) .word { animation-delay: 0.55s; }
.wd-display .line:nth-child(2) .word { animation-delay: 0.78s; }

@keyframes wordUp {
  to { transform: translateY(0); opacity: 1; }
}

.wd-display em {
  font-style: italic;
  font-weight: 300;
  color: var(--vermillion);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  padding-right: 0.04em;
}

.wd-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 400;
  max-width: 460px;
  line-height: 1.55;
  color: var(--ink);
  opacity: 0;
  animation: rise 1s 1.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  font-variation-settings: "opsz" 24;
}

.wd-signup {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  background: rgba(242, 235, 221, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  animation: rise 1s 1.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.wd-signup:focus-within {
  border-color: var(--vermillion);
}

.wd-signup input {
  background: transparent;
  border: none;
  outline: none;
  padding: 14px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink);
  width: 280px;
  letter-spacing: 0.01em;
}

.wd-signup input::placeholder {
  color: var(--ink-soft);
}

.wd-signup button {
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 14px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background 0.3s ease, letter-spacing 0.3s ease;
  white-space: nowrap;
}

.wd-signup button:hover {
  background: var(--vermillion);
  letter-spacing: 0.22em;
}

/* Footer */
.wd-footer {
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  animation: rise 1s 1.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.wd-marquee {
  position: relative;
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
  margin: 0 -40px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.wd-marquee-track {
  display: flex;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  font-variation-settings: "opsz" 24;
}

.wd-marquee-group {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wd-marquee-item {
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.wd-marquee-item::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vermillion);
  flex-shrink: 0;
  margin-left: 26px;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.wd-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  gap: 24px;
  flex-wrap: wrap;
}

.wd-contact a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.wd-contact a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wd-contact a:hover {
  color: var(--vermillion);
}

.wd-contact a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.wd-contact .muted { color: var(--ink-soft); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blob-auto, .grain, .wd-status-dot, .wd-marquee-track { animation: none; }
  .wd-display .word, .wd-eyebrow, .wd-tagline, .wd-signup, .wd-header, .wd-footer {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .wd-container { padding: 22px 22px 20px; }
  .wd-header { font-size: 10px; }
  .wd-eyebrow { font-size: 10px; letter-spacing: 0.32em; gap: 10px; }
  .wd-eyebrow::before, .wd-eyebrow::after { width: 16px; }
  .wd-hero { gap: 26px; }
  .wd-marquee { margin: 0 -22px; font-size: 14px; }
  .wd-signup input { width: 200px; padding: 13px 16px; font-size: 12px; }
  .wd-signup button { padding: 13px 18px; font-size: 10px; letter-spacing: 0.15em; }
  .wd-contact { font-size: 10px; gap: 12px; }
  .blob-cursor { display: none; }
}

@media (max-width: 480px) {
  .wd-header-col.right .muted:first-child { display: none; }
  .wd-signup { flex-direction: column; }
  .wd-signup input { width: 100%; text-align: center; }
  .wd-signup button { width: 100%; }
}
