/*
Theme Name: Otto's BOX TOOLS
Theme URI: https://otto-bako.com
Author: Otto's BOX
Author URI: https://otto858.com
Description: 無料Webツールの道具箱ポータル。管理画面の「ツール」からカード(色・URL・説明・公開状態)を自由に追加・編集・削除できます。otto858 のトーンを踏襲しつつ、遊び心のあるデザインに。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: otto-bako-tools
*/

/* =========================================================
   ★ デザイントークン (otto858 のトーンを踏襲)
   ========================================================= */
:root{
  --bg:        #f6f4ef;
  --bg-card:   #ffffff;
  --ink:       #16151a;
  --ink-sub:   #6b6a70;
  --line:      #e4e0d8;
  --line-soft: #efece5;
  --maxw:      1180px;
  --ease:      cubic-bezier(.2,.7,.2,1);
  --r:         18px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:"Noto Sans JP", sans-serif;
  font-weight:300;
  line-height:1.9;
  letter-spacing:.04em;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:radial-gradient(var(--line) 1px, transparent 1px);
  background-size:26px 26px;
  opacity:.4;
  -webkit-mask-image:linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image:linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 24px; }

/* ===== ヘッダー ===== */
.site-header{
  position:sticky; top:0; z-index:50;
  -webkit-backdrop-filter:saturate(140%) blur(10px);
  backdrop-filter:saturate(140%) blur(10px);
  background:rgba(246,244,239,.78);
  border-bottom:1px solid var(--line-soft);
}
.nav{ display:flex; align-items:center; justify-content:space-between; height:68px; }
.brand{ display:flex; align-items:center; gap:11px; font-weight:700; letter-spacing:.06em; }
.brand .box{
  width:30px; height:30px; border:2px solid var(--ink); border-radius:7px;
  position:relative; flex:none;
}
.brand .box::before,.brand .box::after{
  content:""; position:absolute; width:4px; height:4px; border-radius:50%;
  background:var(--ink); top:9px;
}
.brand .box::before{ left:7px; } .brand .box::after{ right:7px; }
.brand .box i{
  position:absolute; left:50%; bottom:6px; transform:translateX(-50%);
  width:8px; height:3px; border-radius:0 0 6px 6px; background:var(--ink);
}
.nav-right{ font-size:12px; letter-spacing:.14em; color:var(--ink-sub); }

/* カスタムロゴ（管理画面でアップロードした画像を表示） */
.custom-logo-link{ display:inline-flex; align-items:center; }
.custom-logo{ height:34px; width:auto; display:block; }
.site-footer .custom-logo{ height:30px; }

/* ===== ヒーロー ===== */
.hero{ padding:96px 0 72px; position:relative; }
.eyebrow{
  font-size:11px; letter-spacing:.32em; color:var(--ink-sub);
  text-transform:uppercase; margin-bottom:26px;
  opacity:0; animation:rise .8s var(--ease) .05s forwards;
}
.hero h1{
  font-weight:900; font-size:clamp(38px, 7vw, 78px); line-height:1.12;
  letter-spacing:.01em; margin-bottom:28px;
}
.hero h1 .l{ display:block; opacity:0; animation:rise .9s var(--ease) forwards; }
.hero h1 .l:nth-child(1){ animation-delay:.12s; }
.hero h1 .l:nth-child(2){ animation-delay:.24s; }
.hero h1 em{ font-style:normal; position:relative; white-space:nowrap; }
.hero h1 em::after{
  content:""; position:absolute; left:-2%; right:-2%; bottom:.12em; height:.34em;
  background:linear-gradient(90deg,#ff7aa2,#ffb347,#6c8cff,#1fb09b);
  z-index:-1; border-radius:4px; opacity:.55;
  transform:scaleX(0); transform-origin:left; animation:swipe 1s var(--ease) .7s forwards;
}
.hero p.lead{
  max-width:540px; color:var(--ink-sub); font-size:15px; line-height:2;
  opacity:0; animation:rise .9s var(--ease) .42s forwards;
}
.hero .float{
  position:absolute; right:max(24px, calc((100vw - var(--maxw))/2 + 24px)); top:80px;
  width:148px; height:148px; opacity:0; animation:pop 1s var(--ease) .6s forwards;
}
.hero .float .cube{
  width:100%; height:100%; border:2px solid var(--ink); border-radius:22px;
  display:grid; place-items:center; background:var(--bg-card);
  box-shadow:14px 14px 0 rgba(22,21,26,.08);
  animation:bob 5s ease-in-out 1.6s infinite;
}
.hero .float .cube span{ font-size:54px; }
@media(max-width:760px){ .hero .float{ display:none; } }

/* ===== ツールセクション ===== */
.sec-head{
  display:flex; align-items:baseline; justify-content:space-between;
  border-top:1px solid var(--line); padding-top:22px; margin:30px 0 38px;
  gap:16px; flex-wrap:wrap;
}
.sec-head h2{ font-weight:700; font-size:20px; letter-spacing:.1em; }
.sec-head .count{ font-size:12px; letter-spacing:.18em; color:var(--ink-sub); }

.grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(310px,1fr));
  gap:22px; padding-bottom:30px;
}

.card{
  --accent:#999;
  position:relative; background:var(--bg-card);
  border:1px solid var(--line); border-radius:var(--r);
  padding:30px 28px 26px; display:flex; flex-direction:column;
  min-height:268px; overflow:hidden;
  transition:transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.card::before{
  content:""; position:absolute; inset:0 0 auto 0; height:5px;
  background:var(--accent); transform:scaleX(0); transform-origin:left;
  transition:transform .5s var(--ease);
}
.card::after{
  content:""; position:absolute; right:-40px; top:-40px; width:150px; height:150px;
  background:var(--accent); border-radius:50%; filter:blur(46px);
  opacity:0; transition:opacity .5s var(--ease);
}
.card:hover{
  border-color:var(--accent);
  box-shadow:0 20px 40px -22px color-mix(in srgb, var(--accent) 60%, transparent);
}
.card:hover::before{ transform:scaleX(1); }
.card:hover::after{ opacity:.16; }

.card .tag{
  font-size:10px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--accent); font-weight:700; margin-bottom:18px;
  display:flex; align-items:center; gap:8px;
}
.card .tag .dot{ width:7px; height:7px; border-radius:50%; background:var(--accent); }
.card .emoji{ font-size:25px; line-height:1; margin-bottom:14px;
  transition:transform .45s var(--ease); transform-origin:left bottom; }
.card:hover .emoji{ transform:rotate(-8deg) scale(1.12); }
.card h3{ font-family:"Zen Maru Gothic"; font-weight:700; font-size:21px; letter-spacing:.02em; margin-bottom:10px; }
.card .desc{ font-size:13px; color:var(--ink-sub); line-height:1.85; flex:1; }

.card .actions{ display:flex; gap:7px; margin-top:20px; flex-wrap:nowrap; }
.btn{
  flex:1 1 0; min-width:0; justify-content:center;
  font-size:12px; letter-spacing:.02em; font-weight:500;
  height:40px; padding:0 8px; border-radius:999px;
  display:inline-flex; align-items:center; gap:6px;
  box-sizing:border-box; white-space:nowrap; overflow:hidden; cursor:pointer;
  border:1px solid transparent;
  transition:background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn .ico{ font-size:11px; line-height:1; flex:none; display:inline-block; transition:transform .3s var(--ease); transform-origin:center; }
.btn-main{ background:var(--ink); color:#fff; border-color:var(--ink); }
.btn-main:hover{ background:var(--accent); border-color:var(--accent); transform:translateY(-2px); }
.btn-main svg{ width:12px; height:12px; flex:none; transition:transform .3s var(--ease); }
.btn-main:hover svg{ transform:translateX(2px); }
.btn-ghost{ border:1px solid var(--line); color:var(--ink-sub); background:transparent; }
.btn-ghost:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-2px); }
.btn-ghost:hover .ico{ transform:scale(1.25) rotate(-12deg); }

.card.soon{ background:repeating-linear-gradient(135deg,#fff,#fff 14px,#faf8f3 14px,#faf8f3 28px); }
.card.soon .emoji{ filter:grayscale(1); opacity:.5; }
.card.soon h3,.card.soon .tag{ color:var(--ink-sub); }
.badge-soon{
  flex:1 1 0; height:40px; justify-content:center;
  font-size:11px; letter-spacing:.08em; color:var(--ink-sub);
  border:1px dashed var(--line); border-radius:999px;
  display:inline-flex; align-items:center; box-sizing:border-box;
}

/* ===== 補足 / フッター ===== */
.note{
  border:1px solid var(--line); border-radius:var(--r);
  padding:22px 26px; margin:14px 0 70px; font-size:12.5px;
  color:var(--ink-sub); background:var(--bg-card); line-height:1.9;
  display:flex; gap:14px; align-items:flex-start;
}
.note b{ color:var(--ink); font-weight:700; }
.note .ic{ font-size:18px; flex:none; }

.empty{
  border:1px dashed var(--line); border-radius:var(--r);
  padding:60px 24px; text-align:center; color:var(--ink-sub); font-size:14px;
  background:var(--bg-card); margin-bottom:60px;
}

/* ===== 固定ページ（プライバシーポリシー・特商法など） ===== */
.page-content{ max-width:820px; padding-top:80px; padding-bottom:70px; }
.page-title{
  font-size:clamp(28px,5vw,40px); font-weight:900; letter-spacing:.02em;
  margin-bottom:38px; padding-bottom:24px; border-bottom:1px solid var(--line);
}
.page-body{ font-size:15px; line-height:2; color:var(--ink-sub); }
.page-body h2{
  font-size:19px; font-weight:700; letter-spacing:.05em; color:var(--ink);
  margin:42px 0 16px; padding-bottom:10px; border-bottom:1px solid var(--line-soft);
}
.page-body h3{ font-size:16px; font-weight:700; color:var(--ink); margin:30px 0 12px; }
.page-body p{ margin:0 0 18px; }
.page-body ul{ margin:0 0 22px; padding-left:1.3em; }
.page-body li{ margin:0 0 9px; line-height:1.85; }
.page-body a{ color:var(--ink); text-decoration:underline; }
@media(max-width:640px){
  .page-content{ padding-top:48px; padding-bottom:44px; }
  .page-title{ margin-bottom:28px; padding-bottom:18px; }
}

.site-footer{ border-top:1px solid var(--line); padding:46px 0 60px; }
.foot{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.foot .links{ display:flex; gap:22px; font-size:13px; }
.foot .links .menu{ list-style:none; display:flex; gap:22px; margin:0; padding:0; flex-wrap:wrap; }
.foot .links li{ margin:0; }
.foot .links a{ color:var(--ink-sub); transition:.3s; }
.foot .links a:hover{ color:var(--ink); }
.foot .copy{ font-size:11px; letter-spacing:.12em; color:var(--ink-sub); }

/* ===== アニメーション ===== */
@keyframes rise{ from{ opacity:0; transform:translateY(22px);} to{ opacity:1; transform:none;} }
@keyframes swipe{ to{ transform:scaleX(1);} }
@keyframes pop{ from{ opacity:0; transform:scale(.7) rotate(-8deg);} to{ opacity:1; transform:none;} }
@keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-12px);} }

.card{ opacity:0; transform:translateY(20px); }
.card.in{ animation:rise .7s var(--ease) forwards; }

/* ===== スマホ最適化 ===== */
@media(max-width:640px){
  .grid{ grid-template-columns:1fr; gap:16px; }
  .card{ min-height:0; padding:26px 22px 24px; }
  .hero{ padding:64px 0 46px; }
  .wrap{ padding:0 18px; }
  .note{ margin-bottom:54px; }
}
@media(max-width:380px){
  .card .actions{ gap:8px; }
  .btn{ padding:9px 15px; }
}

@media(prefers-reduced-motion:reduce){
  *{ animation:none !important; }
  .eyebrow,.hero h1 .l,.hero p.lead,.hero .float,.card{ opacity:1 !important; transform:none !important; }
}
